mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 04:36:48 +00:00
feat(console): remove deprecated SPICE support in favor of noVNC
- Remove obsolete spice-html5 static assets and SPICE console templates - Restrict default console types to VNC with migration 0012 - Filter out SPICE in VM creation form and backend capabilities - Return friendly deprecation notice if legacy VM is opened with SPICE - Clean up docs, architecture references, and libvirt-bootstrap scripts
This commit is contained in:
parent
4b55630b2d
commit
e980aca2ff
48 changed files with 62 additions and 69095 deletions
|
|
@ -1,231 +0,0 @@
|
|||
<!--
|
||||
Copyright (C) 2012 by Jeremy P. White <jwhite@codeweavers.com>
|
||||
|
||||
This file is part of spice-html5.
|
||||
|
||||
spice-html5 is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
spice-html5 is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with spice-html5. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
--------------------------------------------------
|
||||
Spice Javascript client template.
|
||||
Refer to main.js for more detailed information
|
||||
--------------------------------------------------
|
||||
|
||||
-->
|
||||
{% extends "console-base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
|
||||
{% block head %}
|
||||
<title>WebVirtCloud - Spice Client - Full</title>
|
||||
<link rel="stylesheet" type="text/css" href="{% static "js/spice-html5/spice.css" %}" />
|
||||
|
||||
<!-- ES2015/ES6 modules polyfill -->
|
||||
<script nomodule src='{% static "thirdparty/browser-es-module-loader/dist/browser-es-module-loader.js" %}'></script>
|
||||
|
||||
|
||||
<script type="module" crossorigin="anonymous">
|
||||
|
||||
import * as SpiceHtml5 from '{% static "js/spice-html5/main.js" %}';
|
||||
|
||||
var host = null, port = null;
|
||||
var sc;
|
||||
|
||||
function spice_error(e) {
|
||||
disconnect();
|
||||
}
|
||||
|
||||
function connect() {
|
||||
var host, port, password, scheme = "ws://", uri;
|
||||
|
||||
host = document.getElementById("host").value;
|
||||
port = document.getElementById("port").value;
|
||||
password = document.getElementById("password").value;
|
||||
|
||||
if ((!host) || (!port)) {
|
||||
console.log('{% trans "must set host and port" %}');
|
||||
return;
|
||||
}
|
||||
|
||||
if (sc) {
|
||||
sc.stop();
|
||||
}
|
||||
|
||||
var path = '{{ ws_path|escapejs }}';
|
||||
uri = scheme + '{{ ws_host|escapejs }}:{{ ws_port|default:6080 }}' + (path ? (path[0] == '/' ? path : ('/' + path)) : '/');
|
||||
|
||||
document.getElementById('connectButton').innerHTML = "Stop";
|
||||
document.getElementById('connectButton').onclick = disconnect;
|
||||
|
||||
try {
|
||||
sc = new SpiceHtml5.SpiceMainConn({
|
||||
uri: uri, screen_id: "spice-screen", dump_id: "debug-div",
|
||||
message_id: "message-div", password: password, onerror: spice_error, onagent: agent_connected
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
alert(e.toString());
|
||||
disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
function disconnect() {
|
||||
console.log(">>" + '{% trans "disconnect" %}');
|
||||
if (sc) {
|
||||
sc.stop();
|
||||
}
|
||||
document.getElementById('connectButton').innerHTML = "Start";
|
||||
document.getElementById('connectButton').onclick = connect;
|
||||
if (window.File && window.FileReader && window.FileList && window.Blob) {
|
||||
var spice_xfer_area = document.getElementById('spice-xfer-area');
|
||||
if (spice_xfer_area != null) {
|
||||
document.getElementById('spice-area').removeChild(spice_xfer_area);
|
||||
}
|
||||
document.getElementById('spice-area').removeEventListener('dragover', SpiceHtml5.handle_file_dragover, false);
|
||||
document.getElementById('spice-area').removeEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
||||
}
|
||||
console.log("<<" + '{% trans "disconnect" %}');
|
||||
}
|
||||
|
||||
function agent_connected(sc) {
|
||||
window.addEventListener('resize', SpiceHtml5.handle_resize);
|
||||
window.spice_connection = this;
|
||||
|
||||
SpiceHtml5.resize_helper(this);
|
||||
|
||||
if (window.File && window.FileReader && window.FileList && window.Blob) {
|
||||
var spice_xfer_area = document.createElement("div");
|
||||
spice_xfer_area.setAttribute('id', 'spice-xfer-area');
|
||||
document.getElementById('spice-area').appendChild(spice_xfer_area);
|
||||
document.getElementById('spice-area').addEventListener('dragover', SpiceHtml5.handle_file_dragover, false);
|
||||
document.getElementById('spice-area').addEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
||||
}
|
||||
else {
|
||||
console.log('{% trans "File API is not supported" %}');
|
||||
}
|
||||
}
|
||||
|
||||
function toggle_console() {
|
||||
var checkbox = document.getElementById('show_console');
|
||||
var m = document.getElementById('message-div');
|
||||
|
||||
if (checkbox.checked) {
|
||||
m.style.display = 'block';
|
||||
}
|
||||
else {
|
||||
m.style.display = 'none';
|
||||
}
|
||||
|
||||
window.addEventListener('resize', SpiceHtml5.handle_resize);
|
||||
if (sc) {
|
||||
SpiceHtml5.resize_helper(sc);
|
||||
}
|
||||
}
|
||||
/* SPICE port event listeners
|
||||
window.addEventListener('spice-port-data', function(event) {
|
||||
// Here we convert data to text, but really we can obtain binary data also
|
||||
var msg_text = arraybuffer_to_str(new Uint8Array(event.detail.data));
|
||||
DEBUG > 0 && console.log('SPICE port', event.detail.channel.portName, 'message text:', msg_text);
|
||||
});
|
||||
|
||||
window.addEventListener('spice-port-event', function(event) {
|
||||
DEBUG > 0 && console.log('SPICE port', event.detail.channel.portName, 'event data:', event.detail.spiceEvent);
|
||||
});
|
||||
*/
|
||||
|
||||
function fullscreen() {
|
||||
var screen = document.getElementById('spice-screen');
|
||||
if (screen.requestFullscreen) {
|
||||
screen.requestFullscreen();
|
||||
} else if (screen.mozRequestFullScreen) {
|
||||
screen.mozRequestFullScreen();
|
||||
} else if (screen.webkitRequestFullscreen) {
|
||||
screen.webkitRequestFullscreen();
|
||||
} else if (screen.msRequestFullscreen) {
|
||||
screen.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
|
||||
function sendctrlaltfn(f) {
|
||||
SpiceHtml5.sendCtrlAltFN(sc, f);
|
||||
return false;
|
||||
}
|
||||
|
||||
function sendCtrlAltDel() {
|
||||
SpiceHtml5.sendCtrlAltDel(sc);
|
||||
return false;
|
||||
}
|
||||
/* SPICE port event listeners
|
||||
window.addEventListener('spice-port-data', function(event) {
|
||||
// Here we convert data to text, but really we can obtain binary data also
|
||||
var msg_text = arraybuffer_to_str(new Uint8Array(event.detail.data));
|
||||
DEBUG > 0 && console.log('SPICE port', event.detail.channel.portName, 'message text:', msg_text);
|
||||
});
|
||||
|
||||
window.addEventListener('spice-port-event', function(event) {
|
||||
DEBUG > 0 && console.log('SPICE port', event.detail.channel.portName, 'event data:', event.detail.spiceEvent);
|
||||
});
|
||||
*/
|
||||
document.getElementById("fullscreen_button").addEventListener('click', fullscreen);
|
||||
document.getElementById('ctrlaltdel').addEventListener('click', function () { sendCtrlAltDel(sc); });
|
||||
document.getElementById('ctrlaltf1').addEventListener('click', function () { sendctrlaltfn(0) });
|
||||
document.getElementById('ctrlaltf2').addEventListener('click', function () { sendctrlaltfn(1) });
|
||||
document.getElementById('ctrlaltf3').addEventListener('click', function () { sendctrlaltfn(2) });
|
||||
document.getElementById('ctrlaltf4').addEventListener('click', function () { sendctrlaltfn(3) });
|
||||
document.getElementById('ctrlaltf5').addEventListener('click', function () { sendctrlaltfn(4) });
|
||||
document.getElementById('ctrlaltf6').addEventListener('click', function () { sendctrlaltfn(5) });
|
||||
document.getElementById('ctrlaltf7').addEventListener('click', function () { sendctrlaltfn(6) });
|
||||
document.getElementById('ctrlaltf8').addEventListener('click', function () { sendctrlaltfn(7) });
|
||||
document.getElementById('ctrlaltf9').addEventListener('click', function () { sendctrlaltfn(8) });
|
||||
document.getElementById('ctrlaltf10').addEventListener('click', function () { sendctrlaltfn(9) });
|
||||
document.getElementById('ctrlaltf11').addEventListener('click', function () { sendctrlaltfn(10) });
|
||||
document.getElementById('ctrlaltf12').addEventListener('click', function () { sendctrlaltfn(11) });
|
||||
|
||||
document.getElementById('connectButton').onclick = connect;
|
||||
document.getElementById('show_console').onchange = toggle_console;
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="login">
|
||||
<span class="logo">SPICE</span>
|
||||
<label for="host">{% trans 'Host' %}:</label>
|
||||
<input type='text' id='host' value='{{ ws_host }}'>
|
||||
<label for="port">{% trans 'Port' %}:</label>
|
||||
<input type='text' id='port' value='{{ ws_port }}'>
|
||||
<label for="password">{% trans 'Password' %}:</label>
|
||||
{% if perms.instances.passwordless_console %}
|
||||
<input type='password' id='password' value='{{ console_passwd }}'>
|
||||
{% else %}
|
||||
<input type='password' id='password'>
|
||||
{% endif %}
|
||||
<label for="show_console">{% trans 'Show console' %}</label>
|
||||
<input type="checkbox" id="show_console" value="1" onchange="toggle_console()" checked>
|
||||
<button id="connectButton">{% trans 'Start' %}</button>
|
||||
</div>
|
||||
|
||||
<div id="spice-area">
|
||||
<div id="spice-screen" class="spice-screen"></div>
|
||||
</div>
|
||||
|
||||
<div id="message-div" class="spice-message"></div>
|
||||
|
||||
<div id="debug-div">
|
||||
<!-- If DUMPXXX is turned on, dumped images will go here -->
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block foot %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
@ -1,231 +0,0 @@
|
|||
<!--
|
||||
Copyright (C) 2012 by Jeremy P. White <jwhite@codeweavers.com>
|
||||
|
||||
This file is part of spice-html5.
|
||||
|
||||
spice-html5 is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
spice-html5 is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with spice-html5. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
--------------------------------------------------
|
||||
Spice Javascript client template.
|
||||
Refer to main.js for more detailed information
|
||||
--------------------------------------------------
|
||||
|
||||
-->
|
||||
{% extends "console-base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
|
||||
{% block head %}
|
||||
<title>WebVirtCloud - Spice - Lite</title>
|
||||
<link rel="stylesheet" type="text/css" href="{% static "js/spice-html5/spice.css" %}" />
|
||||
|
||||
<!-- ES2015/ES6 modules polyfill -->
|
||||
<script nomodule src='{% static "thirdparty/browser-es-module-loader/dist/browser-es-module-loader.js" %}'></script>
|
||||
|
||||
<script type="module" crossorigin="anonymous">
|
||||
import * as SpiceHtml5 from '{% static "js/spice-html5/main.js" %}';
|
||||
|
||||
var host = null, port = null;
|
||||
var sc;
|
||||
|
||||
function spice_set_cookie(name, value, days) {
|
||||
var date, expires;
|
||||
date = new Date();
|
||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||
expires = "; expires=" + date.toGMTString();
|
||||
document.cookie = name + "=" + value + expires + "; path=/";
|
||||
};
|
||||
|
||||
function spice_query_var(name, defvalue) {
|
||||
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
|
||||
return match ? decodeURIComponent(match[1].replace(/\+/g, ' ')) : defvalue;
|
||||
}
|
||||
|
||||
function spice_error(e) {
|
||||
disconnect();
|
||||
if (e !== undefined && e.message === "Permission denied.") {
|
||||
var pass = prompt('{% trans "Password" %}');
|
||||
connect(pass);
|
||||
}
|
||||
}
|
||||
|
||||
function connect(password) {
|
||||
var host, port, scheme = "ws://", uri;
|
||||
|
||||
// By default, use the host and port of server that served this file
|
||||
// host = spice_query_var('host', window.location.hostname);
|
||||
host = '{{ ws_host|escapejs }}';
|
||||
|
||||
// Note that using the web server port only makes sense
|
||||
// if your web server has a reverse proxy to relay the WebSocket
|
||||
// traffic to the correct destination port.
|
||||
var default_port = window.location.port;
|
||||
if (!default_port) {
|
||||
if (window.location.protocol == 'http:') {
|
||||
default_port = 80;
|
||||
}
|
||||
else if (window.location.protocol == 'https:') {
|
||||
default_port = 443;
|
||||
}
|
||||
}
|
||||
//port = spice_query_var('port', default_port);
|
||||
port = '{{ ws_port|escapejs }}';
|
||||
if (window.location.protocol == 'https:') {
|
||||
scheme = "wss://";
|
||||
}
|
||||
|
||||
// If a token variable is passed in, set the parameter in a cookie.
|
||||
// This is used by nova-spiceproxy.
|
||||
var token = spice_query_var('token', null);
|
||||
if (token) {
|
||||
spice_set_cookie('token', token, 1)
|
||||
}
|
||||
|
||||
if (password === undefined) {
|
||||
{% if perms.instances.passwordless_console and console_passwd %}
|
||||
password = '{{ console_passwd|escapejs }}';
|
||||
{% else %}
|
||||
password = prompt('{% trans "Password" %}');
|
||||
{% endif %}
|
||||
}
|
||||
if (password === 'None') password = '';
|
||||
|
||||
//var path = spice_query_var('path', 'websockify');
|
||||
var path = spice_query_var('path', '{{ ws_path|escapejs }}');
|
||||
|
||||
if ((!host) || (!port)) {
|
||||
console.log('{% trans "must specify host and port in URL" %}');
|
||||
return;
|
||||
}
|
||||
|
||||
if (sc) {
|
||||
sc.stop();
|
||||
}
|
||||
|
||||
// uri = scheme + host + ":" + port;
|
||||
uri = scheme + "{{ ws_host }}:{{ ws_port }}";
|
||||
|
||||
if (path) {
|
||||
uri += path[0] == '/' ? path : ('/' + path);
|
||||
}
|
||||
|
||||
try {
|
||||
sc = new SpiceHtml5.SpiceMainConn({
|
||||
uri: uri, screen_id: "spice-screen", dump_id: "debug-div",
|
||||
message_id: "message-div", password: password, onerror: spice_error, onagent: agent_connected
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
alert(e.toString());
|
||||
disconnect();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function disconnect() {
|
||||
console.log(">>" + '{% trans "disconnect" %}');
|
||||
if (sc) {
|
||||
sc.stop();
|
||||
}
|
||||
if (window.File && window.FileReader && window.FileList && window.Blob) {
|
||||
var spice_xfer_area = document.getElementById('spice-xfer-area');
|
||||
if (spice_xfer_area != null) {
|
||||
document.getElementById('spice-area').removeChild(spice_xfer_area);
|
||||
}
|
||||
document.getElementById('spice-area').removeEventListener('dragover', SpiceHtml5.handle_file_dragover, false);
|
||||
document.getElementById('spice-area').removeEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
||||
}
|
||||
console.log("<<" + '{% trans "disconnect" %}');
|
||||
}
|
||||
|
||||
function agent_connected(sc) {
|
||||
window.addEventListener('resize', SpiceHtml5.handle_resize);
|
||||
window.spice_connection = this;
|
||||
|
||||
SpiceHtml5.resize_helper(this);
|
||||
|
||||
if (window.File && window.FileReader && window.FileList && window.Blob) {
|
||||
var spice_xfer_area = document.createElement("div");
|
||||
spice_xfer_area.setAttribute('id', 'spice-xfer-area');
|
||||
document.getElementById('spice-area').appendChild(spice_xfer_area);
|
||||
document.getElementById('spice-area').addEventListener('dragover', SpiceHtml5.handle_file_dragover, false);
|
||||
document.getElementById('spice-area').addEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
||||
}
|
||||
else {
|
||||
console.log('{% trans "File API is not supported" %}');
|
||||
}
|
||||
}
|
||||
|
||||
function fullscreen() {
|
||||
var screen = document.getElementById('spice-screen');
|
||||
if (screen.requestFullscreen) {
|
||||
screen.requestFullscreen();
|
||||
} else if (screen.mozRequestFullScreen) {
|
||||
screen.mozRequestFullScreen();
|
||||
} else if (screen.webkitRequestFullscreen) {
|
||||
screen.webkitRequestFullscreen();
|
||||
} else if (screen.msRequestFullscreen) {
|
||||
screen.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
|
||||
function sendctrlaltfn(f) {
|
||||
SpiceHtml5.sendCtrlAltFN(sc, f);
|
||||
return false;
|
||||
}
|
||||
|
||||
function sendCtrlAltDel() {
|
||||
SpiceHtml5.sendCtrlAltDel(sc);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* SPICE port event listeners
|
||||
window.addEventListener('spice-port-data', function(event) {
|
||||
// Here we convert data to text, but really we can obtain binary data also
|
||||
var msg_text = arraybuffer_to_str(new Uint8Array(event.detail.data));
|
||||
DEBUG > 0 && console.log('SPICE port', event.detail.channel.portName, 'message text:', msg_text);
|
||||
});
|
||||
|
||||
window.addEventListener('spice-port-event', function(event) {
|
||||
DEBUG > 0 && console.log('SPICE port', event.detail.channel.portName, 'event data:', event.detail.spiceEvent);
|
||||
});
|
||||
*/
|
||||
document.getElementById("fullscreen_button").addEventListener('click', fullscreen);
|
||||
document.getElementById('ctrlaltdel').addEventListener('click', function () { sendCtrlAltDel(); });
|
||||
document.getElementById('ctrlaltf1').addEventListener('click', function () { sendctrlaltfn(0) });
|
||||
document.getElementById('ctrlaltf2').addEventListener('click', function () { sendctrlaltfn(1) });
|
||||
document.getElementById('ctrlaltf3').addEventListener('click', function () { sendctrlaltfn(2) });
|
||||
document.getElementById('ctrlaltf4').addEventListener('click', function () { sendctrlaltfn(3) });
|
||||
document.getElementById('ctrlaltf5').addEventListener('click', function () { sendctrlaltfn(4) });
|
||||
document.getElementById('ctrlaltf6').addEventListener('click', function () { sendctrlaltfn(5) });
|
||||
document.getElementById('ctrlaltf7').addEventListener('click', function () { sendctrlaltfn(6) });
|
||||
document.getElementById('ctrlaltf8').addEventListener('click', function () { sendctrlaltfn(7) });
|
||||
document.getElementById('ctrlaltf9').addEventListener('click', function () { sendctrlaltfn(8) });
|
||||
document.getElementById('ctrlaltf10').addEventListener('click', function () { sendctrlaltfn(9) });
|
||||
document.getElementById('ctrlaltf11').addEventListener('click', function () { sendctrlaltfn(10) });
|
||||
document.getElementById('ctrlaltf12').addEventListener('click', function () { sendctrlaltfn(11) });
|
||||
connect(undefined);
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="spice-area">
|
||||
<div id="spice-screen" class="spice-screen"></div>
|
||||
</div>
|
||||
|
||||
<div id="message-div" class="spice-message"></div>
|
||||
|
||||
<div id="debug-div">
|
||||
<!-- If DUMPXXX is turned on, dumped images will go here -->
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -102,21 +102,7 @@ class ConsoleViewsTestCase(TestCase):
|
|||
self.assertEqual(response.context["ws_port"], 5900)
|
||||
|
||||
@patch("console.views.wvmInstance")
|
||||
def test_console_superuser_spice_lite(self, mock_wvm):
|
||||
mock_conn = MagicMock()
|
||||
mock_conn.get_console_type.return_value = "spice"
|
||||
mock_conn.get_console_websocket_port.return_value = None
|
||||
mock_wvm.return_value = mock_conn
|
||||
|
||||
self.client.force_login(self.admin_user)
|
||||
url = reverse("console") + f"?token={self.token}&view=lite"
|
||||
response = self.client.get(url)
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertTemplateUsed(response, "console-spice-lite.html")
|
||||
|
||||
@patch("console.views.wvmInstance")
|
||||
def test_console_superuser_spice_full(self, mock_wvm):
|
||||
def test_console_superuser_spice_deprecated(self, mock_wvm):
|
||||
mock_conn = MagicMock()
|
||||
mock_conn.get_console_type.return_value = "spice"
|
||||
mock_conn.get_console_websocket_port.return_value = None
|
||||
|
|
@ -127,7 +113,8 @@ class ConsoleViewsTestCase(TestCase):
|
|||
response = self.client.get(url)
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertTemplateUsed(response, "console-spice-full.html")
|
||||
self.assertTemplateUsed(response, "console-vnc-lite.html")
|
||||
self.assertIn("SPICE", str(response.context["console_error"]))
|
||||
|
||||
@patch("console.views.wvmInstance")
|
||||
def test_console_superuser_pty(self, mock_wvm):
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@ def console(request):
|
|||
if ws_path:
|
||||
ws_path = ws_path.strip("/") + "/" if ws_path.strip("/") else ""
|
||||
|
||||
if console_type == "vnc" or console_type == "spice":
|
||||
console_page = "console-" + console_type + "-" + view_type + ".html"
|
||||
if console_type == "vnc":
|
||||
console_page = "console-vnc-" + view_type + ".html"
|
||||
response = render(request, console_page, locals())
|
||||
elif console_type == "pty":
|
||||
socketio_public_host = getattr(settings, "SOCKETIO_PUBLIC_HOST", None)
|
||||
|
|
@ -127,6 +127,11 @@ def console(request):
|
|||
console_error = _(
|
||||
"Fail to get console. Please check the console configuration of your VM."
|
||||
)
|
||||
elif console_type == "spice":
|
||||
console_error = _(
|
||||
"SPICE console protocol is deprecated and no longer supported. "
|
||||
"Please switch VM graphics to VNC."
|
||||
)
|
||||
else:
|
||||
console_error = _("Console type '%(type)s' has not support") % {
|
||||
"type": console_type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue