[pve-devel] [PATCH novnc] added new parameter to pass a command to the newly opened terminal

Tim Marx t.marx at proxmox.com
Thu Jan 10 13:55:13 CET 2019


Signed-off-by: Tim Marx <t.marx at proxmox.com>
---
 .../patches/0012-pass-custom-command-to-vnc.patch  | 38 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 39 insertions(+)
 create mode 100644 debian/patches/0012-pass-custom-command-to-vnc.patch

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
index 0000000..c836b5b
--- /dev/null
+++ b/debian/patches/0012-pass-custom-command-to-vnc.patch
@@ -0,0 +1,38 @@
+From bc515ecef9162774bff846e362b4c8315032ea2a Mon Sep 17 00:00:00 2001
+From: Tim Marx <t.marx at 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 at 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
+
diff --git a/debian/patches/series b/debian/patches/series
index 5f92a77..1cc9d2a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -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
-- 
2.11.0




More information about the pve-devel mailing list