mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
add admin operation logs page
This commit is contained in:
@@ -18,12 +18,13 @@ define([
|
||||
'sysadmin-app/views/search-groups',
|
||||
'sysadmin-app/views/group-repos',
|
||||
'sysadmin-app/views/group-members',
|
||||
'sysadmin-app/views/admin-logs',
|
||||
'app/views/account'
|
||||
], function($, Backbone, Common, SideNavView, DashboardView,
|
||||
DesktopDevicesView, MobileDevicesView, DeviceErrorsView,
|
||||
ReposView, SearchReposView, SystemReposView, TrashReposView,
|
||||
SearchTrashReposView, DirView, GroupsView, SearchGroupsView,
|
||||
GroupReposView, GroupMembersView, AccountView) {
|
||||
GroupReposView, GroupMembersView, AdminLogsView, AccountView) {
|
||||
|
||||
"use strict";
|
||||
|
||||
@@ -42,8 +43,10 @@ define([
|
||||
'libs/:repo_id(/*path)': 'showLibraryDir',
|
||||
'groups/': 'showGroups',
|
||||
'search-groups/': 'showSearchGroups',
|
||||
'groups/:group_id/': 'showGroupLibraries',
|
||||
'groups/:group_id/libs/': 'showGroupLibraries',
|
||||
'groups/:group_id/members/': 'showGroupMembers',
|
||||
'admin-logs/': 'showAdminLogs',
|
||||
// Default
|
||||
'*actions': 'showDashboard'
|
||||
},
|
||||
@@ -76,6 +79,8 @@ define([
|
||||
this.groupReposView = new GroupReposView();
|
||||
this.groupMembersView = new GroupMembersView();
|
||||
|
||||
this.adminLogsView = new AdminLogsView();
|
||||
|
||||
app.ui.accountView = this.accountView = new AccountView();
|
||||
|
||||
this.currentView = this.dashboardView;
|
||||
@@ -223,6 +228,20 @@ define([
|
||||
this.switchCurrentView(this.groupMembersView);
|
||||
this.sideNavView.setCurTab('groups');
|
||||
this.groupMembersView.show(group_id);
|
||||
},
|
||||
|
||||
showAdminLogs: function() {
|
||||
var url = window.location.href;
|
||||
var page = url.match(/.*?page=(\d+)/);
|
||||
if (page) {
|
||||
var current_page = page[1];
|
||||
} else {
|
||||
var current_page = null;
|
||||
}
|
||||
|
||||
this.switchCurrentView(this.adminLogsView);
|
||||
this.sideNavView.setCurTab('admin-logs');
|
||||
this.adminLogsView.show({'current_page': current_page});
|
||||
}
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user