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