From c8fc7a4eeef5ab8ee79c89ec56f71aeb9e70262a Mon Sep 17 00:00:00 2001 From: Emmanuel Kasper Date: Mon, 6 Feb 2017 19:03:27 +0100 Subject: [PATCH] Add a clone button in the VM toolbar Up to now the Migrate function had a first class button in the toolbar, but the Clone function didn't. With this button the toolbar still fit correctly in a smaller 1280 pixel wide display. --- www/manager6/qemu/Config.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/www/manager6/qemu/Config.js b/www/manager6/qemu/Config.js index aaf0ecad..5aac1313 100644 --- a/www/manager6/qemu/Config.js +++ b/www/manager6/qemu/Config.js @@ -73,6 +73,15 @@ Ext.define('PVE.qemu.Config', { iconCls: 'fa fa-send-o' }); + var cloneBtn = Ext.create('Ext.Button', { + text: gettext('Clone'), + iconCls: 'fa fa-fw fa-clone', + hidden: caps.vms['VM.Clone'] ? false : true, + handler: function() { + PVE.window.Clone.wrap(nodename, vmid, template); + } + }); + var resetBtn = Ext.create('PVE.button.Button', { text: gettext('Reset'), disabled: !caps.vms['VM.PowerMgmt'], @@ -134,7 +143,7 @@ Ext.define('PVE.qemu.Config', { title: Ext.String.format(gettext("Virtual Machine {0} on node {1}"), descr, "'" + nodename + "'"), hstateid: 'kvmtab', tbar: [ resumeBtn, startBtn, shutdownBtn, resetBtn, - removeBtn, migrateBtn, consoleBtn], + removeBtn, migrateBtn, cloneBtn, consoleBtn], defaults: { statusStore: me.statusStore }, items: [ {