Fixes dashboard export button missing download and #7353 (#7427)

This commit is contained in:
Russell Jurney 2019-05-01 21:04:28 -07:00 committed by Maxime Beauchemin
parent 70be44afe1
commit f6ebd789bf
1 changed files with 11 additions and 2 deletions

View File

@ -18,7 +18,16 @@
#}
<script>
window.onload = function() {
window.open(window.location += '&action=go', '_blank');
window.location = '{{ dashboards_url }}';
// See issue #7353, window.open fails
var a = document.createElement('a');
a.href = window.location + '&action=go';
a.download = 'dashboards.json';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
window.location = '{{ dashboards_url }}';
};
</script>