mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Feature #1069: Improvements for wss support and configuration in Sunstone.
Allow non quoted yes | no values in configuration. Set wss configuration choice for the session so it stays if page reloaded (cherry picked from commit 6bb9cb74a22c0efbc7d51a949bea2d51c52a8dee)
This commit is contained in:
parent
589e19142c
commit
cea817e964
@ -24,8 +24,7 @@ class OpenNebulaVNC
|
||||
@proxy_path = config[:vnc_proxy_path]
|
||||
@proxy_base_port = config[:vnc_proxy_base_port].to_i
|
||||
@wss = config[:vnc_proxy_support_wss]
|
||||
$stderr.puts "wss #{@wss}"
|
||||
@enable_wss = (@wss == "yes") || (@wss == "only")
|
||||
@enable_wss = (@wss == "yes") || (@wss == "only") || (@wss == true)
|
||||
@cert = @enable_wss? config[:vnc_proxy_cert] : nil
|
||||
@key = @enable_wss? config[:vnc_proxy_key] : nil
|
||||
@options=opt
|
||||
|
@ -19,12 +19,14 @@
|
||||
# base_port: base_port + vnc_port of the VM is the port where the
|
||||
# proxy will listen for VNC session connections to that VM.
|
||||
# vnc_proxy_path: path to the websockets proxy (set by install_novnc.sh)
|
||||
# support_wss: "no", "yes", "only". For yes and only, provide path to
|
||||
# cert and key. Note value must be a quoted string.
|
||||
# (key is only necessary if not included in cert).
|
||||
# support_wss: no | yes | only. For yes and only, provide path to
|
||||
# cert and key. "yes" means both ws and wss connections will be
|
||||
# supported.
|
||||
# vnc_proxy_cert: Certificate to encrypt wss connections.
|
||||
# vnc_proxy_key: Key for wss connections. Only necessary if not included in cert.
|
||||
:vnc_proxy_base_port: 29876
|
||||
:vnc_proxy_path:
|
||||
:vnc_proxy_support_wss: "no"
|
||||
:vnc_proxy_support_wss: no
|
||||
:vnc_proxy_cert:
|
||||
:vnc_proxy_key:
|
||||
|
||||
|
@ -80,6 +80,7 @@ function updateWss(){
|
||||
},
|
||||
};
|
||||
OpenNebula.User.show(user_info_req);
|
||||
$.post('config',JSON.stringify({wss : ($('#config_table #wss_checkbox').is(':checked') ? "yes" : "no")}));
|
||||
};
|
||||
|
||||
$(document).ready(function(){
|
||||
|
@ -130,9 +130,10 @@ helpers do
|
||||
if user['TEMPLATE/VNC_WSS']
|
||||
session[:wss] = user['TEMPLATE/VNC_WSS']
|
||||
else
|
||||
session[:wss] = settings.config[:vnc_proxy_support_wss]
|
||||
wss = settings.config[:vnc_proxy_support_wss]
|
||||
#limit to yes,no options
|
||||
session[:wss] = (session[:wss] != "no" ? "yes" : "no")
|
||||
session[:wss] = (wss == true || wss == "yes" || wss == "only" ?
|
||||
"yes" : "no")
|
||||
end
|
||||
|
||||
#end user options
|
||||
|
Loading…
x
Reference in New Issue
Block a user