initComponent : function() {
var me = this;
+ var caps = Ext.state.Manager.get('GuiCap');
+
var store = new Ext.data.Store({
model: 'pve-ha-groups',
sorters: {
tbar: [
{
text: gettext('Create'),
+ disabled: !caps.nodes['Sys.Console'],
handler: function() {
var win = Ext.create('PVE.ha.GroupEdit',{});
win.on('destroy', reload);
],
listeners: {
show: reload,
+ beforeselect: function(grid, record, index, eOpts) {
+ if (!caps.nodes['Sys.Console']) {
+ return false;
+ }
+ },
itemdblclick: run_editor
}
});
initComponent : function() {
var me = this;
+ var caps = Ext.state.Manager.get('GuiCap');
+
var store = new Ext.data.Store({
model: 'pve-ha-resources',
proxy: {
tbar: [
{
text: gettext('Add'),
+ disabled: !caps.nodes['Sys.Console'],
handler: function() {
var win = Ext.create('PVE.ha.VMResourceEdit',{});
win.on('destroy', reload);
],
listeners: {
show: reload,
+ beforeselect: function(grid, record, index, eOpts) {
+ if (!caps.nodes['Sys.Console']) {
+ return false;
+ }
+ },
itemdblclick: run_editor
}
});