diff --git a/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx b/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx index a5a78a63bf1..1583303dfa1 100644 --- a/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx +++ b/public/app/core/components/EmptyListCTA/EmptyListCTA.tsx @@ -1,4 +1,4 @@ -import React, { Component } from 'react'; +import React, { Component } from 'react'; export interface IProps { model: any; @@ -17,7 +17,7 @@ class EmptyListCTA extends Component { proTipTarget } = this.props.model; return ( -
+
{title}
{buttonTitle}
diff --git a/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.jest.tsx.snap b/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.jest.tsx.snap index 0598d7ecd4e..0da3d94aaa8 100644 --- a/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.jest.tsx.snap +++ b/public/app/core/components/EmptyListCTA/__snapshots__/EmptyListCTA.jest.tsx.snap @@ -2,7 +2,7 @@ exports[`CollorPalette renders correctly 1`] = `
- import coreModule from 'app/core/core_module'; var template = ` diff --git a/public/app/core/directives/dash_class.js b/public/app/core/directives/dash_class.js index d8ad335de5c..9df53bdbd48 100644 --- a/public/app/core/directives/dash_class.js +++ b/public/app/core/directives/dash_class.js @@ -18,22 +18,21 @@ function (_, $, coreModule) { elem.toggleClass('panel-in-fullscreen', false); }); - var lastHideControlsVal; - $scope.$watch('ctrl.dashboard.hideControls', function() { - if (!$scope.dashboard) { - return; - } - - var hideControls = $scope.dashboard.hideControls; - if (lastHideControlsVal !== hideControls) { - elem.toggleClass('hide-controls', hideControls); - lastHideControlsVal = hideControls; - } - }); - $scope.$watch('ctrl.playlistSrv.isPlaying', function(newValue) { elem.toggleClass('playlist-active', newValue === true); }); + + $scope.$watch('ctrl.dashboardViewState.state.editview', function(newValue) { + if (newValue) { + elem.toggleClass('dashboard-page--settings-opening', _.isString(newValue)); + setTimeout(function() { + elem.toggleClass('dashboard-page--settings-open', _.isString(newValue)); + }, 10); + } else { + elem.removeClass('dashboard-page--settings-opening'); + elem.removeClass('dashboard-page--settings-open'); + } + }); } }; }); diff --git a/public/app/core/directives/dash_edit_link.js b/public/app/core/directives/dash_edit_link.js index 02c7d55b99e..f0dc6f59a6a 100644 --- a/public/app/core/directives/dash_edit_link.js +++ b/public/app/core/directives/dash_edit_link.js @@ -13,7 +13,6 @@ function ($, angular, coreModule, _) { 'templating': { src: 'public/app/features/templating/partials/editor.html'}, 'history': { html: ''}, 'timepicker': { src: 'public/app/features/dashboard/timepicker/dropdown.html' }, - 'add-panel': { html: '' }, 'import': { html: '', isModal: true }, 'permissions': { html: '', isModal: true }, 'new-folder': { diff --git a/public/app/core/services/keybindingSrv.ts b/public/app/core/services/keybindingSrv.ts index 062eea3506a..362b20fc307 100644 --- a/public/app/core/services/keybindingSrv.ts +++ b/public/app/core/services/keybindingSrv.ts @@ -72,8 +72,8 @@ export class KeybindingSrv { }, 'keydown'); } - showDashEditView(view) { - var search = _.extend(this.$location.search(), {editview: view}); + showDashEditView() { + var search = _.extend(this.$location.search(), {editview: 'settings'}); this.$location.search(search); } @@ -84,10 +84,6 @@ export class KeybindingSrv { scope.broadcastRefresh(); }); - this.bind('mod+h', () => { - dashboard.hideControls = !dashboard.hideControls; - }); - this.bind('mod+s', e => { scope.appEvent('save-dashboard'); }); @@ -197,7 +193,7 @@ export class KeybindingSrv { }); this.bind('d s', () => { - this.showDashEditView('settings'); + this.showDashEditView(); }); this.bind('d k', () => { @@ -215,8 +211,14 @@ export class KeybindingSrv { } scope.appEvent('hide-modal'); - scope.appEvent('hide-dash-editor'); scope.appEvent('panel-change-view', {fullscreen: false, edit: false}); + + // close settings view + var search = this.$location.search(); + if (search.editview) { + delete search.editview; + this.$location.search(search); + } }); } } diff --git a/public/app/core/services/popover_srv.ts b/public/app/core/services/popover_srv.ts index bfbd9e9950e..bf0dae2c631 100644 --- a/public/app/core/services/popover_srv.ts +++ b/public/app/core/services/popover_srv.ts @@ -68,6 +68,13 @@ function popoverSrv($compile, $rootScope, $timeout) { openDrop = drop; openDrop.open(); }, 100); + + // return close function + return function() { + if (drop) { + drop.close(); + } + }; }; } diff --git a/public/app/features/annotations/annotation_tooltip.ts b/public/app/features/annotations/annotation_tooltip.ts index 4828eb671a6..03d42c382f7 100644 --- a/public/app/features/annotations/annotation_tooltip.ts +++ b/public/app/features/annotations/annotation_tooltip.ts @@ -4,7 +4,7 @@ import coreModule from 'app/core/core_module'; import alertDef from '../alerting/alert_def'; /** @ngInject **/ -export function annotationTooltipDirective($sanitize, dashboardSrv, contextSrv, popoverSrv, $compile) { +export function annotationTooltipDirective($sanitize, dashboardSrv, contextSrv, $compile) { function sanitizeString(str) { try { diff --git a/public/app/features/annotations/editor_ctrl.ts b/public/app/features/annotations/editor_ctrl.ts index a52e241ce35..f83de99a8c6 100644 --- a/public/app/features/annotations/editor_ctrl.ts +++ b/public/app/features/annotations/editor_ctrl.ts @@ -26,7 +26,7 @@ export class AnnotationsEditorCtrl { ]; /** @ngInject */ - constructor(private $scope, private datasourceSrv) { + constructor($scope, private datasourceSrv) { $scope.ctrl = this; this.mode = 'list'; @@ -62,7 +62,6 @@ export class AnnotationsEditorCtrl { update() { this.reset(); this.mode = 'list'; - this.$scope.broadcastRefresh(); } setupNew() { @@ -70,32 +69,24 @@ export class AnnotationsEditorCtrl { this.reset(); } + backToList() { + this.mode = 'list'; + } + add() { this.annotations.push(this.currentAnnotation); this.reset(); this.mode = 'list'; - this.$scope.broadcastRefresh(); - this.$scope.dashboard.updateSubmenuVisibility(); } removeAnnotation(annotation) { var index = _.indexOf(this.annotations, annotation); this.annotations.splice(index, 1); - this.$scope.dashboard.updateSubmenuVisibility(); - this.$scope.broadcastRefresh(); } onColorChange(newColor) { this.currentAnnotation.iconColor = newColor; } - - annotationEnabledChange() { - this.$scope.broadcastRefresh(); - } - - annotationHiddenChanged() { - this.$scope.dashboard.updateSubmenuVisibility(); - } } coreModule.controller('AnnotationsEditorCtrl', AnnotationsEditorCtrl); diff --git a/public/app/features/annotations/partials/editor.html b/public/app/features/annotations/partials/editor.html index 4c0b8f7b127..62175e5278f 100644 --- a/public/app/features/annotations/partials/editor.html +++ b/public/app/features/annotations/partials/editor.html @@ -1,145 +1,113 @@ +
-
-

- Annotations -

+

+ Annotations + > New + > Edit +

- - - -
- -
- -
-
-
What are Annotations?
-

- Annotations provide a way to integrate event data into your graphs. They are visualized as vertical lines and icons - on all graph panels. When you hover over an annotation icon you can get title, tags, and text information for the event. - In the Queries tab you can add queries that return annotation events. -

-

- You can add annotations directly from grafana by holding CTRL or CMD + click on graph (or drag region). These will be stored in Grafana's annotation database. -

- Checkout the Annotations documentation for more information. -
+
+
+
+ New
-
-
- No annotation queries defined -
- +
+ + + + + + + + - - + - -
Query nameData source
+   {{annotation.name}} +   {{annotation.name}} (Built-in) + {{annotation.datasource || 'Default'}} + - - - Edit - -
-
+ + -
-
-   New -
-
- -
-
-
-
General
-
-
- Name - -
-
- Data source -
- -
-
-
-
- -
-
- - - - -
- - - - -
-
-
-
- -
Query
- - - - - -
-
- - + +
+
+
There are no custom annotation queries added yet
+ + + Add Annotation Query + +
+
What are Annotations?
+

+ Annotations provide a way to integrate event data into your graphs. They are visualized as vertical lines and icons + on all graph panels. When you hover over an annotation icon you can get event text & tags for the event. You can add annotation events + directly from grafana by holding CTRL or CMD + click on graph (or drag region). These will be stored in Grafana's annotation database. +

+ Checkout the Annotations documentation for more information.
+ +
+
+
General
+
+
+ Name + +
+
+ Data source +
+ +
+
+
+
+ +
+
+ + + + +
+ + + + +
+
+
+ +
Query
+ + + + + +
+
+ + +
+
+
diff --git a/public/app/features/dashboard/all.ts b/public/app/features/dashboard/all.ts index 50c83803471..e9ca2a854be 100644 --- a/public/app/features/dashboard/all.ts +++ b/public/app/features/dashboard/all.ts @@ -26,8 +26,9 @@ import './acl/acl'; import './folder_picker/picker'; import './folder_modal/folder'; import './move_to_folder_modal/move_to_folder'; -import coreModule from 'app/core/core_module'; +import './settings/settings'; +import coreModule from 'app/core/core_module'; import {DashboardListCtrl} from './dashboard_list_ctrl'; import {FolderDashboardsCtrl} from './folder_dashboards_ctrl'; import {FolderPermissionsCtrl} from './folder_permissions_ctrl'; diff --git a/public/app/features/dashboard/dashboard_ctrl.ts b/public/app/features/dashboard/dashboard_ctrl.ts index 2c9d028ddf8..2909c55bad5 100644 --- a/public/app/features/dashboard/dashboard_ctrl.ts +++ b/public/app/features/dashboard/dashboard_ctrl.ts @@ -122,12 +122,6 @@ export class DashboardCtrl implements PanelContainer { this.$rootScope.$broadcast("refresh"); } - onFolderChange(folder) { - this.dashboard.folderId = folder.id; - this.dashboard.meta.folderId = folder.id; - this.dashboard.meta.folderTitle= folder.title; - } - getPanelContainer() { return this; } diff --git a/public/app/features/dashboard/dashboard_model.ts b/public/app/features/dashboard/dashboard_model.ts index 10b0d0da67b..034ad7d84e1 100644 --- a/public/app/features/dashboard/dashboard_model.ts +++ b/public/app/features/dashboard/dashboard_model.ts @@ -22,7 +22,6 @@ export class DashboardModel { graphTooltip: any; time: any; timepicker: any; - hideControls: any; templating: any; annotations: any; refresh: any; @@ -67,7 +66,6 @@ export class DashboardModel { this.timezone = data.timezone || ''; this.editable = data.editable !== false; this.graphTooltip = data.graphTooltip || 0; - this.hideControls = data.hideControls || false; this.time = data.time || {from: 'now-6h', to: 'now'}; this.timepicker = data.timepicker || {}; this.templating = this.ensureListExist(data.templating); diff --git a/public/app/features/dashboard/dashnav/dashnav.html b/public/app/features/dashboard/dashnav/dashnav.html index 62974fb77dd..03453611036 100644 --- a/public/app/features/dashboard/dashnav/dashnav.html +++ b/public/app/features/dashboard/dashnav/dashnav.html @@ -27,40 +27,35 @@ - - - - - +
+ +
diff --git a/public/app/features/dashboard/dashnav/dashnav.ts b/public/app/features/dashboard/dashnav/dashnav.ts index 2b174e2c301..aed803efb9a 100644 --- a/public/app/features/dashboard/dashnav/dashnav.ts +++ b/public/app/features/dashboard/dashnav/dashnav.ts @@ -1,4 +1,3 @@ -import _ from 'lodash'; import moment from 'moment'; import angular from 'angular'; import {appEvents, NavModel} from 'app/core/core'; @@ -15,13 +14,11 @@ export class DashNavCtrl { private $rootScope, private dashboardSrv, private $location, - private backendSrv, public playlistSrv, navModelSrv) { this.navModel = navModelSrv.getDashboardNav(this.dashboard, this); appEvents.on('save-dashboard', this.saveDashboard.bind(this), $scope); - appEvents.on('delete-dashboard', this.deleteDashboard.bind(this), $scope); if (this.dashboard.meta.isSnapshot) { var meta = this.dashboard.meta; @@ -32,13 +29,26 @@ export class DashNavCtrl { } } - openEditView(editview) { - var search = _.extend(this.$location.search(), {editview: editview}); + toggleSettings() { + let search = this.$location.search(); + if (search.editview) { + delete search.editview; + } else { + search.editview = 'settings'; + } this.$location.search(search); } - showHelpModal() { - appEvents.emit('show-modal', {templateHtml: ''}); + close() { + let search = this.$location.search(); + if (search.editview) { + delete search.editview; + } + if (search.fullscreen) { + delete search.fullscreen; + delete search.edit; + } + this.$location.search(search); } starDashboard() { @@ -63,73 +73,10 @@ export class DashNavCtrl { angular.element(evt.currentTarget).tooltip('hide'); } - makeEditable() { - this.dashboard.editable = true; - - return this.dashboardSrv.saveDashboard({makeEditable: true, overwrite: false}).then(() => { - // force refresh whole page - window.location.href = window.location.href; - }); - } - - exitFullscreen() { - this.$rootScope.appEvent('panel-change-view', {fullscreen: false, edit: false}); - } - saveDashboard() { return this.dashboardSrv.saveDashboard(); } - deleteDashboard() { - var confirmText = ''; - var text2 = this.dashboard.title; - - const alerts = _.sumBy(this.dashboard.panels, panel => { - return panel.alert ? 1 : 0; - }); - - if (alerts > 0) { - confirmText = 'DELETE'; - text2 = `This dashboard contains ${alerts} alerts. Deleting this dashboard will also delete those alerts`; - } - - appEvents.emit('confirm-modal', { - title: 'Delete', - text: 'Do you want to delete this dashboard?', - text2: text2, - icon: 'fa-trash', - confirmText: confirmText, - yesText: 'Delete', - onConfirm: () => { - this.dashboard.meta.canSave = false; - this.deleteDashboardConfirmed(); - } - }); - } - - deleteDashboardConfirmed() { - this.backendSrv.delete('/api/dashboards/db/' + this.dashboard.meta.slug).then(() => { - appEvents.emit('alert-success', ['Dashboard Deleted', this.dashboard.title + ' has been deleted']); - this.$location.url('/'); - }); - } - - saveDashboardAs() { - 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() { this.$rootScope.appEvent('show-dash-search'); } diff --git a/public/app/features/dashboard/history/history.html b/public/app/features/dashboard/history/history.html index 7968f1162c5..48caddeb90e 100644 --- a/public/app/features/dashboard/history/history.html +++ b/public/app/features/dashboard/history/history.html @@ -1,146 +1,118 @@ -
-

- Version history -

+

+ Versions + + > Comparing {{ctrl.baseInfo.version}} + + {{ctrl.newInfo.version}} + (Latest) + +

- +
+
+ + Fetching history list… +
- -
+
+
+ + + + + + + + + + + + + + + + + + + + + +
VersionDateUpdated ByNotes
+ + + {{revision.version}}{{revision.createdDateString}}{{revision.createdBy}}{{revision.message}} + +   Restore + + +   Latest + +
-
- -
-
- - Fetching history list… -
- -
-
- - - - - - - - - - - - - - - - - - - - - -
VersionDateUpdated ByNotes
- - - {{revision.version}}{{revision.createdDateString}}{{revision.createdBy}}{{revision.message}} - -   Restore - - -   Latest - -
- -
- - Fetching more entries… -
- -
-
- - -
-
-
-
-
- -
- - -
-
+
- Fetching changes… + Fetching more entries…
-
- -   Restore to version {{ctrl.baseInfo.version}} - -

- Comparing Version {{ctrl.baseInfo.version}} - - Version {{ctrl.newInfo.version}} - (Latest) -

-
-

- Version {{ctrl.newInfo.version}} updated by - {{ctrl.newInfo.createdBy}} - {{ctrl.newInfo.ageString}} - - {{ctrl.newInfo.message}} -

-

- Version {{ctrl.baseInfo.version}} updated by - {{ctrl.baseInfo.createdBy}} - {{ctrl.baseInfo.ageString}} - - {{ctrl.baseInfo.message}} -

-
-
-
-
+
+
+ +
+ +
+
+ + Fetching changes… +
+ +
+ +
+

+ Version {{ctrl.newInfo.version}} updated by + {{ctrl.newInfo.createdBy}} + {{ctrl.newInfo.ageString}} + - {{ctrl.newInfo.message}} +

+

+ Version {{ctrl.baseInfo.version}} updated by + {{ctrl.baseInfo.createdBy}} + {{ctrl.baseInfo.ageString}} + - {{ctrl.baseInfo.message}} +

+
+ +
+
+
+ +
+ +
+ +
+
+
diff --git a/public/app/features/dashboard/history/history.ts b/public/app/features/dashboard/history/history.ts index b0dee045a6a..05e78d08989 100644 --- a/public/app/features/dashboard/history/history.ts +++ b/public/app/features/dashboard/history/history.ts @@ -1,5 +1,3 @@ -/// - import './history_srv'; import _ from 'lodash'; diff --git a/public/app/features/dashboard/partials/addAnnotationModal.html b/public/app/features/dashboard/partials/addAnnotationModal.html deleted file mode 100644 index f55f888375f..00000000000 --- a/public/app/features/dashboard/partials/addAnnotationModal.html +++ /dev/null @@ -1,65 +0,0 @@ - -
diff --git a/public/app/features/dashboard/partials/settings.html b/public/app/features/dashboard/partials/settings.html deleted file mode 100644 index 77d6691f8f9..00000000000 --- a/public/app/features/dashboard/partials/settings.html +++ /dev/null @@ -1,95 +0,0 @@ -
-

- Settings -

- - - - -
- -
-
- -
-
Details
-
- - -
-
- - -
-
- - - -
- - -
- -
-
Options
-
-
- -
- -
-
- - - - -
-
- -
-
Panel Options
-
- -
- -
-
-
-
- -
- -
- -
- -
- -
diff --git a/public/app/features/dashboard/save_as_modal.ts b/public/app/features/dashboard/save_as_modal.ts index 643d6a36f67..d69b64f1960 100644 --- a/public/app/features/dashboard/save_as_modal.ts +++ b/public/app/features/dashboard/save_as_modal.ts @@ -1,5 +1,3 @@ -/// - import coreModule from 'app/core/core_module'; const template = ` diff --git a/public/app/features/dashboard/settings/settings.html b/public/app/features/dashboard/settings/settings.html new file mode 100644 index 00000000000..e78dcb74127 --- /dev/null +++ b/public/app/features/dashboard/settings/settings.html @@ -0,0 +1,109 @@ + + +
+

+ General +

+ +
+
+ + +
+
+ + +
+
+ + + +
+ + + + +
+ + + +
Panel Options
+
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+ +
+

View JSON

+ +
+ +
+
+ +
+

Settings view not found

+ +
+
The settings page could not be found or you do not have permission to access it
+
+
+ +
+

Make Editable

+ + +
+ diff --git a/public/app/features/dashboard/settings/settings.ts b/public/app/features/dashboard/settings/settings.ts new file mode 100644 index 00000000000..87ac91d568b --- /dev/null +++ b/public/app/features/dashboard/settings/settings.ts @@ -0,0 +1,156 @@ +import { coreModule, appEvents, contextSrv } from 'app/core/core'; +import { DashboardModel } from '../dashboard_model'; +import $ from 'jquery'; +import _ from 'lodash'; + +export class SettingsCtrl { + dashboard: DashboardModel; + isOpen: boolean; + viewId: string; + json: string; + alertCount: number; + canSaveAs: boolean; + canDelete: boolean; + sections: any[]; + + /** @ngInject */ + constructor(private $scope, private $location, private $rootScope, private backendSrv, private dashboardSrv) { + // temp hack for annotations and variables editors + // that rely on inherited scope + $scope.dashboard = this.dashboard; + + this.$scope.$on('$destroy', () => { + this.dashboard.updateSubmenuVisibility(); + this.$rootScope.$broadcast('refresh'); + }); + + this.canSaveAs = contextSrv.isEditor; + this.canDelete = this.dashboard.meta.canSave; + + this.buildSectionList(); + this.onRouteUpdated(); + + $rootScope.onAppEvent('$routeUpdate', this.onRouteUpdated.bind(this), $scope); + } + + buildSectionList() { + this.sections = []; + if (this.dashboard.meta.canEdit) { + this.sections.push({ title: 'General', id: 'settings', icon: 'fa fa-fw fa-sliders' }); + this.sections.push({ title: 'Annotations', id: 'annotations', icon: 'fa fa-fw fa-comment-o' }); + this.sections.push({ title: 'Variables', id: 'templating', icon: 'fa fa-fw fa-dollar' }); + this.sections.push({ title: 'Links', id: 'links', icon: 'fa fa-fw fa-external-link' }); + + if (this.dashboard.id) { + this.sections.push({ title: 'Versions', id: 'versions', icon: 'fa fa-fw fa-history' }); + } + } + + if (contextSrv.isEditor && !this.dashboard.editable) { + this.sections.push({ title: 'Make Editable', icon: 'fa fa-fw fa-edit', id: 'make_editable' }); + this.viewId = 'make_editable'; + } + + this.sections.push({ title: 'View JSON', id: 'view_json', icon: 'fa fa-fw fa-code' }); + + const params = this.$location.search(); + const url = this.$location.path(); + + for (let section of this.sections) { + const sectionParams = _.defaults({ editview: section.id }, params); + section.url = url + '?' + $.param(sectionParams); + } + } + + onRouteUpdated() { + this.viewId = this.$location.search().editview; + + if (this.viewId) { + this.json = JSON.stringify(this.dashboard.getSaveModelClone(), null, 2); + } + + const currentSection = _.find(this.sections, { id: this.viewId }); + if (!currentSection) { + this.sections.unshift({ title: 'Not found', id: '404', icon: 'fa fa-fw fa-warning' }); + this.viewId = '404'; + return; + } + } + + openSaveAsModal() { + this.dashboardSrv.showSaveAsModal(); + } + + hideSettings() { + var urlParams = this.$location.search(); + delete urlParams.editview; + setTimeout(() => { + this.$rootScope.$apply(() => { + this.$location.search(urlParams); + }); + }); + } + + makeEditable() { + this.dashboard.editable = true; + + return this.dashboardSrv.saveDashboard({ makeEditable: true, overwrite: false }).then(() => { + // force refresh whole page + window.location.href = window.location.href; + }); + } + + deleteDashboard() { + var confirmText = ''; + var text2 = this.dashboard.title; + + const alerts = _.sumBy(this.dashboard.panels, panel => { + return panel.alert ? 1 : 0; + }); + + if (alerts > 0) { + confirmText = 'DELETE'; + text2 = `This dashboard contains ${alerts} alerts. Deleting this dashboard will also delete those alerts`; + } + + appEvents.emit('confirm-modal', { + title: 'Delete', + text: 'Do you want to delete this dashboard?', + text2: text2, + icon: 'fa-trash', + confirmText: confirmText, + yesText: 'Delete', + onConfirm: () => { + this.dashboard.meta.canSave = false; + this.deleteDashboardConfirmed(); + } + }); + } + + deleteDashboardConfirmed() { + this.backendSrv.delete('/api/dashboards/db/' + this.dashboard.meta.slug).then(() => { + appEvents.emit('alert-success', ['Dashboard Deleted', this.dashboard.title + ' has been deleted']); + this.$location.url('/'); + }); + } + + onFolderChange(folder) { + this.dashboard.folderId = folder.id; + this.dashboard.meta.folderId = folder.id; + this.dashboard.meta.folderTitle = folder.title; + } +} + +export function dashboardSettings() { + return { + restrict: 'E', + templateUrl: 'public/app/features/dashboard/settings/settings.html', + controller: SettingsCtrl, + bindToController: true, + controllerAs: 'ctrl', + transclude: true, + scope: { dashboard: '=' }, + }; +} + +coreModule.directive('dashboardSettings', dashboardSettings); diff --git a/public/app/features/dashboard/specs/save_as_modal.jest.ts b/public/app/features/dashboard/specs/save_as_modal.jest.ts index b2ab77f2255..9155f59ca70 100644 --- a/public/app/features/dashboard/specs/save_as_modal.jest.ts +++ b/public/app/features/dashboard/specs/save_as_modal.jest.ts @@ -1,4 +1,4 @@ -import { SaveDashboardAsModalCtrl } from '../save_as_modal'; +import { SaveDashboardAsModalCtrl } from '../save_as_modal; import { describe, it, expect } from 'test/lib/common'; describe('saving dashboard as', () => { diff --git a/public/app/features/dashboard/submenu/submenu.html b/public/app/features/dashboard/submenu/submenu.html index 9e9d22fb495..f240a86efba 100644 --- a/public/app/features/dashboard/submenu/submenu.html +++ b/public/app/features/dashboard/submenu/submenu.html @@ -1,5 +1,4 @@