]>
Commit | Line | Data |
---|---|---|
7e3fe38a | 1 | Ext.define('pve-groups', { |
3b1cb257 | 2 | extend: 'Ext.data.Model', |
88ac19dd | 3 | fields: [ 'groupid', 'comment', 'users' ], |
3b1cb257 DC |
4 | proxy: { |
5 | type: 'proxmox', | |
6 | url: "/api2/json/access/groups" | |
7 | }, | |
8 | idProperty: 'groupid' | |
7e3fe38a RJ |
9 | }); |
10 | ||
26322062 | 11 | Ext.define('PVE.form.GroupSelector', { |
0fc95a12 | 12 | extend: 'Proxmox.form.ComboGrid', |
7e3fe38a | 13 | xtype: 'pveGroupSelector', |
26322062 DM |
14 | |
15 | allowBlank: false, | |
a13842bf EK |
16 | autoSelect: false, |
17 | valueField: 'groupid', | |
18 | displayField: 'groupid', | |
19 | listConfig: { | |
20 | columns: [ | |
21 | { | |
22 | header: gettext('Group'), | |
23 | sortable: true, | |
24 | dataIndex: 'groupid', | |
25 | flex: 1 | |
26 | }, | |
27 | { | |
28 | header: gettext('Comment'), | |
29 | sortable: false, | |
30 | dataIndex: 'comment', | |
91535f2b | 31 | renderer: Ext.String.htmlEncode, |
a13842bf | 32 | flex: 1 |
88ac19dd FG |
33 | }, |
34 | { | |
35 | header: gettext('Users'), | |
36 | sortable: false, | |
37 | dataIndex: 'users', | |
38 | flex: 1 | |
a13842bf EK |
39 | } |
40 | ] | |
41 | }, | |
26322062 DM |
42 | |
43 | initComponent: function() { | |
44 | var me = this; | |
45 | ||
46 | var store = new Ext.data.Store({ | |
3253e118 DC |
47 | model: 'pve-groups', |
48 | sorters: [{ | |
49 | property: 'groupid' | |
50 | }] | |
26322062 DM |
51 | }); |
52 | ||
53 | Ext.apply(me, { | |
22f2f9d6 | 54 | store: store |
26322062 DM |
55 | }); |
56 | ||
7e3fe38a | 57 | me.callParent(); |
26322062 DM |
58 | |
59 | store.load(); | |
60 | } | |
26322062 | 61 | }); |