]> git.proxmox.com Git - novnc-pve.git/commitdiff
support new 'cmd' parameter
authorTim Marx <t.marx@proxmox.com>
Wed, 27 Feb 2019 14:01:15 +0000 (15:01 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 28 Feb 2019 10:01:27 +0000 (11:01 +0100)
We want to deprecate the 'upgrade' parameter in favor of a more
general 'cmd' parameter, which is easier to extend, e.g., for
installing pveceph through the WebUI.

Signed-off-by: Tim Marx <t.marx@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/patches/0012-pass-custom-command-to-vnc.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0012-pass-custom-command-to-vnc.patch b/debian/patches/0012-pass-custom-command-to-vnc.patch
new file mode 100644 (file)
index 0000000..c836b5b
--- /dev/null
@@ -0,0 +1,38 @@
+From bc515ecef9162774bff846e362b4c8315032ea2a Mon Sep 17 00:00:00 2001
+From: Tim Marx <t.marx@proxmox.com>
+Date: Fri, 21 Dec 2018 11:46:13 +0100
+Subject: [PATCH 12/12] pass custom command to vnc
+
+Signed-off-by: Tim Marx <t.marx@proxmox.com>
+---
+ app/pve.js | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/app/pve.js b/app/pve.js
+index e2c37fb..9cf4b09 100644
+--- a/app/pve.js
++++ b/app/pve.js
+@@ -11,6 +11,7 @@ export default function PVEUI(UI){
+     this.vmname = WebUtil.getQueryVar('vmname');
+     this.nodename = WebUtil.getQueryVar('node');
+     this.resize = WebUtil.getQueryVar('resize');
++    this.cmd = WebUtil.getQueryVar('cmd');
+     this.lastFBWidth = undefined;
+     this.lastFBHeight = undefined;
+     this.sizeUpdateTimer = undefined;
+@@ -47,6 +48,12 @@ export default function PVEUI(UI){
+           params.upgrade = 1;
+           title = 'System upgrade on node ' + this.nodename;
+           break;
++      case 'cmd':
++          url =  baseUrl + '/vncshell';
++          params.cmd = decodeURI(this.cmd);
++          title = 'Install Ceph on node ' + this.nodename;
++
++          break;
+       default:
+           throw 'implement me';
+           break;
+-- 
+2.11.0
+
index 5f92a7752fb990ba62237910787046c1e0a2ef8f..1cc9d2ab8a9ce775bf660c514ba6ad17820b0f54 100644 (file)
@@ -9,3 +9,4 @@
 0009-decrease-animation-time.patch
 0010-use-only-app.js.patch
 0011-add-localCursor-setting-to-rfb.patch
+0012-pass-custom-command-to-vnc.patch
\ No newline at end of file