Fixed downloading of monitor parameters for IE11 and Edge
Related-to: 5389a26b92
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
cae7efe039
commit
038c654ec4
@ -573,11 +573,19 @@ AJAX.registerOnload('server_status_monitor.js', function () {
|
||||
};
|
||||
|
||||
var blob = new Blob([JSON.stringify(exportData)], { type: 'application/octet-stream' });
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
window.location.href = url;
|
||||
var url = null;
|
||||
var fileName = 'monitor-config.json';
|
||||
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
||||
window.navigator.msSaveOrOpenBlob(blob, fileName);
|
||||
} else {
|
||||
url = URL.createObjectURL(blob);
|
||||
window.location.href = url;
|
||||
}
|
||||
setTimeout(function () {
|
||||
// For some browsers it is necessary to delay revoking the ObjectURL
|
||||
window.URL.revokeObjectURL(url);
|
||||
if (url !== null) {
|
||||
window.URL.revokeObjectURL(url);
|
||||
}
|
||||
url = undefined;
|
||||
blob = undefined;
|
||||
}, 100);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user