fix: refactoring PR #11996 and fixing issue #11551 16706hashkey in json editors

This commit is contained in:
Torkel Ödegaard
2018-05-29 14:02:52 +02:00
parent 634a26d2eb
commit be34417b3a
4 changed files with 9 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ import { coreModule, appEvents, contextSrv } from 'app/core/core';
import { DashboardModel } from '../dashboard_model';
import $ from 'jquery';
import _ from 'lodash';
import angular from 'angular';
import config from 'app/core/config';
export class SettingsCtrl {
@@ -118,7 +119,7 @@ export class SettingsCtrl {
this.viewId = this.$location.search().editview;
if (this.viewId) {
this.json = JSON.stringify(this.dashboard.getSaveModelClone(), null, 2);
this.json = angular.toJson(this.dashboard.getSaveModelClone(), true);
}
if (this.viewId === 'settings' && this.dashboard.meta.canMakeEditable) {