mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Use one request to fetch dashboard report data and check version
This commit is contained in:
14
app/assets/javascripts/admin/models/admin_dashboard.js
Normal file
14
app/assets/javascripts/admin/models/admin_dashboard.js
Normal file
@@ -0,0 +1,14 @@
|
||||
Discourse.AdminDashboard = Discourse.Model.extend({});
|
||||
|
||||
Discourse.AdminDashboard.reopenClass({
|
||||
find: function() {
|
||||
var model = Discourse.AdminDashboard.create();
|
||||
return $.ajax("/admin/dashboard", {
|
||||
type: 'GET',
|
||||
success: function(json) {
|
||||
model.mergeAttributes(json);
|
||||
model.set('loaded', true);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user