diff --git a/app/assets/javascripts/admin/components/admin-report.js.es6 b/app/assets/javascripts/admin/components/admin-report.js.es6 index 95d831af821..eb84df91ce4 100644 --- a/app/assets/javascripts/admin/components/admin-report.js.es6 +++ b/app/assets/javascripts/admin/components/admin-report.js.es6 @@ -110,7 +110,9 @@ export default Ember.Component.extend({ unregisterTooltip($(".info[data-tooltip]")); }, - showTimeoutError: Ember.computed.alias("model.timeout"), + showError: Ember.computed.or("showTimeoutError", "showExceptionError"), + showTimeoutError: Ember.computed.equal("model.error", "timeout"), + showExceptionError: Ember.computed.equal("model.error", "exception"), hasData: Ember.computed.notEmpty("model.data"), diff --git a/app/assets/javascripts/admin/controllers/admin-dashboard-next-general.js.es6 b/app/assets/javascripts/admin/controllers/admin-dashboard-next-general.js.es6 index b8b74739677..ddc8c319d0c 100644 --- a/app/assets/javascripts/admin/controllers/admin-dashboard-next-general.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-dashboard-next-general.js.es6 @@ -66,7 +66,9 @@ export default Ember.Controller.extend(PeriodComputationMixin, { this.setProperties({ dashboardFetchedAt: new Date(), model: adminDashboardNextModel, - reports: adminDashboardNextModel.reports.map(x => Report.create(x)) + reports: Ember.makeArray(adminDashboardNextModel.reports).map(x => + Report.create(x) + ) }); }) .catch(e => { diff --git a/app/assets/javascripts/admin/models/report.js.es6 b/app/assets/javascripts/admin/models/report.js.es6 index aceed0eef30..2098699eca8 100644 --- a/app/assets/javascripts/admin/models/report.js.es6 +++ b/app/assets/javascripts/admin/models/report.js.es6 @@ -12,7 +12,7 @@ import { renderAvatar } from "discourse/helpers/user-avatar"; // Change this line each time report format change // and you want to ensure cache is reset -export const SCHEMA_VERSION = 1; +export const SCHEMA_VERSION = 2; const Report = Discourse.Model.extend({ average: false, diff --git a/app/assets/javascripts/admin/templates/components/admin-report.hbs b/app/assets/javascripts/admin/templates/components/admin-report.hbs index 6208c7796a0..b8a7c41144f 100644 --- a/app/assets/javascripts/admin/templates/components/admin-report.hbs +++ b/app/assets/javascripts/admin/templates/components/admin-report.hbs @@ -1,11 +1,5 @@ {{#if isEnabled}} {{#conditional-loading-section isLoading=isLoading}} - {{#if showTimeoutError}} -