mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-15 05:01:31 +00:00
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.
This commit is contained in:
parent
4e2b6cc8ee
commit
c8fc7a4eee
@ -73,6 +73,15 @@ Ext.define('PVE.qemu.Config', {
|
|||||||
iconCls: 'fa fa-send-o'
|
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', {
|
var resetBtn = Ext.create('PVE.button.Button', {
|
||||||
text: gettext('Reset'),
|
text: gettext('Reset'),
|
||||||
disabled: !caps.vms['VM.PowerMgmt'],
|
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 + "'"),
|
title: Ext.String.format(gettext("Virtual Machine {0} on node {1}"), descr, "'" + nodename + "'"),
|
||||||
hstateid: 'kvmtab',
|
hstateid: 'kvmtab',
|
||||||
tbar: [ resumeBtn, startBtn, shutdownBtn, resetBtn,
|
tbar: [ resumeBtn, startBtn, shutdownBtn, resetBtn,
|
||||||
removeBtn, migrateBtn, consoleBtn],
|
removeBtn, migrateBtn, cloneBtn, consoleBtn],
|
||||||
defaults: { statusStore: me.statusStore },
|
defaults: { statusStore: me.statusStore },
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user