Commit 7f597283 by Torkel Ödegaard

ux: dashboard settings progress

parent 61dbcfd3
...@@ -122,12 +122,6 @@ export class DashboardCtrl implements PanelContainer { ...@@ -122,12 +122,6 @@ export class DashboardCtrl implements PanelContainer {
this.$rootScope.$broadcast("refresh"); this.$rootScope.$broadcast("refresh");
} }
onFolderChange(folder) {
this.dashboard.folderId = folder.id;
this.dashboard.meta.folderId = folder.id;
this.dashboard.meta.folderTitle= folder.title;
}
getPanelContainer() { getPanelContainer() {
return this; return this;
} }
......
...@@ -131,18 +131,6 @@ export class DashNavCtrl { ...@@ -131,18 +131,6 @@ export class DashNavCtrl {
return this.dashboardSrv.showSaveAsModal(); return this.dashboardSrv.showSaveAsModal();
} }
viewJson() {
var clone = this.dashboard.getSaveModelClone();
this.$rootScope.appEvent('show-json-editor', {
object: clone,
});
}
onFolderChange(folderId) {
this.dashboard.folderId = folderId;
}
showSearch() { showSearch() {
this.$rootScope.appEvent('show-dash-search'); this.$rootScope.appEvent('show-dash-search');
} }
......
...@@ -56,8 +56,7 @@ ...@@ -56,8 +56,7 @@
</div> </div>
<!-- <div ng&#45;if="editor.index == 1"> --> <!-- <div ng&#45;if="editor.index == 1"> -->
<!-- <dash&#45;links&#45;editor></dash&#45;links&#45;editor> --> </div>
<!-- </div> -->
<!-- --> <!-- -->
<!-- <div ng&#45;if="editor.index == 2"> --> <!-- <div ng&#45;if="editor.index == 2"> -->
<!-- </div> --> <!-- </div> -->
......
...@@ -62,3 +62,7 @@ ...@@ -62,3 +62,7 @@
<div class="dashboard-settings__content" ng-if="ctrl.viewId === 'templating'" ng-include="'public/app/features/templating/partials/editor.html'"> <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'templating'" ng-include="'public/app/features/templating/partials/editor.html'">
</div> </div>
<div class="dashboard-settings__content" ng-if="ctrl.viewId === 'links'" >
<dash-links-editor></dash-links-editor>
</div>
...@@ -21,8 +21,9 @@ export class SettingsCtrl { ...@@ -21,8 +21,9 @@ export class SettingsCtrl {
/** @ngInject */ /** @ngInject */
constructor(private $scope, private $location, private $rootScope) { constructor(private $scope, private $location, private $rootScope) {
// temp hack // temp hack for annotations and variables editors
this.$scope.dashboard = this.dashboard; // that rely on inherited scope
$scope.dashboard = this.dashboard;
const params = this.$location.search(); const params = this.$location.search();
const url = $location.path(); const url = $location.path();
...@@ -56,6 +57,12 @@ export class SettingsCtrl { ...@@ -56,6 +57,12 @@ export class SettingsCtrl {
}); });
}); });
} }
onFolderChange(folder) {
this.dashboard.folderId = folder.id;
this.dashboard.meta.folderId = folder.id;
this.dashboard.meta.folderTitle= folder.title;
}
} }
export function dashboardSettings() { export function dashboardSettings() {
......
<div class="editor-row"> <h3 class="dashboard-settings__header">
<h5 class="section-heading">Links and Dash Navigation</h5> Dashboard Links
</h3>
<div ng-repeat="link in dashboard.links">
<div ng-repeat="link in dashboard.links">
<div class="gf-form-group gf-form-inline"> <div class="gf-form-group gf-form-inline">
<div class="section"> <div class="section">
<div class="gf-form"> <div class="gf-form">
...@@ -72,9 +72,6 @@ ...@@ -72,9 +72,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
<button class="btn btn-inverse" ng-click="addLink()"><i class="fa fa-plus"></i> Add link</button> <button class="btn btn-inverse" ng-click="addLink()"><i class="fa fa-plus"></i> Add link</button>
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