From 2f1a46f748c1732caab5231e34109d84befd32ec Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 29 Oct 2020 16:47:18 +0100 Subject: [PATCH] ui: move user, token and permissions into an access control tab panel Signed-off-by: Thomas Lamprecht --- www/AccessControlPanel.js | 34 ++++++++++++++++++++++++++++++++++ www/Makefile | 1 + www/NavigationTree.js | 18 +++--------------- 3 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 www/AccessControlPanel.js diff --git a/www/AccessControlPanel.js b/www/AccessControlPanel.js new file mode 100644 index 00000000..d532ea39 --- /dev/null +++ b/www/AccessControlPanel.js @@ -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', + }, + ], + +}); diff --git a/www/Makefile b/www/Makefile index 7135df9a..99ea578e 100644 --- a/www/Makefile +++ b/www/Makefile @@ -37,6 +37,7 @@ JSSRC= \ dashboard/RunningTasks.js \ dashboard/TaskSummary.js \ Utils.js \ + AccessControlPanel.js \ ZFSList.js \ DirectoryList.js \ LoginView.js \ diff --git a/www/NavigationTree.js b/www/NavigationTree.js index d4e5d966..f0f48c0a 100644 --- a/www/NavigationTree.js +++ b/www/NavigationTree.js @@ -29,21 +29,9 @@ Ext.define('PBS.store.NavigationStore', { expanded: true, children: [ { - text: gettext('User Management'), - iconCls: 'fa fa-user', - path: 'pbsUserView', - leaf: true, - }, - { - text: gettext('API Token'), - iconCls: 'fa fa-user-o', - path: 'pbsTokenView', - leaf: true, - }, - { - text: gettext('Permissions'), - iconCls: 'fa fa-unlock', - path: 'pbsACLView', + text: gettext('Access Control'), + iconCls: 'fa fa-key', + path: 'pbsAccessControlPanel', leaf: true, }, {