mirror of
https://github.com/retspen/webvirtcloud
synced 2025-01-12 16:35:17 +00:00
Merge pull request #345 from skyline75489/fix/none-console-type
Handle None console type
This commit is contained in:
commit
845c78c564
1 changed files with 5 additions and 2 deletions
|
@ -52,11 +52,14 @@ def console(request):
|
||||||
if ':' in ws_host:
|
if ':' in ws_host:
|
||||||
ws_host = re.sub(':[0-9]+', '', ws_host)
|
ws_host = re.sub(':[0-9]+', '', ws_host)
|
||||||
|
|
||||||
console_page = "console-" + console_type + "-" + view_type + ".html"
|
|
||||||
if console_type == 'vnc' or console_type == 'spice':
|
if console_type == 'vnc' or console_type == 'spice':
|
||||||
|
console_page = "console-" + console_type + "-" + view_type + ".html"
|
||||||
response = render(request, console_page, locals())
|
response = render(request, console_page, locals())
|
||||||
else:
|
else:
|
||||||
console_error = f"Console type: {console_type} no support"
|
if console_type is None:
|
||||||
|
console_error = f"Fail to get console. Please check the console configuration of your VM."
|
||||||
|
else:
|
||||||
|
console_error = f"Console type: {console_type} no support"
|
||||||
response = render(request, 'console-vnc-lite.html', locals())
|
response = render(request, 'console-vnc-lite.html', locals())
|
||||||
|
|
||||||
response.set_cookie('token', token)
|
response.set_cookie('token', token)
|
||||||
|
|
Loading…
Reference in a new issue