mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 19:33:41 +08:00
0e414d0890
This commit also improves how data is loaded sync and async
18 lines
476 B
JavaScript
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])];
|
|
})
|
|
};
|
|
},
|
|
});
|