1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +00:00

Quick fix if console type not support

This commit is contained in:
retspen 2018-05-31 12:38:03 +03:00
parent b533d59e2f
commit dd2830eddb
2 changed files with 6 additions and 1 deletions

View file

@ -121,6 +121,9 @@
function log_info(msg) {
log_message(msg,'info');
}
{% if console_error %}
log_error('{{ console_error|escapejs }}');
{% endif %}
</script>
{% block foot %}{% endblock %}

View file

@ -16,6 +16,7 @@ def console(request):
:param request:
:return:
"""
console_error = None
if request.method == 'GET':
token = request.GET.get('token', '')
@ -49,7 +50,8 @@ def console(request):
elif console_type == 'spice':
response = render(request, 'console-spice.html', locals())
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)
return response