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:
24
app/views/reports/index.html.erb
Normal file
24
app/views/reports/index.html.erb
Normal file
@@ -0,0 +1,24 @@
|
||||
<% page_title "Reports" %>
|
||||
|
||||
<div id="c-reports">
|
||||
<div id="a-index">
|
||||
<h1>Reports</h1>
|
||||
|
||||
<ul class="list-bulleted">
|
||||
<li><%= link_to "Posts", report_path("posts") %></li>
|
||||
<li><%= link_to "Post votes", report_path("post_votes") %></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 "Note edits", report_path("note_versions") %></li>
|
||||
<li><%= link_to "Wiki edits", report_path("wiki_page_versions") %></li>
|
||||
<li><%= link_to "New users", report_path("users") %></li>
|
||||
<li><%= link_to "Bans", report_path("bans") %></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
22
app/views/reports/show.html.erb
Normal file
22
app/views/reports/show.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<% page_title @title %>
|
||||
|
||||
<div id="c-reports">
|
||||
<div id="a-show">
|
||||
<h1><%= @title %></h1>
|
||||
<%= link_to "« Back", reports_path, class: "text-xs" %>
|
||||
|
||||
<%= search_form_for(current_page_path) do |f| %>
|
||||
<% if @report == "posts" %>
|
||||
<%= f.input :tags, label: "Tags", input_html: { value: params[:search][:tags], data: { autocomplete: "tag-query" } } %>
|
||||
<% end %>
|
||||
|
||||
<%= 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 :mode, as: :hidden, input_html: { value: params[:search][:mode] } %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
|
||||
<%= render TimeSeriesComponent.new(@results, @columns.keys, mode: @mode) %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,6 +73,7 @@
|
||||
|
||||
<ul>
|
||||
<li><h2>Reports</h2></li>
|
||||
<li><%= link_to("Reports", reports_path) %></li>
|
||||
<li><%= link_to("User Reports", "https://isshiki.donmai.us/user-reports") %></li>
|
||||
<li><%= link_to("Top Searches", searches_explore_posts_path) %></li>
|
||||
<li><%= link_to("Missed Searches", missed_searches_explore_posts_path) %></li>
|
||||
|
||||
Reference in New Issue
Block a user