reports: add non-timeseries charts.
Add bar charts for non-timeseries data. For example, a bar chart of the top 10 uploaders overall in the last month, rather than a timeseries chart of the number of uploads per day for the last month.
This commit is contained in:
@@ -5,27 +5,27 @@
|
||||
<h1>Reports</h1>
|
||||
|
||||
<ul class="list-bulleted">
|
||||
<li><%= link_to "Posts", report_path("posts") %></li>
|
||||
<li><%= link_to "Post approvals", report_path("post_approvals") %></li>
|
||||
<li><%= link_to "Post appeals", report_path("post_appeals") %></li>
|
||||
<li><%= link_to "Post flags", report_path("post_flags") %></li>
|
||||
<li><%= link_to "Post replacements", report_path("post_replacements") %></li>
|
||||
<li><%= link_to "Post votes", report_path("post_votes") %></li>
|
||||
<li><%= link_to "Media assets", report_path("media_assets") %></li>
|
||||
<li><%= link_to "Pools", report_path("pools") %></li>
|
||||
<li><%= link_to "Comments", report_path("comments") %></li>
|
||||
<li><%= link_to "Comment votes", report_path("comment_votes") %></li>
|
||||
<li><%= link_to "Forum posts", report_path("forum_posts") %></li>
|
||||
<li><%= link_to "Bulk update requests", report_path("bulk_update_requests") %></li>
|
||||
<li><%= link_to "Tag aliases", report_path("tag_aliases") %></li>
|
||||
<li><%= link_to "Tag implications", report_path("tag_implications") %></li>
|
||||
<li><%= link_to "Artist edits", report_path("artist_versions") %></li>
|
||||
<li><%= link_to "Artist commentary edits", report_path("artist_commentary_versions") %></li>
|
||||
<li><%= link_to "Note edits", report_path("note_versions") %></li>
|
||||
<li><%= link_to "Wiki edits", report_path("wiki_page_versions") %></li>
|
||||
<li><%= link_to "Mod actions", report_path("mod_actions") %></li>
|
||||
<li><%= link_to "Bans", report_path("bans") %></li>
|
||||
<li><%= link_to "Users", report_path("users") %></li>
|
||||
<li><%= link_to "Posts", report_path("posts", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Post approvals", report_path("post_approvals", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Post appeals", report_path("post_appeals", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Post flags", report_path("post_flags", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Post replacements", report_path("post_replacements", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Post votes", report_path("post_votes", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Media assets", report_path("media_assets", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Pools", report_path("pools", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Comments", report_path("comments", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Comment votes", report_path("comment_votes", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Forum posts", report_path("forum_posts", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Bulk update requests", report_path("bulk_update_requests", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Tag aliases", report_path("tag_aliases", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Tag implications", report_path("tag_implications", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Artist edits", report_path("artist_versions", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Artist commentary edits", report_path("artist_commentary_versions", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Note edits", report_path("note_versions", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Wiki edits", report_path("wiki_page_versions", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Mod actions", report_path("mod_actions", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Bans", report_path("bans", search: { period: "day" }) %></li>
|
||||
<li><%= link_to "Users", report_path("users", search: { period: "day" }) %></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,12 +12,13 @@
|
||||
|
||||
<%= 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 :period, collection: %w[day week month year].map { [_1.capitalize, _1] }, include_blank: true, selected: @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 :group_limit, label: "Top", collection: [10, 25, 50, 100], selected: @group_limit if @group %>
|
||||
<%= f.input :mode, as: :hidden, input_html: { value: params[:search][:mode] } %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
|
||||
<%= render TimeSeriesComponent.new(@dataframe, mode: @mode) %>
|
||||
<%= render TimeSeriesComponent.new(@dataframe, x_axis: @x_axis, mode: @mode) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user