mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 10:58:23 +08:00
23 lines
579 B
JavaScript
23 lines
579 B
JavaScript
import { ajax } from "discourse/lib/ajax";
|
|
|
|
const AdminDashboard = Discourse.Model.extend({});
|
|
|
|
AdminDashboard.reopenClass({
|
|
/**
|
|
Fetch all dashboard data. This can be an expensive request when the cached data
|
|
has expired and the server must collect the data again.
|
|
|
|
@method find
|
|
@return {jqXHR} a jQuery Promise object
|
|
**/
|
|
find: function() {
|
|
return ajax("/admin/dashboard-old.json").then(function(json) {
|
|
var model = AdminDashboard.create(json);
|
|
model.set("loaded", true);
|
|
return model;
|
|
});
|
|
}
|
|
});
|
|
|
|
export default AdminDashboard;
|