]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/ha/GroupSelector.js
update shipped appliance info index
[pve-manager.git] / www / manager6 / ha / GroupSelector.js
1 Ext.define('PVE.ha.GroupSelector', {
2 extend: 'Proxmox.form.ComboGrid',
3 alias: ['widget.pveHAGroupSelector'],
4
5 value: [],
6 autoSelect: false,
7 valueField: 'group',
8 displayField: 'group',
9 listConfig: {
10 columns: [
11 {
12 header: gettext('Group'),
13 width: 100,
14 sortable: true,
15 dataIndex: 'group',
16 },
17 {
18 header: gettext('Nodes'),
19 width: 100,
20 sortable: false,
21 dataIndex: 'nodes',
22 },
23 {
24 header: gettext('Comment'),
25 flex: 1,
26 dataIndex: 'comment',
27 renderer: Ext.String.htmlEncode,
28 },
29 ],
30 },
31 store: {
32 model: 'pve-ha-groups',
33 sorters: {
34 property: 'group',
35 direction: 'ASC',
36 },
37 },
38
39 initComponent: function() {
40 var me = this;
41 me.callParent();
42 me.getStore().load();
43 },
44
45 }, function() {
46 Ext.define('pve-ha-groups', {
47 extend: 'Ext.data.Model',
48 fields: [
49 'group', 'type', 'digest', 'nodes', 'comment',
50 {
51 name: 'restricted',
52 type: 'boolean',
53 },
54 {
55 name: 'nofailback',
56 type: 'boolean',
57 },
58 ],
59 proxy: {
60 type: 'proxmox',
61 url: "/api2/json/cluster/ha/groups",
62 },
63 idProperty: 'group',
64 });
65 });