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:
parent
238dcff1fe
commit
4e5193e838
@ -174,6 +174,7 @@ class OpenNebulaVNC
|
|||||||
info = {
|
info = {
|
||||||
:password => vnc_pw,
|
:password => vnc_pw,
|
||||||
:token => random_str,
|
:token => random_str,
|
||||||
|
:vm_name => vm_resource['NAME']
|
||||||
}
|
}
|
||||||
|
|
||||||
return [200, info.to_json]
|
return [200, info.to_json]
|
||||||
|
@ -2920,6 +2920,7 @@ function vncCallback(request,response){
|
|||||||
var proxy_port = config['system_config']['vnc_proxy_port'];
|
var proxy_port = config['system_config']['vnc_proxy_port'];
|
||||||
var pw = response["password"];
|
var pw = response["password"];
|
||||||
var token = response["token"];
|
var token = response["token"];
|
||||||
|
var vm_name = response["vm_name"];
|
||||||
var path = '?token='+token;
|
var path = '?token='+token;
|
||||||
|
|
||||||
var url = "vnc?";
|
var url = "vnc?";
|
||||||
@ -2928,6 +2929,7 @@ function vncCallback(request,response){
|
|||||||
url += "&token=" + token;
|
url += "&token=" + token;
|
||||||
url += "&password=" + pw;
|
url += "&password=" + pw;
|
||||||
url += "&encrypt=" + config['user_config']['vnc_wss'];
|
url += "&encrypt=" + config['user_config']['vnc_wss'];
|
||||||
|
url += "&title=" + vm_name;
|
||||||
|
|
||||||
$("#open_in_a_new_window").attr('href', url)
|
$("#open_in_a_new_window").attr('href', url)
|
||||||
rfb.connect(proxy_host, proxy_port, pw, path);
|
rfb.connect(proxy_host, proxy_port, pw, path);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<title>noVNC</title>
|
<title><%= params['vm_name']%></title>
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<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
|
// if port == 80 (or 443) then it won't be present and should be
|
||||||
// set manually
|
// set manually
|
||||||
if (!port) {
|
if (!port) {
|
||||||
if (window.location.protocol.substring(0,4) == 'http') {
|
if (window.location.protocol.substring(0,4) == 'http') {
|
||||||
port = 80;
|
port = 80;
|
||||||
}
|
}
|
||||||
else if (window.location.protocol.substring(0,5) == 'https') {
|
else if (window.location.protocol.substring(0,5) == 'https') {
|
||||||
port = 443;
|
port = 443;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -151,4 +151,4 @@ var INCLUDE_URI = "vendor/noVNC/";
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user