From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id D97A4852A5 for ; Fri, 17 Dec 2021 11:20:43 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CC0B129D13 for ; Fri, 17 Dec 2021 11:20:13 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id B76B229D07 for ; Fri, 17 Dec 2021 11:20:09 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 83435453A3 for ; Fri, 17 Dec 2021 11:20:03 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Fri, 17 Dec 2021 11:19:57 +0100 Message-Id: <20211217101959.1708181-3-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211217101959.1708181-1-d.csapak@proxmox.com> References: <20211217101959.1708181-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.355 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LOTSOFHASH 0.25 Emails with lots of hash-like gibberish KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [api.md] Subject: [pve-devel] [PATCH novnc 2/4] rebase patches for 1.3.0 X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Dec 2021 10:20:43 -0000 Signed-off-by: Dominik Csapak --- .../0001-add-PVE-specific-JS-code.patch | 26 +-- ...002-add-custom-fbresize-event-on-rfb.patch | 10 +- ...nge-scaling-when-toggling-fullscreen.patch | 6 +- debian/patches/0004-add-pve-style.patch | 8 +- debian/patches/0005-remove-vnc-logos.patch | 8 +- ...rectory-for-fetching-images-js-files.patch | 66 ++++---- .../patches/0007-add-pve-vnc-commands.patch | 4 +- ...add-replaceable-snippets-in-vnc.html.patch | 20 +-- .../0010-add-localCursor-setting-to-rfb.patch | 155 ++++++++++++++++++ debian/patches/0010-use-only-app.js.patch | 19 +-- .../0011-add-localCursor-setting-to-rfb.patch | 30 ++-- .../0011-pass-custom-command-to-vnc.patch | 39 +++++ ...ove-the-default-value-of-wsProtocols.patch | 48 ++++++ debian/patches/0013- | 0 ...ove-the-default-value-of-wsProtocols.patch | 6 +- ...passing-deprecated-upgrade-parameter.patch | 27 +++ ...passing-deprecated-upgrade-parameter.patch | 1 - ...-create-own-class-for-hidden-buttons.patch | 61 +++++++ 18 files changed, 427 insertions(+), 107 deletions(-) create mode 100644 debian/patches/0010-add-localCursor-setting-to-rfb.patch create mode 100644 debian/patches/0011-pass-custom-command-to-vnc.patch create mode 100644 debian/patches/0012-Revert-Remove-the-default-value-of-wsProtocols.patch create mode 100644 debian/patches/0013- create mode 100644 debian/patches/0013-avoid-passing-deprecated-upgrade-parameter.patch create mode 100644 debian/patches/0014-create-own-class-for-hidden-buttons.patch diff --git a/debian/patches/0001-add-PVE-specific-JS-code.patch b/debian/patches/0001-add-PVE-specific-JS-code.patch index 22dffe7..885b092 100644 --- a/debian/patches/0001-add-PVE-specific-JS-code.patch +++ b/debian/patches/0001-add-PVE-specific-JS-code.patch @@ -443,7 +443,7 @@ index 0000000..e2c37fb + }, +}; diff --git a/app/ui.js b/app/ui.js -index c70743d..317f845 100644 +index cb6a9fd..6b4442f 100644 --- a/app/ui.js +++ b/app/ui.js @@ -16,6 +16,7 @@ import keysyms from "../core/input/keysymdef.js"; @@ -463,7 +463,7 @@ index c70743d..317f845 100644 UI.initSettings(); // Translate the DOM -@@ -94,6 +97,9 @@ const UI = { +@@ -100,6 +103,9 @@ const UI = { UI.addConnectionControlHandlers(); UI.addClipboardHandlers(); UI.addSettingsHandlers(); @@ -473,7 +473,7 @@ index c70743d..317f845 100644 document.getElementById("noVNC_status") .addEventListener('click', UI.hideStatus); -@@ -102,19 +108,15 @@ const UI = { +@@ -108,19 +114,15 @@ const UI = { UI.openControlbar(); @@ -497,7 +497,7 @@ index c70743d..317f845 100644 return Promise.resolve(UI.rfb); }, -@@ -158,11 +160,12 @@ const UI = { +@@ -164,11 +166,12 @@ const UI = { /* Populate the controls if defaults are provided in the URL */ UI.initSetting('host', window.location.hostname); UI.initSetting('port', port); @@ -511,7 +511,7 @@ index c70743d..317f845 100644 UI.initSetting('shared', true); UI.initSetting('view_only', false); UI.initSetting('show_dot', false); -@@ -341,6 +344,7 @@ const UI = { +@@ -347,6 +350,7 @@ const UI = { UI.addSettingChangeHandler('resize'); UI.addSettingChangeHandler('resize', UI.applyResizeMode); UI.addSettingChangeHandler('resize', UI.updateViewClip); @@ -519,7 +519,7 @@ index c70743d..317f845 100644 UI.addSettingChangeHandler('quality'); UI.addSettingChangeHandler('quality', UI.updateQuality); UI.addSettingChangeHandler('compression'); -@@ -395,6 +399,9 @@ const UI = { +@@ -401,6 +405,9 @@ const UI = { document.documentElement.classList.add("noVNC_connecting"); break; case 'connected': @@ -529,7 +529,7 @@ index c70743d..317f845 100644 document.documentElement.classList.add("noVNC_connected"); break; case 'disconnecting': -@@ -402,6 +409,11 @@ const UI = { +@@ -408,6 +415,11 @@ const UI = { document.documentElement.classList.add("noVNC_disconnecting"); break; case 'disconnected': @@ -541,7 +541,7 @@ index c70743d..317f845 100644 break; case 'reconnecting': transitionElem.textContent = _("Reconnecting..."); -@@ -820,6 +832,7 @@ const UI = { +@@ -821,6 +833,7 @@ const UI = { UI.closePowerPanel(); UI.closeClipboardPanel(); UI.closeExtraKeys(); @@ -549,7 +549,7 @@ index c70743d..317f845 100644 }, /* ------^------- -@@ -997,6 +1010,12 @@ const UI = { +@@ -998,6 +1011,12 @@ const UI = { UI.reconnectPassword = password; } @@ -562,7 +562,7 @@ index c70743d..317f845 100644 if (password === null) { password = undefined; } -@@ -1621,9 +1640,36 @@ const UI = { +@@ -1622,9 +1641,36 @@ const UI = { /* ------^------- * /EXTRA KEYS * ============== @@ -601,10 +601,10 @@ index c70743d..317f845 100644 if (!UI.rfb) return; UI.rfb.viewOnly = UI.getSetting('view_only'); diff --git a/vnc.html b/vnc.html -index 32f356f..5ec354a 100644 +index 8d4b497..7ce9ba7 100644 --- a/vnc.html +++ b/vnc.html -@@ -171,7 +171,7 @@ +@@ -163,7 +163,7 @@
  • Settings
  • @@ -613,7 +613,7 @@ index 32f356f..5ec354a 100644
  • -@@ -181,16 +181,18 @@ +@@ -173,16 +173,18 @@
  • diff --git a/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch b/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch index 50c3d6e..48de338 100644 --- a/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch +++ b/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch @@ -13,10 +13,10 @@ Signed-off-by: Dominik Csapak 2 files changed, 21 insertions(+) diff --git a/app/ui.js b/app/ui.js -index 317f845..91bdcf4 100644 +index 6b4442f..11fad2d 100644 --- a/app/ui.js +++ b/app/ui.js -@@ -1054,6 +1054,7 @@ const UI = { +@@ -1055,6 +1055,7 @@ const UI = { UI.rfb.addEventListener("clipboard", UI.clipboardReceive); UI.rfb.addEventListener("bell", UI.bell); UI.rfb.addEventListener("desktopname", UI.updateDesktopName); @@ -24,7 +24,7 @@ index 317f845..91bdcf4 100644 UI.rfb.clipViewport = UI.getSetting('view_clip'); UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale'; UI.rfb.resizeSession = UI.getSetting('resize') === 'remote'; -@@ -1665,6 +1666,16 @@ const UI = { +@@ -1666,6 +1667,16 @@ const UI = { document.getElementById('pve_commands_button').classList.remove("noVNC_selected"); }, @@ -42,10 +42,10 @@ index 317f845..91bdcf4 100644 * /PVE * ============== diff --git a/core/rfb.js b/core/rfb.js -index f35d503..7ea2004 100644 +index ea3bf58..90ca28b 100644 --- a/core/rfb.js +++ b/core/rfb.js -@@ -2492,6 +2492,16 @@ export default class RFB extends EventTargetMixin { +@@ -2499,6 +2499,16 @@ export default class RFB extends EventTargetMixin { this._updateClip(); this._updateScale(); diff --git a/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch b/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch index f9ec196..4b7d4b9 100644 --- a/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch +++ b/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch @@ -12,10 +12,10 @@ Signed-off-by: Dominik Csapak 1 file changed, 11 insertions(+) diff --git a/app/ui.js b/app/ui.js -index 91bdcf4..ef2c77f 100644 +index 11fad2d..b40d1f8 100644 --- a/app/ui.js +++ b/app/ui.js -@@ -1239,6 +1239,13 @@ const UI = { +@@ -1240,6 +1240,13 @@ const UI = { } else if (document.msExitFullscreen) { document.msExitFullscreen(); } @@ -29,7 +29,7 @@ index 91bdcf4..ef2c77f 100644 } else { if (document.documentElement.requestFullscreen) { document.documentElement.requestFullscreen(); -@@ -1249,7 +1256,11 @@ const UI = { +@@ -1250,7 +1257,11 @@ const UI = { } else if (document.body.msRequestFullscreen) { document.body.msRequestFullscreen(); } diff --git a/debian/patches/0004-add-pve-style.patch b/debian/patches/0004-add-pve-style.patch index 1a44edf..f704814 100644 --- a/debian/patches/0004-add-pve-style.patch +++ b/debian/patches/0004-add-pve-style.patch @@ -64,10 +64,10 @@ index 0000000..eaeb5cb + background: #5BA8DF; +} diff --git a/vnc.html b/vnc.html -index 5ec354a..a49e3a2 100644 +index 7ce9ba7..61d0fdd 100644 --- a/vnc.html +++ b/vnc.html -@@ -52,7 +52,8 @@ +@@ -48,7 +48,8 @@ @@ -75,5 +75,5 @@ index 5ec354a..a49e3a2 100644 + + - - + + diff --git a/debian/patches/0005-remove-vnc-logos.patch b/debian/patches/0005-remove-vnc-logos.patch index dae5b78..6464751 100644 --- a/debian/patches/0005-remove-vnc-logos.patch +++ b/debian/patches/0005-remove-vnc-logos.patch @@ -11,12 +11,12 @@ Signed-off-by: Dominik Csapak 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/vnc.html b/vnc.html -index a49e3a2..12db665 100644 +index 61d0fdd..216b33f 100644 --- a/vnc.html +++ b/vnc.html -@@ -21,36 +21,10 @@ - Remove this if you use the .htaccess --> - +@@ -17,36 +17,10 @@ + + - - diff --git a/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch b/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch index d14dabc..88e1514 100644 --- a/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch +++ b/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch @@ -9,36 +9,36 @@ also change the directory in the build script Signed-off-by: Dominik Csapak --- app/ui.js | 4 ++-- - vnc.html | 50 +++++++++++++++++++++++++------------------------- - 2 files changed, 27 insertions(+), 27 deletions(-) + vnc.html | 52 ++++++++++++++++++++++++++-------------------------- + 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/app/ui.js b/app/ui.js -index ef2c77f..1605565 100644 +index b40d1f8..f7b7dc4 100644 --- a/app/ui.js +++ b/app/ui.js @@ -64,7 +64,7 @@ const UI = { // Translate the DOM l10n.translateDOM(); -- WebUtil.fetchJSON('./package.json') -+ WebUtil.fetchJSON('/novnc/package.json') - .then((packageInfo) => { - Array.from(document.getElementsByClassName('noVNC_version')).forEach(el => el.innerText = packageInfo.version); - }) -@@ -1767,7 +1767,7 @@ l10n.setup(LINGUAS); +- fetch('./package.json') ++ fetch('/novnc/package.json') + .then((response) => { + if (!response.ok) { + throw Error("" + response.status + " " + response.statusText); +@@ -1768,7 +1768,7 @@ l10n.setup(LINGUAS); if (l10n.language === "en" || l10n.dictionary !== undefined) { UI.prime(); } else { -- WebUtil.fetchJSON('app/locale/' + l10n.language + '.json') -+ WebUtil.fetchJSON('/novnc/app/locale/' + l10n.language + '.json') - .then((translations) => { l10n.dictionary = translations; }) - .catch(err => Log.Error("Failed to load translations: " + err)) - .then(UI.prime); +- fetch('app/locale/' + l10n.language + '.json') ++ fetch('/novnc/app/locale/' + l10n.language + '.json') + .then((response) => { + if (!response.ok) { + throw Error("" + response.status + " " + response.statusText); diff --git a/vnc.html b/vnc.html -index 12db665..396ded8 100644 +index 216b33f..8ca4ea4 100644 --- a/vnc.html +++ b/vnc.html -@@ -26,19 +26,19 @@ +@@ -22,16 +22,16 @@ @@ -46,24 +46,22 @@ index 12db665..396ded8 100644 + - -- -+ + +- +- +- ++ ++ ++ - - -- -+ - -- -+ - +- - ++ + - -@@ -63,51 +63,51 @@ + +@@ -55,51 +55,51 @@

    no
    VNC

    @@ -126,7 +124,7 @@ index 12db665..396ded8 100644 -@@ -116,13 +116,13 @@ +@@ -108,13 +108,13 @@ @@ -142,7 +140,7 @@ index 12db665..396ded8 100644
    -@@ -132,19 +132,19 @@ +@@ -124,19 +124,19 @@ @@ -165,7 +163,7 @@ index 12db665..396ded8 100644
  • -@@ -235,7 +235,7 @@ +@@ -227,7 +227,7 @@ @@ -174,7 +172,7 @@ index 12db665..396ded8 100644 id="noVNC_disconnect_button" class="noVNC_button" title="Disconnect"> -@@ -254,7 +254,7 @@ +@@ -246,7 +246,7 @@
    @@ -183,7 +181,7 @@ index 12db665..396ded8 100644
    -@@ -298,8 +298,8 @@ +@@ -290,8 +290,8 @@
  • + +
  • ++
  • ++ ++
  • +
  • + +
  • +-- +2.30.2 + diff --git a/debian/patches/0010-use-only-app.js.patch b/debian/patches/0010-use-only-app.js.patch index 95adac7..7355b7c 100644 --- a/debian/patches/0010-use-only-app.js.patch +++ b/debian/patches/0010-use-only-app.js.patch @@ -8,24 +8,19 @@ generated app.js Signed-off-by: Dominik Csapak --- - vnc.html | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) + vnc.html | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnc.html b/vnc.html -index 5f09cd2..9f594e2 100644 +index dc4cc23..21b3844 100644 --- a/vnc.html +++ b/vnc.html -@@ -39,12 +39,7 @@ +@@ -37,7 +37,7 @@ + PVE.CSRFPreventionToken = '[% token %]'; + INCLUDE_URI='/novnc/include'; - - -- -- -- -- -- - + - + diff --git a/debian/patches/0011-add-localCursor-setting-to-rfb.patch b/debian/patches/0011-add-localCursor-setting-to-rfb.patch index e0301da..2789889 100644 --- a/debian/patches/0011-add-localCursor-setting-to-rfb.patch +++ b/debian/patches/0011-add-localCursor-setting-to-rfb.patch @@ -15,10 +15,10 @@ Signed-off-by: Thomas Lamprecht 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/app/ui.js b/app/ui.js -index d604067..d8126bc 100644 +index f7b7dc4..37a0279 100644 --- a/app/ui.js +++ b/app/ui.js -@@ -166,6 +166,7 @@ const UI = { +@@ -172,6 +172,7 @@ const UI = { UI.initSetting('quality', 6); UI.initSetting('compression', 2); UI.initSetting('autoresize', true); @@ -26,7 +26,7 @@ index d604067..d8126bc 100644 UI.initSetting('shared', true); UI.initSetting('view_only', false); UI.initSetting('show_dot', false); -@@ -356,6 +357,8 @@ const UI = { +@@ -362,6 +363,8 @@ const UI = { UI.addSettingChangeHandler('view_only', UI.updateViewOnly); UI.addSettingChangeHandler('show_dot'); UI.addSettingChangeHandler('show_dot', UI.updateShowDotCursor); @@ -35,7 +35,7 @@ index d604067..d8126bc 100644 UI.addSettingChangeHandler('host'); UI.addSettingChangeHandler('port'); UI.addSettingChangeHandler('path'); -@@ -1056,6 +1059,7 @@ const UI = { +@@ -1057,6 +1060,7 @@ const UI = { UI.rfb.addEventListener("desktopname", UI.updateDesktopName); UI.rfb.addEventListener("fbresize", UI.updateSessionSize); UI.rfb.clipViewport = UI.getSetting('view_clip'); @@ -43,7 +43,7 @@ index d604067..d8126bc 100644 UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale'; UI.rfb.resizeSession = UI.getSetting('resize') === 'remote'; UI.rfb.qualityLevel = parseInt(UI.getSetting('quality')); -@@ -1692,6 +1696,12 @@ const UI = { +@@ -1693,6 +1697,12 @@ const UI = { * ============== * MISC * ------v------*/ @@ -57,10 +57,10 @@ index d604067..d8126bc 100644 if (!UI.rfb) return; UI.rfb.viewOnly = UI.getSetting('view_only'); diff --git a/core/rfb.js b/core/rfb.js -index 7ea2004..85c7836 100644 +index 90ca28b..ec75610 100644 --- a/core/rfb.js +++ b/core/rfb.js -@@ -296,6 +296,7 @@ export default class RFB extends EventTargetMixin { +@@ -256,6 +256,7 @@ export default class RFB extends EventTargetMixin { this._clipViewport = false; this._scaleViewport = false; this._resizeSession = false; @@ -68,7 +68,7 @@ index 7ea2004..85c7836 100644 this._showDotCursor = false; if (options.showDotCursor !== undefined) { -@@ -356,6 +357,15 @@ export default class RFB extends EventTargetMixin { +@@ -316,6 +317,15 @@ export default class RFB extends EventTargetMixin { } } @@ -85,7 +85,7 @@ index 7ea2004..85c7836 100644 set showDotCursor(show) { this._showDotCursor = show; diff --git a/core/util/cursor.js b/core/util/cursor.js -index 4db1dab..e5b1768 100644 +index 12bcced..ce7340e 100644 --- a/core/util/cursor.js +++ b/core/util/cursor.js @@ -12,6 +12,8 @@ export default class Cursor { @@ -97,7 +97,7 @@ index 4db1dab..e5b1768 100644 this._canvas = document.createElement('canvas'); if (useFallback) { -@@ -110,7 +112,7 @@ export default class Cursor { +@@ -100,7 +102,7 @@ export default class Cursor { } clear() { @@ -106,7 +106,7 @@ index 4db1dab..e5b1768 100644 this._canvas.width = 0; this._canvas.height = 0; this._position.x = this._position.x + this._hotSpot.x; -@@ -140,6 +142,11 @@ export default class Cursor { +@@ -130,6 +132,11 @@ export default class Cursor { this._updateVisibility(target); } @@ -118,7 +118,7 @@ index 4db1dab..e5b1768 100644 _handleMouseOver(event) { // This event could be because we're entering the target, or // moving around amongst its sub elements. Let the move handler -@@ -192,6 +199,11 @@ export default class Cursor { +@@ -182,6 +189,11 @@ export default class Cursor { } } @@ -130,17 +130,17 @@ index 4db1dab..e5b1768 100644 _showCursor() { if (this._canvas.style.visibility === 'hidden') { this._canvas.style.visibility = ''; -@@ -250,4 +262,5 @@ export default class Cursor { +@@ -240,4 +252,5 @@ export default class Cursor { return document.captureElement && document.documentElement.contains(document.captureElement); } + } diff --git a/vnc.html b/vnc.html -index 9f594e2..bf1fde5 100644 +index 21b3844..3e63087 100644 --- a/vnc.html +++ b/vnc.html -@@ -157,6 +157,9 @@ +@@ -154,6 +154,9 @@
  • diff --git a/debian/patches/0011-pass-custom-command-to-vnc.patch b/debian/patches/0011-pass-custom-command-to-vnc.patch new file mode 100644 index 0000000..7bb13ce --- /dev/null +++ b/debian/patches/0011-pass-custom-command-to-vnc.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tim Marx +Date: Fri, 21 Dec 2018 11:46:13 +0100 +Subject: [PATCH] pass custom command to vnc + +Signed-off-by: Tim Marx +Signed-off-by: Dominik Csapak +--- + 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; +@@ -46,6 +47,12 @@ export default function PVEUI(UI){ + url = baseUrl + '/vncshell'; + 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'; +-- +2.30.2 + diff --git a/debian/patches/0012-Revert-Remove-the-default-value-of-wsProtocols.patch b/debian/patches/0012-Revert-Remove-the-default-value-of-wsProtocols.patch new file mode 100644 index 0000000..f5ab5eb --- /dev/null +++ b/debian/patches/0012-Revert-Remove-the-default-value-of-wsProtocols.patch @@ -0,0 +1,48 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Thomas Lamprecht +Date: Mon, 17 May 2021 09:43:35 +0200 +Subject: [PATCH] Revert "Remove the default value of wsProtocols" + +This reverts commit c912230309806aacbae4295faf7ad6406da97617. + +We very-much depend on the WS protocol default of 'binary', for now +lets just revert it here, albeit it could be externally set.. + +Signed-off-by: Thomas Lamprecht +Signed-off-by: Dominik Csapak +--- + core/rfb.js | 3 ++- + docs/API.md | 3 +-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/core/rfb.js b/core/rfb.js +index ec75610..96617b9 100644 +--- a/core/rfb.js ++++ b/core/rfb.js +@@ -91,7 +91,8 @@ export default class RFB extends EventTargetMixin { + this._rfbCredentials = options.credentials || {}; + this._shared = 'shared' in options ? !!options.shared : true; + this._repeaterID = options.repeaterID || ''; +- this._wsProtocols = options.wsProtocols || []; ++ this._wsProtocols = options.wsProtocols || ['binary']; ++ this._showDotCursor = options.showDotCursor || false; + + // Internal state + this._rfbConnectionState = ''; +diff --git a/docs/API.md b/docs/API.md +index aa5aea7..623d685 100644 +--- a/docs/API.md ++++ b/docs/API.md +@@ -195,8 +195,7 @@ connection to a specified VNC server. + encountered. + + `wsProtocols` +- - An `Array` of `DOMString`s specifying the sub-protocols to use +- in the WebSocket connection. Empty by default. ++ - Protocols to use in the WebSocket connection, the default is: ['binary'] + + #### connect + +-- +2.30.2 + diff --git a/debian/patches/0013- b/debian/patches/0013- new file mode 100644 index 0000000..e69de29 diff --git a/debian/patches/0013-Revert-Remove-the-default-value-of-wsProtocols.patch b/debian/patches/0013-Revert-Remove-the-default-value-of-wsProtocols.patch index e73bc59..d96976b 100644 --- a/debian/patches/0013-Revert-Remove-the-default-value-of-wsProtocols.patch +++ b/debian/patches/0013-Revert-Remove-the-default-value-of-wsProtocols.patch @@ -15,10 +15,10 @@ Signed-off-by: Thomas Lamprecht 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/rfb.js b/core/rfb.js -index 85c7836..f049246 100644 +index ec75610..96617b9 100644 --- a/core/rfb.js +++ b/core/rfb.js -@@ -87,7 +87,8 @@ export default class RFB extends EventTargetMixin { +@@ -91,7 +91,8 @@ export default class RFB extends EventTargetMixin { this._rfbCredentials = options.credentials || {}; this._shared = 'shared' in options ? !!options.shared : true; this._repeaterID = options.repeaterID || ''; @@ -29,7 +29,7 @@ index 85c7836..f049246 100644 // Internal state this._rfbConnectionState = ''; diff --git a/docs/API.md b/docs/API.md -index d78360a..d55a234 100644 +index aa5aea7..623d685 100644 --- a/docs/API.md +++ b/docs/API.md @@ -195,8 +195,7 @@ connection to a specified VNC server. diff --git a/debian/patches/0013-avoid-passing-deprecated-upgrade-parameter.patch b/debian/patches/0013-avoid-passing-deprecated-upgrade-parameter.patch new file mode 100644 index 0000000..06c5f58 --- /dev/null +++ b/debian/patches/0013-avoid-passing-deprecated-upgrade-parameter.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Fabian Ebner +Date: Fri, 4 Jun 2021 08:27:23 +0200 +Subject: [PATCH] avoid passing deprecated 'upgrade' parameter + +Signed-off-by: Fabian Ebner +Signed-off-by: Dominik Csapak +--- + app/pve.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/app/pve.js b/app/pve.js +index 9cf4b09..0ab825a 100644 +--- a/app/pve.js ++++ b/app/pve.js +@@ -45,7 +45,7 @@ export default function PVEUI(UI){ + break; + case 'upgrade': + url = baseUrl + '/vncshell'; +- params.upgrade = 1; ++ params.cmd = 'upgrade'; + title = 'System upgrade on node ' + this.nodename; + break; + case 'cmd': +-- +2.30.2 + diff --git a/debian/patches/0014-avoid-passing-deprecated-upgrade-parameter.patch b/debian/patches/0014-avoid-passing-deprecated-upgrade-parameter.patch index 3e03c2a..b84a5c3 100644 --- a/debian/patches/0014-avoid-passing-deprecated-upgrade-parameter.patch +++ b/debian/patches/0014-avoid-passing-deprecated-upgrade-parameter.patch @@ -21,4 +21,3 @@ index 9cf4b09..0ab825a 100644 title = 'System upgrade on node ' + this.nodename; break; case 'cmd': - diff --git a/debian/patches/0014-create-own-class-for-hidden-buttons.patch b/debian/patches/0014-create-own-class-for-hidden-buttons.patch new file mode 100644 index 0000000..41cdecb --- /dev/null +++ b/debian/patches/0014-create-own-class-for-hidden-buttons.patch @@ -0,0 +1,61 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Dominik Csapak +Date: Thu, 16 Dec 2021 14:31:20 +0100 +Subject: [PATCH] create own class for hidden buttons + +since novnc itself sometimes triggers a removal of their '_hidden' +class, even if we hid it. This way the buttons stay hidden even then. + +Signed-off-by: Dominik Csapak +--- + app/pve.js | 8 ++++---- + app/styles/pve.css | 4 ++++ + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/app/pve.js b/app/pve.js +index 0ab825a..486bd5c 100644 +--- a/app/pve.js ++++ b/app/pve.js +@@ -293,15 +293,15 @@ PVEUI.prototype = { + + // show/hide the buttons + document.getElementById('noVNC_disconnect_button') +- .classList.add('noVNC_hidden'); ++ .classList.add('pve_hidden'); + if (me.consoletype === 'kvm') { + document.getElementById('noVNC_clipboard_button') +- .classList.add('noVNC_hidden'); ++ .classList.add('pve_hidden'); + } + + if (me.consoletype === 'shell' || me.consoletype === 'upgrade') { + document.getElementById('pve_commands_button') +- .classList.add('noVNC_hidden'); ++ .classList.add('pve_hidden'); + } + + // add command logic +@@ -326,7 +326,7 @@ PVEUI.prototype = { + me.pve_vm_command(item.cmd); + }; + } else { +- el.classList.add('noVNC_hidden'); ++ el.classList.add('pve_hidden'); + } + }); + }, +diff --git a/app/styles/pve.css b/app/styles/pve.css +index eaeb5cb..18126b0 100644 +--- a/app/styles/pve.css ++++ b/app/styles/pve.css +@@ -40,3 +40,7 @@ + border-color: rgba(0, 0, 0, 0.4); + background: #5BA8DF; + } ++ ++.noVNC_button.pve_hidden { ++ display: none; ++} +-- +2.30.2 + -- 2.30.2