[pve-devel] [PATCH manager 1/2] ui: use RoleSelector from widget-toolkit
Dominik Csapak
d.csapak at proxmox.com
Tue May 19 16:48:37 CEST 2020
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/Makefile | 1 -
www/manager6/dc/ACLView.js | 2 +-
www/manager6/form/RoleSelector.js | 50 -------------------------------
3 files changed, 1 insertion(+), 52 deletions(-)
delete mode 100644 www/manager6/form/RoleSelector.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index a29e280d..5656ba27 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -26,7 +26,6 @@ JSSRC= \
form/PrivilegesSelector.js \
form/GroupSelector.js \
form/UserSelector.js \
- form/RoleSelector.js \
form/GuestIDSelector.js \
form/MemoryField.js \
form/NetworkCardSelector.js \
diff --git a/www/manager6/dc/ACLView.js b/www/manager6/dc/ACLView.js
index 24fd67d9..e9928b0f 100644
--- a/www/manager6/dc/ACLView.js
+++ b/www/manager6/dc/ACLView.js
@@ -46,7 +46,7 @@ Ext.define('PVE.dc.ACLAdd', {
}
items.push({
- xtype: 'pveRoleSelector',
+ xtype: 'pmxRoleSelector',
name: 'roles',
value: 'NoAccess',
fieldLabel: gettext('Role')
diff --git a/www/manager6/form/RoleSelector.js b/www/manager6/form/RoleSelector.js
deleted file mode 100644
index 04b5b538..00000000
--- a/www/manager6/form/RoleSelector.js
+++ /dev/null
@@ -1,50 +0,0 @@
-Ext.define('PVE.form.RoleSelector', {
- extend: 'Proxmox.form.ComboGrid',
- alias: ['widget.pveRoleSelector'],
-
- allowBlank: false,
- autoSelect: false,
- valueField: 'roleid',
- displayField: 'roleid',
- initComponent: function() {
- var me = this;
-
- var store = new Ext.data.Store({
- model: 'pve-roles',
- sorters: [{
- property: 'roleid'
- }]
- });
-
- Ext.apply(me, {
- store: store,
- listConfig: {
- columns: [
- {
- header: gettext('Role'),
- sortable: true,
- dataIndex: 'roleid',
- flex: 1
- }
- ]
- }
- });
-
- me.callParent();
-
- store.load();
- }
-
-}, function() {
-
- Ext.define('pve-roles', {
- extend: 'Ext.data.Model',
- fields: [ 'roleid', 'privs' ],
- proxy: {
- type: 'proxmox',
- url: "/api2/json/access/roles"
- },
- idProperty: 'roleid'
- });
-
-});
--
2.20.1
More information about the pve-devel
mailing list