]>
Commit | Line | Data |
---|---|---|
9a3c1cb4 DC |
1 | Ext.define('pmx-roles', { |
2 | extend: 'Ext.data.Model', | |
3 | fields: ['roleid', 'privs'], | |
4 | proxy: { | |
5 | type: 'proxmox', | |
6 | url: "/api2/json/access/roles", | |
7 | }, | |
8 | idProperty: 'roleid', | |
9 | }); | |
10 | ||
11 | Ext.define('Proxmox.form.RoleSelector', { | |
12 | extend: 'Proxmox.form.ComboGrid', | |
13 | alias: 'widget.pmxRoleSelector', | |
14 | ||
15 | allowBlank: false, | |
16 | autoSelect: false, | |
17 | valueField: 'roleid', | |
18 | displayField: 'roleid', | |
19 | ||
20 | listConfig: { | |
21 | columns: [ | |
22 | { | |
23 | header: gettext('Role'), | |
24 | sortable: true, | |
25 | dataIndex: 'roleid', | |
26 | flex: 1, | |
27 | }, | |
28 | { | |
29 | header: gettext('Privileges'), | |
30 | dataIndex: 'privs', | |
31 | flex: 1, | |
32 | }, | |
33 | ], | |
34 | }, | |
35 | ||
36 | store: { | |
37 | autoLoad: true, | |
38 | model: 'pmx-roles', | |
39 | sorters: 'roleid', | |
40 | }, | |
41 | }); |