UX: improvements to new dashboard

- remove inactive user report and replace with posts
- clean up internals so grouping by week happens on client
- when switching periods old report was not destroyed leading to bugs
- calculate trend based on previous interval ... not previous 30 days
- show percentages for mau/dau
- be more careful about utc date usage
- show uniqu and click through rate on search panel
- publish key of report with report so we only load the correct one
- subscribe earlier in channel in case of concurrency issues
This commit is contained in:
Sam
2018-05-11 13:30:21 +10:00
parent 52d6b0f948
commit 8a783412b7
21 changed files with 324 additions and 107 deletions

View File

@ -22,11 +22,17 @@ class Admin::ReportsController < Admin::AdminController
group_id = nil
end
facets = nil
if Array === params[:facets]
facets = params[:facets].map { |s| s.to_s.to_sym }
end
report = Report.find(report_type,
start_date: start_date,
end_date: end_date,
category_id: category_id,
group_id: group_id,
facets: facets,
async: params[:async])
raise Discourse::NotFound if report.blank?