discourse/app/assets/javascripts/admin/components/dashboard-table-trending-search.js.es6
Joffrey JAFFEUX 0e414d0890
dashboard next: trending search report
This commit also improves how data is loaded sync and async
2018-04-19 18:19:21 +02:00

18 lines
476 B
JavaScript

import DashboardTable from "admin/components/dashboard-table";
import { number } from 'discourse/lib/formatter';
export default DashboardTable.extend({
layoutName: "admin/templates/components/dashboard-table",
classNames: ["dashboard-table", "dashboard-table-trending-search"],
transformModel(model) {
return {
labels: model.labels,
values: model.data.map(data => {
return [data[0], number(data[1]), number(data[2])];
})
};
},
});