From: "Dominic Jäger" <d.jaeger@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 3/6 v2] gui: Add button & cmdmenu
Date: Fri, 20 Nov 2020 10:38:09 +0100 [thread overview]
Message-ID: <20201120093812.65554-4-d.jaeger@proxmox.com> (raw)
In-Reply-To: <20201120093812.65554-1-d.jaeger@proxmox.com>
---
v2: unchanged
www/manager6/Workspace.js | 15 +++++++++++++++
| 12 ++++++++++++
2 files changed, 27 insertions(+)
diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index 3d0f3fec..6ee7c957 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -282,11 +282,25 @@ Ext.define('PVE.StdWorkspace', {
}
});
+ var importVM = Ext.createWidget('button', {
+ pack: 'end',
+ margin: '3 5 0 0',
+ baseCls: 'x-btn',
+ iconCls: 'fa fa-desktop',
+ text: gettext("Import VM"),
+ disabled: !caps.vms['VM.Allocate'],
+ handler: function() {
+ var wiz = Ext.create('PVE.qemu.ImportWizard', {});
+ wiz.show();
+ }
+ });
+
sprovider.on('statechange', function(sp, key, value) {
if (key === 'GuiCap' && value) {
caps = value;
createVM.setDisabled(!caps.vms['VM.Allocate']);
createCT.setDisabled(!caps.vms['VM.Allocate']);
+ importVM.setDisabled(!caps.vms['VM.Allocate']);
}
});
@@ -334,6 +348,7 @@ Ext.define('PVE.StdWorkspace', {
},
createVM,
createCT,
+ importVM,
{
pack: 'end',
margin: '0 5 0 0',
--git a/www/manager6/node/CmdMenu.js b/www/manager6/node/CmdMenu.js
index f718f69a..9bc27155 100644
--- a/www/manager6/node/CmdMenu.js
+++ b/www/manager6/node/CmdMenu.js
@@ -29,6 +29,18 @@ Ext.define('PVE.node.CmdMenu', {
wiz.show();
}
},
+ {
+ text: gettext("Import VM"),
+ itemId: 'importvm',
+ iconCls: 'fa fa-cube',
+ handler: function() {
+ var me = this.up('menu');
+ var wiz = Ext.create('PVE.qemu.ImportWizard', {
+ nodename: me.nodename
+ });
+ wiz.show();
+ }
+ },
{ xtype: 'menuseparator' },
{
text: gettext('Bulk Start'),
--
2.20.1
next prev parent reply other threads:[~2020-11-20 9:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-20 9:38 [pve-devel] [PATCH qemu-server 0/1 v2] Importwizard Dominic Jäger
2020-11-20 9:38 ` [pve-devel] [PATCH qemu-server 1/6 v2] Move importdisk from qm to API Dominic Jäger
2020-11-20 9:38 ` [pve-devel] [PATCH manager 2/6 v2] gui: Hardware View: Add GUI for importdisk Dominic Jäger
2020-11-20 9:38 ` Dominic Jäger [this message]
2020-11-20 9:38 ` [pve-devel] [PATCH manager 4/6 v2] gui: Add import VM wizard Dominic Jäger
2020-11-20 9:38 ` [pve-devel] [PATCH manager 5/6 v2] importwizard: Move buttons from bottom bar into panel Dominic Jäger
2020-11-20 9:38 ` [pve-devel] [PATCH manager 6/6 v2] importdisk gui: Make storages selectable again Dominic Jäger
2020-11-23 13:21 ` [pve-devel] [PATCH qemu-server 0/1 v2] Importwizard Oguz Bektas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201120093812.65554-4-d.jaeger@proxmox.com \
--to=d.jaeger@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox