diff --git a/public/app/core/services/keybindingSrv.ts b/public/app/core/services/keybindingSrv.ts index 7abc3993e9d..acf0123962b 100644 --- a/public/app/core/services/keybindingSrv.ts +++ b/public/app/core/services/keybindingSrv.ts @@ -83,10 +83,6 @@ export class KeybindingSrv { } setupDashboardBindings(scope, dashboard) { - // this.bind('b', () => { - // dashboard.toggleEditMode(); - // }); - this.bind('mod+o', () => { dashboard.graphTooltip = (dashboard.graphTooltip + 1) % 3; appEvents.emit('graph-hover-clear'); diff --git a/public/app/features/annotations/editor_ctrl.ts b/public/app/features/annotations/editor_ctrl.ts index cb76045dbec..a0a8fda01d1 100644 --- a/public/app/features/annotations/editor_ctrl.ts +++ b/public/app/features/annotations/editor_ctrl.ts @@ -17,9 +17,16 @@ export class AnnotationsEditorCtrl { name: '', datasource: null, iconColor: 'rgba(255, 96, 96, 1)', - enable: true + enable: true, + show: 0, + hide: false, }; + showOptions: any = [ + {text: 'All Panels', value: 0}, + {text: 'Specifc Panels', value: 1}, + ]; + /** @ngInject */ constructor(private $scope, private datasourceSrv) { $scope.ctrl = this; @@ -44,6 +51,7 @@ export class AnnotationsEditorCtrl { edit(annotation) { this.currentAnnotation = annotation; + this.currentAnnotation.show = this.currentAnnotation.show || 0; this.currentIsNew = false; this.datasourceChanged(); this.mode = 'edit'; @@ -74,7 +82,7 @@ export class AnnotationsEditorCtrl { removeAnnotation(annotation) { var index = _.indexOf(this.annotations, annotation); this.annotations.splice(index, 1); - this.$scope.updateSubmenuVisibility(); + this.$scope.dashboard.updateSubmenuVisibility(); this.$scope.broadcastRefresh(); } } diff --git a/public/app/features/annotations/partials/editor.html b/public/app/features/annotations/partials/editor.html index 0bfc8bb2028..b5c631ec6a8 100644 --- a/public/app/features/annotations/partials/editor.html +++ b/public/app/features/annotations/partials/editor.html @@ -7,16 +7,16 @@