From 5f54b005a13320f16c8b87a6fa9ee6ced37deb56 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 14 May 2018 11:33:36 +1000 Subject: [PATCH] UX: remove ? from new dashboard Link to actual report --- app/assets/javascripts/admin/models/report.js.es6 | 8 ++++++-- .../admin/templates/components/dashboard-mini-chart.hbs | 8 +++----- app/assets/stylesheets/common/admin/dashboard_next.scss | 3 +++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/admin/models/report.js.es6 b/app/assets/javascripts/admin/models/report.js.es6 index 557657c84eb..c24e753baf3 100644 --- a/app/assets/javascripts/admin/models/report.js.es6 +++ b/app/assets/javascripts/admin/models/report.js.es6 @@ -1,13 +1,17 @@ import { ajax } from 'discourse/lib/ajax'; import round from "discourse/lib/round"; -import { fmt } from 'discourse/lib/computed'; import { fillMissingDates } from 'discourse/lib/utilities'; import computed from 'ember-addons/ember-computed-decorators'; const Report = Discourse.Model.extend({ average: false, - reportUrl: fmt("type", "/admin/reports/%@"), + @computed("type", "start_date", "end_date") + reportUrl(type, start_date, end_date) { + start_date = moment(start_date).format("YYYY-MM-DD"); + end_date = moment(end_date).format("YYYY-MM-DD"); + return Discourse.getURL(`/admin/reports/${type}?start_date=${start_date}&end_date=${end_date}`); + }, valueAt(numDaysAgo) { if (this.data) { diff --git a/app/assets/javascripts/admin/templates/components/dashboard-mini-chart.hbs b/app/assets/javascripts/admin/templates/components/dashboard-mini-chart.hbs index ad087a64366..8f0210f6966 100644 --- a/app/assets/javascripts/admin/templates/components/dashboard-mini-chart.hbs +++ b/app/assets/javascripts/admin/templates/components/dashboard-mini-chart.hbs @@ -1,11 +1,9 @@ {{#conditional-loading-section isLoading=isLoading title=report.title}}

- {{report.title}} - - {{#if report.description}} - {{d-icon "question-circle"}} - {{/if}} + + {{report.title}} +

diff --git a/app/assets/stylesheets/common/admin/dashboard_next.scss b/app/assets/stylesheets/common/admin/dashboard_next.scss index f7fecd8ca10..46fd65c00ad 100644 --- a/app/assets/stylesheets/common/admin/dashboard_next.scss +++ b/app/assets/stylesheets/common/admin/dashboard_next.scss @@ -182,6 +182,9 @@ h3 { margin: 1em 0; + a, a:visited { + color: $primary; + } } }