var migrateBtn = Ext.create('Ext.Button', {
text: gettext('Migrate'),
disabled: !caps.vms['VM.Migrate'],
- hidden: PVE.data.ResourceStore.getNodes().length < 2,
+ hidden: PVE.Utils.isStandaloneNode(),
handler: function() {
var win = Ext.create('PVE.window.Migrate', {
vmtype: 'qemu',
}, {
text: gettext('Stop'),
disabled: !caps.vms['VM.PowerMgmt'],
- dangerous: true,
tooltip: Ext.String.format(gettext('Stop {0} immediately'), 'VM'),
- confirmMsg: Proxmox.Utils.format_task_description('qmstop', vmid),
handler: function() {
- vm_command("stop", { timeout: 30 });
+ Ext.create('PVE.GuestStop', {
+ nodename: nodename,
+ vm: vm,
+ autoShow: true,
+ });
},
iconCls: 'fa fa-stop',
}, {
let tagsContainer = Ext.create('PVE.panel.TagEditContainer', {
tags: vm.tags,
+ canEdit: !!caps.vms['VM.Config.Options'],
listeners: {
change: function(tags) {
Proxmox.Utils.API2Request({
});
}
- if (caps.vms['VM.Console']) {
+ if (caps.vms['VM.Audit']) {
me.items.push(
{
xtype: 'pveFirewallRules',
list_refs_url: base_url + '/firewall/refs',
itemId: 'firewall-ipset',
},
- {
+ );
+ }
+
+ if (caps.vms['VM.Console']) {
+ me.items.push(
+ {
title: gettext('Log'),
groups: ['firewall'],
iconCls: 'fa fa-list',
itemId: 'firewall-fwlog',
xtype: 'proxmoxLogView',
url: '/api2/extjs' + base_url + '/firewall/log',
+ log_select_timespan: true,
+ submitFormat: 'U',
},
);
}