Make dashboard JSON editable

This commit is contained in:
Andrzej Ressel
2018-04-08 20:00:18 +02:00
parent ce787b88bf
commit dc11f1da81
2 changed files with 12 additions and 2 deletions

View File

@@ -134,7 +134,13 @@ export class SettingsCtrl {
}
saveDashboard() {
this.dashboardSrv.saveDashboard();
if (this.viewId === 'view_json') {
this.dashboardSrv.saveJSONDashboard(this.json).then(() => {
window.location.reload();
});
} else {
this.dashboardSrv.saveDashboard();
}
}
onPostSave() {