diff --git a/pkg/api/api.go b/pkg/api/api.go
index 2d42377ed60..f704ed3eb98 100644
--- a/pkg/api/api.go
+++ b/pkg/api/api.go
@@ -25,11 +25,11 @@ func Register(r *macaron.Macaron) {
// authed views
r.Get("/profile/", reqSignedIn, Index)
- r.Get("/account/", reqSignedIn, Index)
- r.Get("/account/datasources/", reqSignedIn, Index)
- r.Get("/account/users/", reqSignedIn, Index)
- r.Get("/account/apikeys/", reqSignedIn, Index)
- r.Get("/account/import/", reqSignedIn, Index)
+ r.Get("/org/", reqSignedIn, Index)
+ r.Get("/datasources/", reqSignedIn, Index)
+ r.Get("/org/users/", reqSignedIn, Index)
+ r.Get("/org/apikeys/", reqSignedIn, Index)
+ r.Get("/dashboard/import/", reqSignedIn, Index)
r.Get("/admin/settings", reqGrafanaAdmin, Index)
r.Get("/admin/users", reqGrafanaAdmin, Index)
r.Get("/admin/users/create", reqGrafanaAdmin, Index)
diff --git a/src/app/controllers/sidemenuCtrl.js b/src/app/controllers/sidemenuCtrl.js
index e962a35af35..5e80e819ac1 100644
--- a/src/app/controllers/sidemenuCtrl.js
+++ b/src/app/controllers/sidemenuCtrl.js
@@ -15,23 +15,48 @@ function (angular, _, $, config) {
return config.appSubUrl + url;
};
- $scope.menu = [];
- $scope.menu.push({
+ $scope.mainLinks = [];
+ $scope.mainLinks.push({
text: "Dashboards",
icon: "fa fa-fw fa-th-large",
href: $scope.getUrl("/"),
});
if (contextSrv.hasRole('Admin')) {
- $scope.menu.push({
+ $scope.mainLinks.push({
text: "Data Sources",
icon: "fa fa-fw fa-database",
href: $scope.getUrl("/datasources"),
});
- $scope.menu.push({
- text: "Organization", href: $scope.getUrl("/org"),
+ }
+
+ $scope.bottomLinks = [];
+ if (contextSrv.user.isSignedIn) {
+ $scope.bottomLinks.push({
+ text: contextSrv.user.name,
+ imgSrc: contextSrv.user.gravatarUrl,
+ href: $scope.getUrl("/profile"),
+ });
+
+ $scope.bottomLinks.push({
+ text: contextSrv.user.orgName,
+ href: $scope.getUrl("/org"),
icon: "fa fa-fw fa-users",
});
+
+ if (contextSrv.hasRole('Admin')) {
+ $scope.bottomLinks.push({
+ text: "System admin",
+ icon: "fa fa-fw fa-cog",
+ href: $scope.getUrl("/admin/settings"),
+ });
+ }
+
+ $scope.bottomLinks.push({
+ text: "Sign out",
+ icon: "fa fa-fw fa-sign-out",
+ href: $scope.getUrl("/logout"),
+ });
}
$scope.updateState = function() {
diff --git a/src/app/features/org/partials/datasourceEdit.html b/src/app/features/org/partials/datasourceEdit.html
index 741b8c47579..d744cdbca10 100644
--- a/src/app/features/org/partials/datasourceEdit.html
+++ b/src/app/features/org/partials/datasourceEdit.html
@@ -1,8 +1,8 @@