Commit ba3dbac5 by Torkel Ödegaard

fix: view json from share modal now works, #10217

parent bd7837e8
...@@ -10,7 +10,7 @@ export class DashExportCtrl { ...@@ -10,7 +10,7 @@ export class DashExportCtrl {
dismiss: () => void; dismiss: () => void;
/** @ngInject */ /** @ngInject */
constructor(private dashboardSrv, datasourceSrv, private $scope) { constructor(private dashboardSrv, datasourceSrv, private $scope, private $rootScope) {
this.exporter = new DashboardExporter(datasourceSrv); this.exporter = new DashboardExporter(datasourceSrv);
this.exporter.makeExportable(this.dashboardSrv.getCurrent()).then(dash => { this.exporter.makeExportable(this.dashboardSrv.getCurrent()).then(dash => {
...@@ -27,10 +27,14 @@ export class DashExportCtrl { ...@@ -27,10 +27,14 @@ export class DashExportCtrl {
saveJson() { saveJson() {
var clone = this.dash; var clone = this.dash;
let editScope = this.$rootScope.$new();
editScope.object = clone;
this.$scope.$root.appEvent('show-json-editor', { this.$rootScope.appEvent('show-modal', {
object: clone, src: 'public/app/partials/edit_json.html',
scope: editScope
}); });
this.dismiss(); this.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