VNC-connect-message-should-contain-displayName
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c5383c8d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c5383c8d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c5383c8d Branch: refs/heads/advancedsg-leaseweb Commit: c5383c8d230aab35c36301532863d9cacc31f784 Parents: a0571d1 Author: Wei Zhou <[email protected]> Authored: Wed Jun 26 11:29:23 2013 +0200 Committer: Wei Zhou <[email protected]> Committed: Wed Jun 26 11:29:23 2013 +0200 ---------------------------------------------------------------------- patches/systemvm/debian/config/root/lswcp/include/rfb.js | 8 +++++--- patches/systemvm/debian/config/root/lswcp/vnc_auto.html | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c5383c8d/patches/systemvm/debian/config/root/lswcp/include/rfb.js ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/root/lswcp/include/rfb.js b/patches/systemvm/debian/config/root/lswcp/include/rfb.js index d87040c..73ce98f 100644 --- a/patches/systemvm/debian/config/root/lswcp/include/rfb.js +++ b/patches/systemvm/debian/config/root/lswcp/include/rfb.js @@ -39,6 +39,7 @@ var that = {}, // Public API methods rfb_port = 5900, rfb_password = '', rfb_path = '', + rfb_display_name = '', rfb_state = 'disconnected', rfb_version = 0, @@ -882,9 +883,9 @@ init_msg = function() { setTimeout(scan_tight_imgQ, scan_imgQ_rate); if (conf.encrypt) { - updateState('normal', "Connected (encrypted) to: " + fb_name); + updateState('normal', "Connected (encrypted) to: " + rfb_display_name); } else { - updateState('normal', "Connected (unencrypted) to: " + fb_name); + updateState('normal', "Connected (unencrypted) to: " + rfb_display_name); } break; } @@ -1759,13 +1760,14 @@ clientCutText = function(text) { // Public API interface functions // -that.connect = function(host, port, password, path) { +that.connect = function(host, port, password, path, display_name) { //Util.Debug(">> connect"); rfb_host = host; rfb_port = port; rfb_password = (password !== undefined) ? password : ""; rfb_path = (path !== undefined) ? path : ""; + rfb_display_name = (display_name !== undefined) ? display_name : ""; if ((!rfb_host) || (!rfb_port)) { return fail("Must set host and port"); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c5383c8d/patches/systemvm/debian/config/root/lswcp/vnc_auto.html ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/root/lswcp/vnc_auto.html b/patches/systemvm/debian/config/root/lswcp/vnc_auto.html index 2c0c962..c4dff4c 100644 --- a/patches/systemvm/debian/config/root/lswcp/vnc_auto.html +++ b/patches/systemvm/debian/config/root/lswcp/vnc_auto.html @@ -80,7 +80,7 @@ } window.onload = function () { - var host, port, password, path; + var host, port, password, path, displayName; $D('sendCtrlAltDelButton').style.display = "inline"; $D('sendCtrlAltDelButton').onclick = function() { @@ -97,6 +97,7 @@ port = WebUtil.getQueryVar('port', null); password = WebUtil.getQueryVar('password', ''); path = WebUtil.getQueryVar('path', 'websockify'); + displayName = WebUtil.getQueryVar('displayName', ''); if ((!host) || (!port)) { updateState('failed', "Must specify host and port in URL"); @@ -112,7 +113,7 @@ 'view_only': WebUtil.getQueryVar('view_only', false), 'updateState': updateState, 'onPasswordRequired': passwordRequired}); - rfb.connect(host, port, password, path); + rfb.connect(host, port, password, path, displayName); }; </script>
