diff --git a/src/app/controllers/sidemenuCtrl.js b/src/app/controllers/sidemenuCtrl.js
index 28e826646e8..708564d8a8a 100644
--- a/src/app/controllers/sidemenuCtrl.js
+++ b/src/app/controllers/sidemenuCtrl.js
@@ -17,17 +17,16 @@ function (angular, _, $, config) {
$scope.menu = [];
$scope.menu.push({
- text: "Dashbord",
+ text: "Dashbords",
+ icon: "fa fa-th-large",
href: $scope.getUrl("/"),
startsWith: config.appSubUrl + '/dashboard/',
- icon: "fa fa-th-large",
- links: [
- { text: 'Settings', editview: 'settings'},
- { text: 'Templating', editview: 'templating'},
- { text: 'Annotations', editview: 'annotations'},
- { text: 'Export', href:""},
- { text: 'JSON', href:""},
- ]
+ });
+
+ $scope.menu.push({
+ text: "Data Sources",
+ icon: "fa fa-database",
+ href: $scope.getUrl("/account/datasources"),
});
if ($scope.grafana.user.accountRole === 'Admin') {
@@ -48,11 +47,13 @@ function (angular, _, $, config) {
$scope.menu.push({
text: "Profile", href: $scope.getUrl("/profile"),
icon: "fa fa-user",
- requireSignedIn: true,
- links: [
- { text: 'Info', href: $scope.getUrl("/profile"), icon: "fa fa-sitemap" },
- { text: 'Password', href:"", icon: "fa fa-lock" },
- ]
+ });
+ }
+
+ if ($scope.grafana.user.isSignedIn) {
+ $scope.menu.push({
+ text: "Sign out", href: $scope.getUrl("/logout"),
+ icon: "fa fa-sign-out",
});
}
@@ -80,18 +81,21 @@ function (angular, _, $, config) {
$scope.updateState = function() {
var currentPath = config.appSubUrl + $location.path();
var search = $location.search();
+ var activeIndex;
- _.each($scope.menu, function(item) {
+ _.each($scope.menu, function(item, index) {
item.active = false;
if (item.href === currentPath) {
item.active = true;
+ activeIndex = index;
}
if (item.startsWith) {
if (currentPath.indexOf(item.startsWith) === 0) {
item.active = true;
item.href = currentPath;
+ activeIndex = index;
}
}
@@ -114,6 +118,8 @@ function (angular, _, $, config) {
}
});
});
+
+ //$scope.menu.splice(0, 0, $scope.menu.splice(activeIndex, 1)[0]);
};
$scope.init = function() {
diff --git a/src/app/directives/topnav.js b/src/app/directives/topnav.js
index 5ff418c7c77..d987b652535 100644
--- a/src/app/directives/topnav.js
+++ b/src/app/directives/topnav.js
@@ -24,13 +24,12 @@ function (angular) {
'' +
'' +
'' +
- '' +
'' +
'' +
@@ -69,13 +68,12 @@ function (angular) {
'' +
'' +
'' +
- '' +
'' +
'' +
@@ -85,9 +83,6 @@ function (angular) {
'' +
'{{title}}' +
- '' +
- '' +
- '' +
'' +
'',
link: function(scope, elem, attrs) {
diff --git a/src/app/features/annotations/partials/editor.html b/src/app/features/annotations/partials/editor.html
index ae2d624edd9..47511ff755b 100644
--- a/src/app/features/annotations/partials/editor.html
+++ b/src/app/features/annotations/partials/editor.html
@@ -1,19 +1,16 @@
-