]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/form/PrivilegesSelector.js
ui: add tags to ResourceGrid and GlobalSearchField
[pve-manager.git] / www / manager6 / form / PrivilegesSelector.js
1 Ext.define('PVE.form.PrivilegesSelector', {
2 extend: 'Proxmox.form.KVComboBox',
3 xtype: 'pvePrivilegesSelector',
4
5 multiSelect: true,
6
7 initComponent: function() {
8 let me = this;
9
10 me.callParent();
11
12 Proxmox.Utils.API2Request({
13 url: '/access/roles/Administrator',
14 method: 'GET',
15 success: function(response, options) {
16 let data = Object.keys(response.result.data).map(key => [key, key]);
17
18 me.store.setData(data);
19
20 me.store.sort({
21 property: 'key',
22 direction: 'ASC',
23 });
24 },
25 failure: (response, opts) => Ext.Msg.alert(gettext('Error'), response.htmlStatus),
26 });
27 },
28 });