Commit 2df82b9d authored by Dietmar Maurer's avatar Dietmar Maurer

add ha fencing panel (dummy for now)

parent 8cd3a74b
......@@ -167,6 +167,8 @@ JSSRC= \
storage/ZFSPoolEdit.js \
ha/StatusView.js \
ha/Resources.js \
ha/Groups.js \
ha/Fencing.js \
ha/Config.js \
dc/Summary.js \
dc/OptionView.js \
......
Ext.define('PVE.ha.FencingView', {
extend: 'Ext.grid.GridPanel',
alias: ['widget.pveFencingView'],
initComponent : function() {
var me = this;
var store = new Ext.data.Store({
model: 'pve-ha-fencing',
data: []
});
Ext.apply(me, {
store: store,
stateful: false,
viewConfig: {
trackOver: false,
deferEmptyText: false,
emptyText: 'Use watchgog based fencing.'
},
columns: [
{
header: 'Node',
width: 100,
sortable: true,
dataIndex: 'node'
},
{
header: gettext('Command'),
flex: 1,
dataIndex: 'command'
}
]
});
me.callParent();
}
}, function() {
Ext.define('pve-ha-fencing', {
extend: 'Ext.data.Model',
fields: [
'node', 'command', 'digest'
]
});
});
Ext.define('PVE.ha.GroupsView', {
extend: 'Ext.grid.GridPanel',
alias: ['widget.pveHAGroupsView'],
initComponent : function() {
var me = this;
var store = new Ext.data.Store({
model: 'pve-ha-groups',
proxy: {
type: 'pve',
url: "/api2/json/cluster/ha/groups"
},
sorters: {
property: 'group',
order: 'DESC'
}
});
var reload = function() {
store.load();
};
var sm = Ext.create('Ext.selection.RowModel', {});
Ext.apply(me, {
store: store,
selModel: sm,
stateful: false,
viewConfig: {
trackOver: false
},
columns: [
{
header: gettext('Group'),
width: 150,
sortable: true,
dataIndex: 'group'
},
{
header: gettext('restricted'),
width: 100,
sortable: true,
renderer: PVE.Utils.format_boolean,
dataIndex: 'restricted'
},
{
header: gettext('nofailback'),
width: 100,
sortable: true,
renderer: PVE.Utils.format_boolean,
dataIndex: 'nofailback'
},
{
header: gettext('Nodes'),
width: 500,
sortable: false,
dataIndex: 'nodes'
},
{
header: gettext('Description'),
flex: 1,
dataIndex: 'comment'
}
],
listeners: {
show: reload
// itemdblclick: run_editor
}
});
me.callParent();
}
}, function() {
Ext.define('pve-ha-groups', {
extend: 'Ext.data.Model',
fields: [
'group', 'type', 'restricted', 'digest', 'nofailback',
'nodes', 'comment'
],
idProperty: 'group'
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment