1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 15:19:06 +00:00

new admin devices page;

This commit is contained in:
lian
2016-04-23 18:07:09 +08:00
parent b3911c5081
commit bc2828969d
29 changed files with 2391 additions and 31 deletions

View File

@@ -0,0 +1,17 @@
define([
'underscore',
'backbone',
'common',
'sysadmin-app/models/device-error'
], function(_, Backbone, Common, DeviceError) {
'use strict';
var DeviceErrorCollection = Backbone.Collection.extend({
model: DeviceError,
url: function () {
return Common.getUrl({name: 'admin-device-errors'});
}
});
return DeviceErrorCollection;
});

View File

@@ -0,0 +1,25 @@
define([
'underscore',
'backbone',
'backbone.paginator',
'common',
'sysadmin-app/models/device'
], function(_, Backbone, BackbonePaginator, Common, Device) {
'use strict';
var DeviceCollection = Backbone.PageableCollection.extend({
model: Device,
state: {pageSize: 50,},
parseState: function(data) {
return {hasNextPage: data[0].has_next_page};
},
url: function () {
return Common.getUrl({name: 'admin-devices'});
},
parseRecords: function(data) {
return data[1];
}
});
return DeviceCollection;
});