mirror of https://github.com/grafana/grafana.git
fix: fixed save to file button in export modal, fixes #9586
This commit is contained in:
parent
e8141b48d2
commit
1e61eae9f4
|
|
@ -1,8 +1,7 @@
|
|||
///<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: '&'},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue