FIX: corrects top-referred and trending-search dates (#6372)

This commit is contained in:
Joffrey JAFFEUX 2018-09-07 16:49:44 +02:00 committed by GitHub
parent 9e77fd8fc3
commit 2ad882113e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 7 deletions

View File

@ -23,11 +23,6 @@ export default Ember.Controller.extend(PeriodComputationMixin, {
),
shouldDisplayDurability: Ember.computed.and("diskSpace"),
@computed
topReferredTopicsTopions() {
return { table: { total: false, limit: 8 } };
},
@computed
activityMetrics() {
return [
@ -48,9 +43,38 @@ export default Ember.Controller.extend(PeriodComputationMixin, {
};
},
@computed
topReferredTopicsOptions() {
return {
table: { total: false, limit: 8 }
};
},
@computed
topReferredTopicsFilters() {
return {
startDate: moment()
.subtract(2, "days")
.startOf("day"),
endDate: this.get("today")
};
},
@computed
trendingSearchFilters() {
return {
startDate: moment()
.subtract(2, "days")
.startOf("day"),
endDate: this.get("today")
};
},
@computed
trendingSearchOptions() {
return { table: { total: false, limit: 8 } };
return {
table: { total: false, limit: 8 }
};
},
usersByTypeReport: staticReport("users_by_type"),

View File

@ -154,12 +154,14 @@
<div class="section-column">
{{admin-report
filters=topReferredTopicsFilters
dataSourceName="top_referred_topics"
reportOptions=topReferredTopicsTopions}}
reportOptions=topReferredTopicsOptions}}
{{admin-report
dataSourceName="trending_search"
reportOptions=trendingSearchOptions
filters=trendingSearchFilters
isEnabled=logSearchQueriesEnabled
disabledLabel="admin.dashboard.reports.trending_search.disabled"}}
{{{i18n "admin.dashboard.reports.trending_search.more"}}}