]>
Commit | Line | Data |
---|---|---|
3c795077 DM |
1 | Ext.define('PVE.form.SecurityGroupsSelector', { |
2 | extend: 'PVE.form.ComboGrid', | |
3 | alias: ['widget.pveSecurityGroupsSelector'], | |
4 | ||
5 | initComponent: function() { | |
6 | var me = this; | |
7 | ||
8 | var store = Ext.create('Ext.data.Store', { | |
9 | autoLoad: true, | |
10 | fields: [ 'group', 'comment' ], | |
11 | idProperty: 'group', | |
12 | proxy: { | |
13 | type: 'pve', | |
14 | url: "/api2/json/cluster/firewall/groups" | |
15 | }, | |
16 | sorters: { | |
17 | property: 'group', | |
18 | order: 'DESC' | |
19 | } | |
20 | }); | |
21 | ||
22 | Ext.apply(me, { | |
23 | store: store, | |
24 | valueField: 'group', | |
25 | displayField: 'group', | |
26 | listConfig: { | |
27 | columns: [ | |
28 | { | |
29 | header: gettext('Security Group'), | |
30 | dataIndex: 'group', | |
31 | hideable: false, | |
32 | width: 100 | |
33 | }, | |
34 | { | |
35 | header: gettext('Comment'), | |
36 | dataIndex: 'comment', | |
37 | flex: 1 | |
38 | } | |
39 | ] | |
40 | } | |
41 | }); | |
42 | ||
43 | me.callParent(); | |
44 | } | |
45 | }); | |
46 |