1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

feature #1586: Add title to noVNC tabs

This commit is contained in:
Ruben S. Montero 2013-07-09 16:02:00 +02:00
parent 238dcff1fe
commit 4e5193e838
3 changed files with 7 additions and 4 deletions

View File

@ -174,6 +174,7 @@ class OpenNebulaVNC
info = {
:password => vnc_pw,
:token => random_str,
:vm_name => vm_resource['NAME']
}
return [200, info.to_json]

View File

@ -2920,6 +2920,7 @@ function vncCallback(request,response){
var proxy_port = config['system_config']['vnc_proxy_port'];
var pw = response["password"];
var token = response["token"];
var vm_name = response["vm_name"];
var path = '?token='+token;
var url = "vnc?";
@ -2928,6 +2929,7 @@ function vncCallback(request,response){
url += "&token=" + token;
url += "&password=" + pw;
url += "&encrypt=" + config['user_config']['vnc_wss'];
url += "&title=" + vm_name;
$("#open_in_a_new_window").attr('href', url)
rfb.connect(proxy_host, proxy_port, pw, path);

View File

@ -2,7 +2,7 @@
<html>
<head>
<title>noVNC</title>
<title><%= params['vm_name']%></title>
<meta charset="utf-8">
@ -114,10 +114,10 @@ var INCLUDE_URI = "vendor/noVNC/";
// if port == 80 (or 443) then it won't be present and should be
// set manually
if (!port) {
if (window.location.protocol.substring(0,4) == 'http') {
if (window.location.protocol.substring(0,4) == 'http') {
port = 80;
}
else if (window.location.protocol.substring(0,5) == 'https') {
else if (window.location.protocol.substring(0,5) == 'https') {
port = 443;
}
}
@ -151,4 +151,4 @@ var INCLUDE_URI = "vendor/noVNC/";
</script>
</body>
</html>
</html>