From f5779ce4d6ca613f3b8e0d6328336621fc4c5f1d Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Wed, 11 Nov 2015 17:41:03 +0100 Subject: [PATCH] feature #4145: Add vnc button to open in an external tab with pass (cherry picked from commit 940b21b71269ab312b168a286e5bda8e88eeb613) --- src/sunstone/public/app/console/vnc.js | 37 +++++++++++-------- .../app/tabs/vms-tab/dialogs/vnc/html.hbs | 21 +++++++---- src/sunstone/public/app/utils/vnc.js | 4 +- src/sunstone/public/scss/app.scss | 11 +++++- 4 files changed, 47 insertions(+), 26 deletions(-) diff --git a/src/sunstone/public/app/console/vnc.js b/src/sunstone/public/app/console/vnc.js index 5e4e05d3cb..231bb49cd0 100644 --- a/src/sunstone/public/app/console/vnc.js +++ b/src/sunstone/public/app/console/vnc.js @@ -29,19 +29,31 @@ define(function(require) { require('vnc-keysym'); var rfb; + var encrypt = WebUtil.getQueryVar('encrypt', (window.location.protocol === "https:")); + var repeaterID = WebUtil.getQueryVar('repeaterID', ''); + var true_color = WebUtil.getQueryVar('true_color', true); + var local_cursor = WebUtil.getQueryVar('cursor', true); + var shared = WebUtil.getQueryVar('shared', true); + var view_only = WebUtil.getQueryVar('view_only', false); + var host = WebUtil.getQueryVar('host', window.location.hostname); + var port = WebUtil.getQueryVar('port', window.location.port); + var token = WebUtil.getQueryVar('token', null); + var path = WebUtil.getQueryVar('path', 'websockify'); function passwordRequired(rfb) { var msg; - msg = '
-

+ {{tr "VNC"}} {{tr "Loading"}} - - - -

+ + + + + + + + + + +
{{tr "Canvas not supported."}}
+ × - + \ No newline at end of file diff --git a/src/sunstone/public/app/utils/vnc.js b/src/sunstone/public/app/utils/vnc.js index dd3e8cad8a..db21ff3aab 100644 --- a/src/sunstone/public/app/utils/vnc.js +++ b/src/sunstone/public/app/utils/vnc.js @@ -74,11 +74,11 @@ define(function(require) { url += "host=" + proxy_host; url += "&port=" + proxy_port; url += "&token=" + token; - url += "&password=" + pw; url += "&encrypt=" + Config.vncWSS; url += "&title=" + vm_name; - $("#open_in_a_new_window").attr('href', url) + $("#open_in_a_new_window_without_pass").attr('href', url); + $("#open_in_a_new_window").attr('href', url + "&password=" + pw); _rfb.connect(proxy_host, proxy_port, pw, path); } diff --git a/src/sunstone/public/scss/app.scss b/src/sunstone/public/scss/app.scss index 5ea1e61659..199b981669 100644 --- a/src/sunstone/public/scss/app.scss +++ b/src/sunstone/public/scss/app.scss @@ -1325,4 +1325,13 @@ hr { .custom_tags td { vertical-align: top; -} \ No newline at end of file +} + +#vnc_dialog { + a { + margin-right: 5px; + margin-left: 5px; + margin-top: -3px; + font-size: 14px; + } +} \ No newline at end of file