mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +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) {
|
||||
log_message(msg,'info');
|
||||
}
|
||||
{% if console_error %}
|
||||
log_error('{{ console_error|escapejs }}');
|
||||
{% endif %}
|
||||
</script>
|
||||
|
||||
{% block foot %}{% endblock %}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue