]>
Commit | Line | Data |
---|---|---|
3c795077 | 1 | Ext.define('PVE.form.SecurityGroupsSelector', { |
0fc95a12 | 2 | extend: 'Proxmox.form.ComboGrid', |
3c795077 DM |
3 | alias: ['widget.pveSecurityGroupsSelector'], |
4 | ||
c02dd8ff DC |
5 | valueField: 'group', |
6 | displayField: 'group', | |
3c795077 DM |
7 | initComponent: function() { |
8 | var me = this; | |
9 | ||
10 | var store = Ext.create('Ext.data.Store', { | |
11 | autoLoad: true, | |
12 | fields: [ 'group', 'comment' ], | |
13 | idProperty: 'group', | |
14 | proxy: { | |
15 | type: 'pve', | |
16 | url: "/api2/json/cluster/firewall/groups" | |
17 | }, | |
18 | sorters: { | |
19 | property: 'group', | |
20 | order: 'DESC' | |
21 | } | |
22 | }); | |
23 | ||
24 | Ext.apply(me, { | |
25 | store: store, | |
3c795077 DM |
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'), | |
91535f2b DC |
36 | dataIndex: 'comment', |
37 | renderer: Ext.String.htmlEncode, | |
3c795077 DM |
38 | flex: 1 |
39 | } | |
40 | ] | |
41 | } | |
42 | }); | |
43 | ||
44 | me.callParent(); | |
45 | } | |
46 | }); | |
47 |