Add basic tables and graphs for various tables.

Add basic tables and graphs for viewing things like uploads over time, new users
over time, comments over time, etc. Located at https://betabooru.donmai.us/reports.

The graphing uses Apache ECharts: https://echarts.apache.org/en/index.html.
This commit is contained in:
evazion
2022-10-20 05:20:22 -05:00
parent 412b7f2727
commit 7646521d0f
16 changed files with 384 additions and 9 deletions

View File

@@ -744,16 +744,15 @@ module Searchable
end
def sql_value(value)
if Arel.arel_node?(value)
case value
in _ if Arel.arel_node?(value)
value
elsif value.is_a?(String)
Arel::Nodes.build_quoted(value)
elsif value.is_a?(Symbol)
in Symbol
arel_table[value]
elsif value.is_a?(Array)
in Array
sql_array(value)
else
raise ArgumentError
Arel::Nodes.build_quoted(value)
end
end