UX: disables all time col in activity metrics new dashboard

This commit also makes it work for old dashboard.
This commit is contained in:
Joffrey JAFFEUX 2018-05-14 16:04:54 +02:00 committed by GitHub
parent c67c2dc638
commit 94b1a8c841
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,5 @@
export default Ember.Component.extend({ export default Ember.Component.extend({
allTime: true,
tagName: 'tr', tagName: 'tr',
reverseColors: Ember.computed.match('report.type', /^(time_to_first_response|topics_with_no_response)$/), reverseColors: Ember.computed.match('report.type', /^(time_to_first_response|topics_with_no_response)$/),
classNameBindings: ['reverseColors'] classNameBindings: ['reverseColors']

View File

@ -19,4 +19,6 @@
{{number report.lastThirtyDaysCount}} {{d-icon "caret-up" class="up"}} {{d-icon "caret-down" class="down"}} {{number report.lastThirtyDaysCount}} {{d-icon "caret-up" class="up"}} {{d-icon "caret-down" class="down"}}
</td> </td>
<td class="value">{{number report.total}}</td> {{#if allTime}}
<td class="value">{{number report.total}}</td>
{{/if}}

View File

@ -72,12 +72,11 @@
<th>{{i18n 'admin.dashboard.reports.yesterday'}}</th> <th>{{i18n 'admin.dashboard.reports.yesterday'}}</th>
<th>{{i18n 'admin.dashboard.reports.last_7_days'}}</th> <th>{{i18n 'admin.dashboard.reports.last_7_days'}}</th>
<th>{{i18n 'admin.dashboard.reports.last_30_days'}}</th> <th>{{i18n 'admin.dashboard.reports.last_30_days'}}</th>
<th>{{i18n 'admin.dashboard.reports.all'}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{#each reports as |report|}} {{#each reports as |report|}}
{{admin-report-counts report=report}} {{admin-report-counts report=report allTime=false}}
{{/each}} {{/each}}
</tbody> </tbody>
</table> </table>