]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Merge commit 'd38db74abd0efa34f7297dc19bf603b7f765e0f5'
authorJoel Martin <github@martintribe.org>
Sun, 11 Mar 2012 01:52:11 +0000 (19:52 -0600)
committerJoel Martin <github@martintribe.org>
Sun, 11 Mar 2012 01:52:11 +0000 (19:52 -0600)
Conflicts:
README.md

debian/changelog
debian/novnc.install
docs/VERSION
include/base.css
include/base64.js
include/ui.js
include/util.js
include/webutil.js
utils/websocket.py
vnc.html
vnc_auto.html

index c96cb76762b60bd4ff30269e919c80a6aba17104..ba01ad817e64b615ae4881901a975ed06343cc1e 100644 (file)
@@ -1,3 +1,15 @@
+novnc (0.2) maverick; urgency=low
+
+  * Mobile device support with viewport clipping
+  * Much better styling that also works on mobile devices well
+  * Update websockify to support latest WebSocket protocol HyBi 13
+    (i.e. support IETF 6455)
+  * Better support in websockify for python 2.4 through 3.2
+  * Support VMWare ESX and Intel AMT KVM
+  * View only mode
+
+ -- Joel Martin <github@martintribe.org>  Tue, 05 Jul 2011 01:00:00 -0600
+
 novnc (0.1) maverick; urgency=low
 
   * First upstream release
index fa96b50f1784192618426f33998a9bf3ed731c4f..711d18b8e3ac5a61ac07c7e6fdfd69b6c6152eb9 100644 (file)
@@ -9,6 +9,7 @@ utils/websockify   /usr/share/novnc/utils
 utils/wsproxy.py  /usr/share/novnc/utils
 utils/rebind.c  /usr/share/novnc/utils
 utils/rebind.so  /usr/share/novnc/utils
+images  /usr/share/novnc
 images/favicon.ico  /usr/share/novnc
 include/base64.js   /usr/share/novnc/include
 include/des.js   /usr/share/novnc/include
index 49d59571fbf6e077eece30f8c418b6aad15e20b0..3b04cfb60da13a716867848ebeb2191a164887d9 100644 (file)
@@ -1 +1 @@
-0.1
+0.2
index 0a62a1ba940b6eaca95899a56d97eb8ee99278e5..105984d45c32826d49e8e48423acee84c8202994 100644 (file)
@@ -153,6 +153,7 @@ html {
 }
 
 #noVNC_controls {
+  display:none;
   margin-top:77px;
   right:12px;
   position:fixed;
@@ -161,6 +162,23 @@ html {
   right:15px;
 }
 
+#noVNC_description {
+  display:none;
+  position:fixed;
+
+  margin-top:77px;
+  right:20px;
+  left:20px;
+  padding:15px;
+  color:#000;
+  background:#eee; /* default background for browsers without gradient support */
+
+  border:2px solid #E0E0E0;
+  -webkit-border-radius:10px;
+  -moz-border-radius:10px;
+  border-radius:10px;
+}
+
 #noVNC_clipboard {
   display:none;
   margin-top:77px;
