-
+
+
diff --git a/public/app/core/components/navbar/navbar.ts b/public/app/core/components/navbar/navbar.ts
index fae27a8d5c7..8938ac4adcc 100644
--- a/public/app/core/components/navbar/navbar.ts
+++ b/public/app/core/components/navbar/navbar.ts
@@ -8,13 +8,9 @@ import {NavModel, NavModelItem} from '../../nav_model_srv';
export class NavbarCtrl {
model: NavModel;
- section: NavModelItem;
- hasMenu: boolean;
/** @ngInject */
constructor(private $scope, private $rootScope, private contextSrv) {
- this.section = this.model.section;
- this.hasMenu = this.model.menu.length > 0;
}
showSearch() {
@@ -35,13 +31,11 @@ export function navbarDirective() {
templateUrl: 'public/app/core/components/navbar/navbar.html',
controller: NavbarCtrl,
bindToController: true,
- transclude: true,
controllerAs: 'ctrl',
scope: {
model: "=",
},
link: function(scope, elem) {
- elem.addClass('navbar');
}
};
}
diff --git a/public/app/core/nav_model_srv.ts b/public/app/core/nav_model_srv.ts
index 67a221bfcb4..e64bb2f74c5 100644
--- a/public/app/core/nav_model_srv.ts
+++ b/public/app/core/nav_model_srv.ts
@@ -37,14 +37,19 @@ export class NavModelSrv {
getDatasourceNav(subPage) {
return {
- section: {
- title: 'Data Sources',
- url: 'datasources',
- icon: 'icon-gf icon-gf-datasources'
- },
- menu: [
- {title: 'List view', active: subPage === 0, url: 'datasources', icon: 'fa fa-list-ul'},
- {title: 'Add data source', active: subPage === 1, url: 'datasources/new', icon: 'fa fa-plus'},
+ items: [
+ {
+ title: 'Configuration',
+ items: [
+ {title: 'Data sources', active: subPage === 0, url: 'datasources', icon: 'fa fa-database'},
+ {title: 'Users', active: subPage === 0, url: 'users', icon: 'fa fa-fw fa-users'},
+ {title: 'Plugins', active: subPage === 0, url: 'plugins', icon: 'icon-gf icon-gf-apps'},
+ ]
+ },
+ {
+ title: 'Data sources',
+ url: 'datasources',
+ }
]
};
}
diff --git a/public/app/features/dashboard/dashnav/dashnav.html b/public/app/features/dashboard/dashnav/dashnav.html
index c88af17f8da..9fe6cfb9a1e 100644
--- a/public/app/features/dashboard/dashnav/dashnav.html
+++ b/public/app/features/dashboard/dashnav/dashnav.html
@@ -1,64 +1,83 @@
-
+
+
+
-
+
-
+
+ -
+
+
+
+
+ -
+
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
diff --git a/public/app/features/dashboard/dashnav/dashnav.ts b/public/app/features/dashboard/dashnav/dashnav.ts
index ed623fd70f8..c52d3186142 100644
--- a/public/app/features/dashboard/dashnav/dashnav.ts
+++ b/public/app/features/dashboard/dashnav/dashnav.ts
@@ -144,6 +144,17 @@ export class DashNavCtrl {
onFolderChange(folderId) {
this.dashboard.folderId = folderId;
}
+
+ showSearch() {
+ this.$rootScope.appEvent('show-dash-search');
+ }
+
+ navItemClicked(navItem, evt) {
+ if (navItem.clickHandler) {
+ navItem.clickHandler();
+ evt.preventDefault();
+ }
+ }
}
export function dashNavDirective() {
diff --git a/public/app/features/plugins/ds_edit_ctrl.ts b/public/app/features/plugins/ds_edit_ctrl.ts
index b577ad3131b..e0d402bb802 100644
--- a/public/app/features/plugins/ds_edit_ctrl.ts
+++ b/public/app/features/plugins/ds_edit_ctrl.ts
@@ -44,7 +44,6 @@ export class DataSourceEditCtrl {
) {
this.navModel = navModelSrv.getDatasourceNav(0);
- this.isNew = true;
this.datasources = [];
this.tabIndex = 0;
@@ -58,6 +57,7 @@ export class DataSourceEditCtrl {
}
initNewDatasourceModel() {
+ this.isNew = true;
this.current = angular.copy(defaults);
// We are coming from getting started
diff --git a/public/app/features/plugins/partials/ds_edit.html b/public/app/features/plugins/partials/ds_edit.html
index 96c4d2b3836..549cc86f856 100644
--- a/public/app/features/plugins/partials/ds_edit.html
+++ b/public/app/features/plugins/partials/ds_edit.html
@@ -1,23 +1,10 @@
-