xtype: 'pveDcHAConfig',
title: 'HA',
itemId: 'ha'
+ },
+ {
+ xtype: 'pveFirewallPanel',
+ title: gettext('Firewall'),
+ base_url: '/cluster/firewall',
+ fwtype: 'dc',
+ phstateid: me.hstateid,
+ itemId: 'firewall'
}
]);
]);
if (caps.nodes['Sys.Console']) {
- me.items.push([{
- title: gettext('Updates'),
- itemId: 'apt',
- xtype: 'pveNodeAPT',
- nodename: nodename
- }]);
+ me.items.push([
+ {
+ xtype: 'pveFirewallPanel',
+ title: gettext('Firewall'),
+ base_url: '/nodes/' + nodename + '/firewall',
+ fwtype: 'node',
+ phstateid: me.hstateid,
+ itemId: 'firewall'
+ },
+ {
+ title: gettext('Updates'),
+ itemId: 'apt',
+ xtype: 'pveNodeAPT',
+ nodename: nodename
+ }
+ ]);
me.items.push([{
title: 'Ceph',
itemId: 'ceph',
var caps = Ext.state.Manager.get('GuiCap');
+ var base_url = '/nodes/' + nodename + '/openvz/' + vmid;
+
me.statusStore = Ext.create('PVE.data.ObjectStore', {
- url: "/api2/json/nodes/" + nodename + "/openvz/" + vmid + "/status/current",
+ url: '/api2/json' + base_url + '/status/current',
interval: 1000
});
var vm_command = function(cmd, params) {
PVE.Utils.API2Request({
params: params,
- url: '/nodes/' + nodename + '/openvz/' + vmid + "/status/" + cmd,
+ url: base_url + "/status/" + cmd,
waitMsgTarget: me,
method: 'POST',
failure: function(response, opts) {
confirmMsg: Ext.String.format(gettext('Are you sure you want to remove VM {0}? This will permanently erase all VM data.'), vmid),
handler: function() {
PVE.Utils.API2Request({
- url: '/nodes/' + nodename + '/openvz/' + vmid,
+ url: base_url,
method: 'DELETE',
waitMsgTarget: me,
failure: function(response, opts) {
title: 'UBC',
itemId: 'ubc',
xtype: 'pveBeanCounterGrid',
- url: '/api2/json/nodes/' + nodename + '/openvz/' + vmid + '/status/ubc'
+ url: '/api2/json' + base_url + '/status/ubc'
}
]
});
});
}
+ if (caps.vms['VM.Console']) {
+ me.items.push([
+ {
+ xtype: 'pveFirewallPanel',
+ title: gettext('Firewall'),
+ base_url: base_url + '/firewall',
+ fwtype: 'vm',
+ phstateid: me.hstateid,
+ itemId: 'firewall'
+ }
+ ]);
+ }
+
if (caps.vms['Permissions.Modify']) {
me.items.push({
xtype: 'pveACLView',
var caps = Ext.state.Manager.get('GuiCap');
+ var base_url = '/nodes/' + nodename + "/qemu/" + vmid;
+
me.statusStore = Ext.create('PVE.data.ObjectStore', {
- url: "/api2/json/nodes/" + nodename + "/qemu/" + vmid + "/status/current",
+ url: '/api2/json' + base_url + '/status/current',
interval: 1000
});
var vm_command = function(cmd, params) {
PVE.Utils.API2Request({
params: params,
- url: '/nodes/' + nodename + '/qemu/' + vmid + "/status/" + cmd,
+ url: base_url + '/status/' + cmd,
waitMsgTarget: me,
method: 'POST',
failure: function(response, opts) {
confirmMsg: Ext.String.format(gettext('Are you sure you want to remove VM {0}? This will permanently erase all VM data.'), vmid),
handler: function() {
PVE.Utils.API2Request({
- url: '/nodes/' + nodename + '/qemu/' + vmid,
+ url: base_url,
method: 'DELETE',
waitMsgTarget: me,
failure: function(response, opts) {
});
}
+ if (caps.vms['VM.Console']) {
+ me.items.push([
+ {
+ xtype: 'pveFirewallPanel',
+ title: gettext('Firewall'),
+ base_url: base_url + '/firewall',
+ fwtype: 'vm',
+ phstateid: me.hstateid,
+ itemId: 'firewall'
+ }
+ ]);
+ }
+
if (caps.vms['Permissions.Modify']) {
me.items.push({
xtype: 'pveACLView',