From 94b1a8c841a24a948bb4463ac62dcecb94f4a986 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 14 May 2018 16:04:54 +0200 Subject: [PATCH] UX: disables all time col in activity metrics new dashboard This commit also makes it work for old dashboard. --- .../javascripts/admin/components/admin-report-counts.js.es6 | 1 + .../admin/templates/components/admin-report-counts.hbs | 4 +++- app/assets/javascripts/admin/templates/dashboard_next.hbs | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/admin/components/admin-report-counts.js.es6 b/app/assets/javascripts/admin/components/admin-report-counts.js.es6 index 46ab32f6091..1739a186b34 100644 --- a/app/assets/javascripts/admin/components/admin-report-counts.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report-counts.js.es6 @@ -1,4 +1,5 @@ export default Ember.Component.extend({ + allTime: true, tagName: 'tr', reverseColors: Ember.computed.match('report.type', /^(time_to_first_response|topics_with_no_response)$/), classNameBindings: ['reverseColors'] diff --git a/app/assets/javascripts/admin/templates/components/admin-report-counts.hbs b/app/assets/javascripts/admin/templates/components/admin-report-counts.hbs index 82fbf0d7996..793573e2509 100644 --- a/app/assets/javascripts/admin/templates/components/admin-report-counts.hbs +++ b/app/assets/javascripts/admin/templates/components/admin-report-counts.hbs @@ -19,4 +19,6 @@ {{number report.lastThirtyDaysCount}} {{d-icon "caret-up" class="up"}} {{d-icon "caret-down" class="down"}} -{{number report.total}} +{{#if allTime}} + {{number report.total}} +{{/if}} diff --git a/app/assets/javascripts/admin/templates/dashboard_next.hbs b/app/assets/javascripts/admin/templates/dashboard_next.hbs index fb1951cd282..0751301a620 100644 --- a/app/assets/javascripts/admin/templates/dashboard_next.hbs +++ b/app/assets/javascripts/admin/templates/dashboard_next.hbs @@ -72,12 +72,11 @@ {{i18n 'admin.dashboard.reports.yesterday'}} {{i18n 'admin.dashboard.reports.last_7_days'}} {{i18n 'admin.dashboard.reports.last_30_days'}} - {{i18n 'admin.dashboard.reports.all'}} {{#each reports as |report|}} - {{admin-report-counts report=report}} + {{admin-report-counts report=report allTime=false}} {{/each}}