mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 15:45:23 +00:00
Quick fix if console type not support
This commit is contained in:
parent
b533d59e2f
commit
dd2830eddb
2 changed files with 6 additions and 1 deletions
|
@ -121,6 +121,9 @@
|
||||||
function log_info(msg) {
|
function log_info(msg) {
|
||||||
log_message(msg,'info');
|
log_message(msg,'info');
|
||||||
}
|
}
|
||||||
|
{% if console_error %}
|
||||||
|
log_error('{{ console_error|escapejs }}');
|
||||||
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% block foot %}{% endblock %}
|
{% block foot %}{% endblock %}
|
||||||
|
|
|
@ -16,6 +16,7 @@ def console(request):
|
||||||
:param request:
|
:param request:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
console_error = None
|
||||||
|
|
||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
token = request.GET.get('token', '')
|
token = request.GET.get('token', '')
|
||||||
|
@ -49,7 +50,8 @@ def console(request):
|
||||||
elif console_type == 'spice':
|
elif console_type == 'spice':
|
||||||
response = render(request, 'console-spice.html', locals())
|
response = render(request, 'console-spice.html', locals())
|
||||||
else:
|
else:
|
||||||
response = "Console type %s no support" % console_type
|
console_error = "Console type: %s no support" % console_type
|
||||||
|
response = render(request, 'console-vnc.html', locals())
|
||||||
|
|
||||||
response.set_cookie('token', token)
|
response.set_cookie('token', token)
|
||||||
return response
|
return response
|
||||||
|
|
Loading…
Reference in a new issue