mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 00:38:28 +00:00
add ha fencing panel (dummy for now)
This commit is contained in:
parent
02d79a0cc0
commit
3bcf3dda1d
@ -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 \
|
||||
|
47
www/manager/ha/Fencing.js
Normal file
47
www/manager/ha/Fencing.js
Normal file
@ -0,0 +1,47 @@
|
||||
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'
|
||||
]
|
||||
});
|
||||
|
||||
});
|
85
www/manager/ha/Groups.js
Normal file
85
www/manager/ha/Groups.js
Normal file
@ -0,0 +1,85 @@
|
||||
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'
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue
Block a user