FIX: refresh admin report was broken
This commit is contained in:
parent
fa794ef59d
commit
13f5151ced
|
@ -1,5 +1,6 @@
|
||||||
import { exportEntity } from 'discourse/lib/export-csv';
|
import { exportEntity } from 'discourse/lib/export-csv';
|
||||||
import { outputExportResult } from 'discourse/lib/export-result';
|
import { outputExportResult } from 'discourse/lib/export-result';
|
||||||
|
import Report from 'admin/models/report';
|
||||||
|
|
||||||
export default Ember.Controller.extend({
|
export default Ember.Controller.extend({
|
||||||
viewMode: 'table',
|
viewMode: 'table',
|
||||||
|
@ -20,9 +21,9 @@ export default Ember.Controller.extend({
|
||||||
var q;
|
var q;
|
||||||
this.set("refreshing", true);
|
this.set("refreshing", true);
|
||||||
if (this.get('categoryId') === "all") {
|
if (this.get('categoryId') === "all") {
|
||||||
q = Discourse.Report.find(this.get("model.type"), this.get("startDate"), this.get("endDate"));
|
q = Report.find(this.get("model.type"), this.get("startDate"), this.get("endDate"));
|
||||||
} else {
|
} else {
|
||||||
q = Discourse.Report.find(this.get("model.type"), this.get("startDate"), this.get("endDate"), this.get("categoryId"));
|
q = Report.find(this.get("model.type"), this.get("startDate"), this.get("endDate"), this.get("categoryId"));
|
||||||
}
|
}
|
||||||
q.then(m => this.set("model", m)).finally(() => this.set("refreshing", false));
|
q.then(m => this.set("model", m)).finally(() => this.set("refreshing", false));
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue