mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 08:53:14 +00:00
add admin role/log feature
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
define([
|
||||
'underscore',
|
||||
'backbone.paginator',
|
||||
'common',
|
||||
'sysadmin-app/models/admin-operation-log'
|
||||
], function(_, BackbonePaginator, Common, AdminOperationLogModel) {
|
||||
'use strict';
|
||||
|
||||
var AdminOperationLogCollection = Backbone.PageableCollection.extend({
|
||||
|
||||
model: AdminOperationLogModel,
|
||||
|
||||
url: function() {
|
||||
return Common.getUrl({name: 'admin-operation-logs'});
|
||||
},
|
||||
|
||||
state: {
|
||||
firstPage: 1,
|
||||
pageSize: 100
|
||||
},
|
||||
|
||||
// Setting a parameter mapping value to null removes 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 AdminOperationLogCollection;
|
||||
});
|
Reference in New Issue
Block a user