1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 08:53:14 +00:00

add admin operation logs page

This commit is contained in:
lian
2017-03-09 17:42:59 +08:00
parent 893f3db8c0
commit dd88c4e043
23 changed files with 699 additions and 17 deletions

View File

@@ -0,0 +1,40 @@
define([
'underscore',
'backbone.paginator',
'common',
'sysadmin-app/models/admin-log'
], function(_, BackbonePaginator, Common, AdminLogModel) {
'use strict';
var AdminLogCollection = Backbone.PageableCollection.extend({
model: AdminLogModel,
url: function() {
return Common.getUrl({name: 'admin-logs'});
},
state: {
firstPage: 1,
pageSize: 100,
},
// Setting `null` as the value of any mapping
// will remove it from the query string.
queryParams: {
currentPage: "page",
pageSize: "per_page",
totalPages: null,
totalRecords: null,
},
parseState: function (resp) {
return {totalRecords: resp.total_count};
},
parseRecords: function (resp) {
return resp.data;
}
});
return AdminLogCollection;
});