1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

M #~: Fix virt viewer filename (#1069)

This commit is contained in:
Sergio Betanzos 2021-04-06 19:28:53 +02:00 committed by GitHub
parent 7cacb2981a
commit 5d30289d4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@
define(function(require) {
var Config = require('sunstone-config');
var UtilsConnection = require("utils/info-connection/utils");
return {
"downloadWFile": _downloadWFile,
@ -31,9 +32,12 @@ define(function(require) {
var protocol = window.location.protocol;
var proxy_host = window.location.hostname;
var proxy_port = Config.vncProxyPort;
var info_decode = UtilsConnection.decodeInfoConnection(response["info"]);
var filename = info_decode["name"]
var token = response["token"];
var password = response["password"];
var vm_name = response["vm_name"];
if ($.inArray(graphics_type, ['spice', 'vnc']) < 0) {
Notifier.notifyError(Locale.tr("Type graphics supported: vnc, spice"));
@ -52,8 +56,8 @@ define(function(require) {
var proxy = protocol + "//" + proxy_host + ":" + proxy_port + "?token=" + token;
var file = _wFile(graphics_type, vm_name, vm_host, graphics_port, proxy, password);
_download(vm_name, ".vv", file);
var file = _wFile(graphics_type, filename, vm_host, graphics_port, proxy, password);
_download(filename, ".vv", file);
}
function _download(name, extension, text) {