8784: Fix test for latest firefox.
[arvados.git] / apps / workbench / app / views / virtual_machines / webshell.html.erb
1 <html>
2     <title><%= @object.hostname %> / <%= Rails.configuration.site_name %></title>
3     <link rel="stylesheet" href="<%= asset_path 'webshell/styles.css' %>" type="text/css">
4     <style type="text/css">
5       body {
6         margin: 0px;
7       }
8     </style>
9     <script type="text/javascript"><!--
10       (function() {
11         // We would like to hide overflowing lines as this can lead to
12         // visually jarring results if the browser substitutes oversized
13         // Unicode characters from different fonts. Unfortunately, a bug
14         // in Firefox prevents it from allowing multi-line text
15         // selections whenever we change the "overflow" style. So, only
16         // do so for non-Netscape browsers.
17         if (typeof navigator.appName == 'undefined' ||
18             navigator.appName != 'Netscape') {
19           document.write('<style type="text/css">' +
20                          '#vt100 #console div, #vt100 #alt_console div {' +
21                          '  overflow: hidden;' +
22                          '}' +
23                          '</style>');
24         }
25       })();
26
27       function login(username, token) {
28         var sh = new ShellInABox("<%= j @webshell_url %>");
29         setTimeout(function() {
30           sh.keysPressed("<%= j params[:login] %>\n");
31           setTimeout(function() {
32             sh.keysPressed("<%= j Thread.current[:arvados_api_token] %>\n");
33             sh.vt100('(sent authentication token)\n');
34           }, 2000);
35         }, 2000);
36       }
37     // -->
38 </script>
39     <link rel="icon" href="<%= asset_path 'favicon.ico' %>" type="image/x-icon">
40     <script type="text/javascript" src="<%= asset_path 'webshell/shell_in_a_box.js' %>"></script>
41   </head>
42   <!-- Load ShellInABox from a timer as Konqueror sometimes fails to
43        correctly deal with the enclosing frameset (if any), if we do not
44        do this
45    -->
46 <body onload="setTimeout(login, 1000)"
47     scroll="no"><noscript>JavaScript must be enabled for ShellInABox</noscript>
48 </body>
49 </html>