]> git.proxmox.com Git - pve-manager.git/blame_incremental - www/manager6/form/GroupSelector.js
ui: acl: group selector: allow search
[pve-manager.git] / www / manager6 / form / GroupSelector.js
... / ...
CommitLineData
1Ext.define('pve-groups', {
2 extend: 'Ext.data.Model',
3 fields: ['groupid', 'comment', 'users'],
4 proxy: {
5 type: 'proxmox',
6 url: "/api2/json/access/groups",
7 },
8 idProperty: 'groupid',
9});
10
11Ext.define('PVE.form.GroupSelector', {
12 extend: 'Proxmox.form.ComboGrid',
13 xtype: 'pveGroupSelector',
14
15 editable: true,
16 anyMatch: true,
17 forceSelection: true,
18
19 allowBlank: false,
20 autoSelect: false,
21 valueField: 'groupid',
22 displayField: 'groupid',
23 listConfig: {
24 columns: [
25 {
26 header: gettext('Group'),
27 sortable: true,
28 dataIndex: 'groupid',
29 flex: 1,
30 },
31 {
32 header: gettext('Comment'),
33 sortable: false,
34 dataIndex: 'comment',
35 renderer: Ext.String.htmlEncode,
36 flex: 1,
37 },
38 {
39 header: gettext('Users'),
40 sortable: false,
41 dataIndex: 'users',
42 renderer: Ext.String.htmlEncode,
43 flex: 1,
44 },
45 ],
46 },
47
48 initComponent: function() {
49 var me = this;
50
51 var store = new Ext.data.Store({
52 model: 'pve-groups',
53 sorters: [{
54 property: 'groupid',
55 }],
56 });
57
58 Ext.apply(me, {
59 store: store,
60 });
61
62 me.callParent();
63
64 store.load();
65 },
66});