index c68b33aac1a7ff5bb59286fb31f04578fe5ebc54..e9b3c522d92ee5683f802af1b08e91b0aa55eb5f 100644 (file)
@@ -116,7 +116,7 @@ decode: function (data, offset) {
         padding = (data.charAt(i) === pad);
         // Skip illegal characters and whitespace
         if (c === -1) {
-            console.error("Illegal character '" + data.charCodeAt(i) + "'");
+            console.error("Illegal character code " + data.charCodeAt(i) + " at position " + i);
             continue;
         }
         
index 587f2d639cca757e5125148e5211ca8c4baa0e23..b5d7ce35ba30c14244460f4b020d35ee8dd231fc 100644 (file)
@@ -14,7 +14,7 @@ var UI = {
 
 rfb_state : 'loaded',
 settingsOpen : false,
-connSettingsOpen : true,
+connSettingsOpen : false,
 clipboardOpen: false,
 keyboardVisible: false,
 
@@ -48,13 +48,13 @@ load: function() {
     UI.initSetting('host', '');
     UI.initSetting('port', '');
     UI.initSetting('password', '');
-    UI.initSetting('encrypt', false);
+    UI.initSetting('encrypt', (window.location.protocol === "https:"));
     UI.initSetting('true_color', true);
     UI.initSetting('cursor', false);
     UI.initSetting('shared', true);
     UI.initSetting('view_only', false);
     UI.initSetting('connectTimeout', 2);
-    UI.initSetting('path', '');
+    UI.initSetting('path', 'websockify');
 
     UI.rfb = RFB({'target': $D('noVNC_canvas'),
                   'onUpdateState': UI.updateState,
@@ -102,6 +102,14 @@ load: function() {
         }
     } );
 
+    // Show description by default when hosted at for kanaka.github.com
+    if (location.host === "kanaka.github.com") {
+        // Open the description dialog
+        $D('noVNC_description').style.display = "block";
+    } else {
+        // Open the connect panel on first load
+        UI.toggleConnectPanel();
+    }
 },
 
 // Read form control compatible setting from cookie
@@ -189,6 +197,8 @@ forceSetting: function(name, val) {
 
 // Show the clipboard panel
 toggleClipboardPanel: function() {
+    // Close the description panel
+    $D('noVNC_description').style.display = "none";
     //Close settings if open
     if (UI.settingsOpen === true) {
         UI.settingsApply();
@@ -212,6 +222,8 @@ toggleClipboardPanel: function() {
 
 // Show the connection settings panel/menu
 toggleConnectPanel: function() {
+    // Close the description panel
+    $D('noVNC_description').style.display = "none";
     //Close connection settings if open
     if (UI.settingsOpen === true) {
         UI.settingsApply();
@@ -239,6 +251,8 @@ toggleConnectPanel: function() {
 //   On open, settings are refreshed from saved cookies.
 //   On close, settings are applied
 toggleSettingsPanel: function() {
+    // Close the description panel
+    $D('noVNC_description').style.display = "none";
     if (UI.settingsOpen) {
         UI.settingsApply();
         UI.closeSettingsMenu();
@@ -265,6 +279,8 @@ toggleSettingsPanel: function() {
 
 // Open menu
 openSettingsMenu: function() {
+    // Close the description panel
+    $D('noVNC_description').style.display = "none";
     if (UI.clipboardOpen === true) {
         UI.toggleClipboardPanel();
     }
@@ -415,10 +431,12 @@ updateVisualState: function() {
     if (connected) {
         UI.setViewClip();
         UI.setMouseButton(1);
+        $D('clipboardButton').style.display = "inline";
         $D('showKeyboard').style.display = "inline";
         $D('sendCtrlAltDelButton').style.display = "inline";
     } else {
         UI.setMouseButton();
+        $D('clipboardButton').style.display = "none";
         $D('showKeyboard').style.display = "none";
         $D('sendCtrlAltDelButton').style.display = "none";
     }
index 687f6552de8ae7e1c812d636b5959d0834c1400b..ddc1914cda048563facd29bbe00ee5fe02cf6497 100644 (file)
@@ -33,6 +33,30 @@ Array.prototype.push32 = function (num) {
               (num      ) & 0xFF  );
 };
 
+// IE does not support map (even in IE9)
+//This prototype is provided by the Mozilla foundation and
+//is distributed under the MIT license.
+//http://www.ibiblio.org/pub/Linux/LICENSES/mit.license
+if (!Array.prototype.map)
+{
+  Array.prototype.map = function(fun /*, thisp*/)
+  {
+    var len = this.length;
+    if (typeof fun != "function")
+      throw new TypeError();
+
+    var res = new Array(len);
+    var thisp = arguments[1];
+    for (var i = 0; i < len; i++)
+    {
+      if (i in this)
+        res[i] = fun.call(thisp, this[i], i, this);
+    }
+
+    return res;
+  };
+}
+
 /* 
  * ------------------------------------------------------
  * Namespaced in Util
index ee370e04680fdaeb08908130fe60bf1add952093..7a0a076085045df295c8c54ce4fffe6cc6076171 100644 (file)
@@ -17,7 +17,7 @@ var WebUtil = {}, $D;
  * Simple DOM selector by ID
  */
 if (!window.$D) {
-    $D = function (id) {
+    window.$D = function (id) {
         if (document.getElementById) {
             return document.getElementById(id);
         } else if (document.all) {
index cf8f423c91ec900b938ad4291bf447e28514a3dd..646160cbd62a664db957b086150fdc55524389f8 100644 (file)
@@ -603,7 +603,10 @@ Sec-WebSocket-Accept: %s\r
             except ssl.SSLError:
                 _, x, _ = sys.exc_info()
                 if x.args[0] == ssl.SSL_ERROR_EOF:
-                    raise self.EClose("")
+                    if len(x.args) > 1:
+                        raise self.EClose(x.args[1])
+                    else:
+                        raise self.EClose("Got SSL_ERROR_EOF")
                 else:
                     raise
 
index 104d079130457d8073e33922d414d588bcc450ae..b6cf85ba2c35a1010888bcf1ab5268b8d44fae25 100644 (file)
--- a/vnc.html
+++ b/vnc.html
@@ -90,7 +90,7 @@
                 title="Settings"
                 onclick="UI.toggleSettingsPanel();" />
             <input type="image" src="images/connect.png"
-                id="connectButton" class="noVNC_status_button_selected"
+                id="connectButton" class="noVNC_status_button"
                 title="Connect"
                 onclick="UI.toggleConnectPanel()" />
             <input type="image" src="images/disconnect.png"
                 onclick="UI.disconnect()" />
         </div>
 
+        <!-- Description Panel -->
+        <!-- Shown by default when hosted at for kanaka.github.com -->
+        <div id="noVNC_description" style="display:none;" class="">
+            noVNC is a browser based VNC client implemented using HTML5 Canvas
+            and WebSockets. You will either need a VNC server with WebSockets
+            support (such as <a href="http://libvncserver.sourceforge.net/">libvncserver</a>)
+            or you will need to use
+            <a href="https://github.com/kanaka/websockify">websockify</a>
+            to bridge between your browser and VNC server. See the noVNC
+            <a href="https://github.com/kanaka/noVNC">README</a>
+            and <a href="http://kanaka.github.com/noVNC">website</a>
+            for more information.
+            <br />
+            <input type="button" value="Close"
+                onclick="UI.toggleConnectPanel();">
+        </div>
+
         <!-- Clipboard Panel -->
         <div id="noVNC_clipboard" class="triangle-right top">
             <textarea id="noVNC_clipboard_text" rows=5
                     <li><input id="noVNC_shared" type="checkbox"> Shared Mode</li>
                     <li><input id="noVNC_view_only" type="checkbox"> View Only</li>
                     <li><input id="noVNC_connectTimeout" type="input"> Connect Timeout (s)</li>
-                    <li><input id="noVNC_path" type="input"> Path</li>
+                    <li><input id="noVNC_path" type="input" value="websockify"> Path</li>
                     <hr>
                     <!-- Stylesheet selection dropdown -->
                     <li><label><strong>Style: </strong>
index 86a0ce7f94fdd093ed115e315592fcebef0297b5..77df8bb074632dc3f63e33ff280df111ef0bd1b2 100644 (file)
@@ -93,7 +93,7 @@
             host = WebUtil.getQueryVar('host', null);
             port = WebUtil.getQueryVar('port', null);
             password = WebUtil.getQueryVar('password', '');
-            path = WebUtil.getQueryVar('path', '');
+            path = WebUtil.getQueryVar('path', 'websockify');
             if ((!host) || (!port)) {
                 updateState('failed',
                     "Must specify host and port in URL");
             }
 
             rfb = new RFB({'target':       $D('noVNC_canvas'),
-                           'encrypt':      WebUtil.getQueryVar('encrypt', false),
+                           'encrypt':      WebUtil.getQueryVar('encrypt',
+                                    (window.location.protocol === "https:")),
                            'true_color':   WebUtil.getQueryVar('true_color', true),
                            'local_cursor': WebUtil.getQueryVar('cursor', true),
                            'shared':       WebUtil.getQueryVar('shared', true),