Fix downloading of monitor parameters

- Added some delay because some browsers will say they can not find the 'file' (blob) error: 404
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2019-03-30 11:52:58 +01:00
parent 987e286c23
commit 5389a26b92
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -575,7 +575,12 @@ 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;
window.URL.revokeObjectURL(url);
setTimeout(function () {
// For some browsers it is necessary to delay revoking the ObjectURL
window.URL.revokeObjectURL(url);
url = undefined;
blob = undefined;
}, 100);
});
$('a[href="#importMonitorConfig"]').click(function (event) {