ui: move user, token and permissions into an access control tab panel

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-10-29 16:47:18 +01:00
parent 2b38dfb456
commit 2f1a46f748
3 changed files with 38 additions and 15 deletions

34
www/AccessControlPanel.js Normal file
View File

@ -0,0 +1,34 @@
Ext.define('PBS.AccessControlPanel', {
extend: 'Ext.tab.Panel',
alias: 'widget.pbsAccessControlPanel',
mixins: ['Proxmox.Mixin.CBind'],
title: gettext('Access Control'),
border: false,
defaults: {
border: false,
},
items: [
{
xtype: 'pbsUserView',
title: gettext('User Management'),
itemId: 'users',
iconCls: 'fa fa-user',
},
{
xtype: 'pbsTokenView',
title: gettext('API Token'),
itemId: 'apitokens',
iconCls: 'fa fa-user-o',
},
{
xtype: 'pbsACLView',
title: gettext('Permissions'),
itemId: 'permissions',
iconCls: 'fa fa-unlock',
},
],
});

View File

@ -37,6 +37,7 @@ JSSRC= \
dashboard/RunningTasks.js \ dashboard/RunningTasks.js \
dashboard/TaskSummary.js \ dashboard/TaskSummary.js \
Utils.js \ Utils.js \
AccessControlPanel.js \
ZFSList.js \ ZFSList.js \
DirectoryList.js \ DirectoryList.js \
LoginView.js \ LoginView.js \

View File

@ -29,21 +29,9 @@ Ext.define('PBS.store.NavigationStore', {
expanded: true, expanded: true,
children: [ children: [
{ {
text: gettext('User Management'), text: gettext('Access Control'),
iconCls: 'fa fa-user', iconCls: 'fa fa-key',
path: 'pbsUserView', path: 'pbsAccessControlPanel',
leaf: true,
},
{
text: gettext('API Token'),
iconCls: 'fa fa-user-o',
path: 'pbsTokenView',
leaf: true,
},
{
text: gettext('Permissions'),
iconCls: 'fa fa-unlock',
path: 'pbsACLView',
leaf: true, leaf: true,
}, },
{ {