Commit 1e61eae9 by Torkel Ödegaard

fix: fixed save to file button in export modal, fixes #9586

parent e8141b48
///<reference path="../../../headers/common.d.ts" />
import angular from 'angular';
import coreModule from 'app/core/core_module';
import {saveAs} from 'file-saver';
import coreModule from 'app/core/core_module';
import {DashboardExporter} from './exporter';
export class DashExportCtrl {
......@@ -22,9 +21,8 @@ export class DashExportCtrl {
}
save() {
var blob = new Blob([angular.toJson(this.dash, true)], { type: "application/json;charset=utf-8" });
var wnd: any = window;
wnd.saveAs(blob, this.dash.title + '-' + new Date().getTime() + '.json');
var blob = new Blob([angular.toJson(this.dash, true)], {type: 'application/json;charset=utf-8'});
saveAs(blob, this.dash.title + '-' + new Date().getTime() + '.json');
}
saveJson() {
......@@ -44,7 +42,7 @@ export function dashExportDirective() {
controller: DashExportCtrl,
bindToController: true,
controllerAs: 'ctrl',
scope: {dismiss: "&"}
scope: {dismiss: '&'},
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment