]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/ha/GroupSelector.js
htmlEncode some comment fields
[pve-manager.git] / www / manager6 / ha / GroupSelector.js
1 Ext.define('PVE.ha.GroupSelector', {
2 extend: 'PVE.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 order: 'DESC'
35 }
36 },
37
38 initComponent: function() {
39 var me = this;
40 me.callParent();
41 me.getStore().load();
42 }
43
44 }, function() {
45
46 Ext.define('pve-ha-groups', {
47 extend: 'Ext.data.Model',
48 fields: [
49 'group', 'type', 'restricted', 'digest', 'nofailback',
50 'nodes', 'comment'
51 ],
52 proxy: {
53 type: 'pve',
54 url: "/api2/json/cluster/ha/groups"
55 },
56 idProperty: 'group'
57 });
58 });