Skip to content

Commit

Permalink
Fixes dashboard export button missing download and #7353 (#7427)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjurney authored and mistercrunch committed May 2, 2019
1 parent 70be44a commit f6ebd78
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions superset/templates/superset/export_dashboards.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit f6ebd78

Please sign in to comment.