reports: add ability to group reports by column.
Add ability to group reports by various columns. For example, you can see the posts by the top 10 uploaders over time, or posts grouped by rating over time.
This commit is contained in:
@@ -13,10 +13,11 @@
|
||||
<%= f.input :from, as: :date, html5: true, input_html: { value: params[:search][:from] || 1.month.ago.to_date } %>
|
||||
<%= f.input :to, as: :date, html5: true, input_html: { value: params[:search][:to] || Time.zone.now.to_date } %>
|
||||
<%= f.input :period, collection: %w[Day Week Month Year], selected: params[:search][:period] %>
|
||||
<%= f.input :group, label: "Group By", collection: @available_groups.map { |group| [group.titleize, group] }, include_blank: true, selected: params[:search][:group] if @available_groups.present? %>
|
||||
<%= f.input :mode, as: :hidden, input_html: { value: params[:search][:mode] } %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
|
||||
<%= render TimeSeriesComponent.new(@results, @columns.keys, mode: @mode) %>
|
||||
<%= render TimeSeriesComponent.new(@dataframe, mode: @mode) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user