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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user