]>
Commit | Line | Data |
---|---|---|
1e4d58ad | 1 | Ext.define('PVE.ha.GroupSelector', { |
0fc95a12 | 2 | extend: 'Proxmox.form.ComboGrid', |
1e4d58ad DM |
3 | alias: ['widget.pveHAGroupSelector'], |
4 | ||
7fc52dff EK |
5 | autoSelect: false, |
6 | valueField: 'group', | |
7 | displayField: 'group', | |
8 | listConfig: { | |
9 | columns: [ | |
10 | { | |
11 | header: gettext('Group'), | |
12 | width: 100, | |
13 | sortable: true, | |
f6710aac | 14 | dataIndex: 'group', |
7fc52dff EK |
15 | }, |
16 | { | |
17 | header: gettext('Nodes'), | |
18 | width: 100, | |
19 | sortable: false, | |
f6710aac | 20 | dataIndex: 'nodes', |
7fc52dff EK |
21 | }, |
22 | { | |
23 | header: gettext('Comment'), | |
24 | flex: 1, | |
91535f2b | 25 | dataIndex: 'comment', |
f6710aac TL |
26 | renderer: Ext.String.htmlEncode, |
27 | }, | |
28 | ], | |
7fc52dff EK |
29 | }, |
30 | store: { | |
1e4d58ad | 31 | model: 'pve-ha-groups', |
2a4971d8 TL |
32 | sorters: { |
33 | property: 'group', | |
392e3cf1 | 34 | direction: 'ASC', |
f6710aac | 35 | }, |
7fc52dff | 36 | }, |
1e4d58ad | 37 | |
7fc52dff EK |
38 | initComponent: function() { |
39 | var me = this; | |
40 | me.callParent(); | |
41 | me.getStore().load(); | |
f6710aac | 42 | }, |
1e4d58ad DM |
43 | |
44 | }, function() { | |
1e4d58ad DM |
45 | Ext.define('pve-ha-groups', { |
46 | extend: 'Ext.data.Model', | |
2a4971d8 | 47 | fields: [ |
3a4752e8 DC |
48 | 'group', 'type', 'digest', 'nodes', 'comment', |
49 | { | |
8058410f | 50 | name: 'restricted', |
f6710aac | 51 | type: 'boolean', |
3a4752e8 DC |
52 | }, |
53 | { | |
8058410f | 54 | name: 'nofailback', |
f6710aac TL |
55 | type: 'boolean', |
56 | }, | |
1e4d58ad DM |
57 | ], |
58 | proxy: { | |
56a353b9 | 59 | type: 'proxmox', |
f6710aac | 60 | url: "/api2/json/cluster/ha/groups", |
1e4d58ad | 61 | }, |
f6710aac | 62 | idProperty: 'group', |
1e4d58ad DM |
63 | }); |
64 | }); |