]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/form/PrivilegesSelector.js
ui: eslint: fix trailing comma and comma related whitespaces errors
[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 var me = this;
9
10 // So me.store is available.
11 me.callParent();
12
13 Proxmox.Utils.API2Request({
14 url: '/access/roles/Administrator',
15 method: 'GET',
16 success: function(response, options) {
17 var data = [], key;
18 for (key in response.result.data) {
19 data.push([key, key]);
20 }
21
22 me.store.setData(data);
23
24 me.store.sort({
25 property: 'key',
26 direction: 'ASC',
27 });
28 },
29
30 failure: function (response, opts) {
31 Ext.Msg.alert(gettext('Error'), response.htmlStatus);
32 },
33 });
34 },
35 });