|
|
@@ -34,26 +34,23 @@ function (angular, _, $, config) {
|
|
|
text: "Account", href: $scope.getUrl("/account"),
|
|
|
requireRole: "Admin",
|
|
|
icon: "fa fa-shield",
|
|
|
- links: [
|
|
|
- { text: 'Info', href: $scope.getUrl("/account")},
|
|
|
- { text: 'Data sources', href: $scope.getUrl("/account/datasources")},
|
|
|
- { text: 'Users', href: $scope.getUrl("/account/users")},
|
|
|
- { text: 'API Keys', href: $scope.getUrl("/account/apikeys")},
|
|
|
- ]
|
|
|
});
|
|
|
- }
|
|
|
-
|
|
|
- if ($scope.grafana.user.isSignedIn) {
|
|
|
$scope.menu.push({
|
|
|
- text: "Profile", href: $scope.getUrl("/profile"),
|
|
|
- icon: "fa fa-user",
|
|
|
+ text: "Users", href: $scope.getUrl("/account/users"),
|
|
|
+ requireRole: "Admin",
|
|
|
+ icon: "fa fa-users",
|
|
|
+ });
|
|
|
+ $scope.menu.push({
|
|
|
+ text: "API Keys", href: $scope.getUrl("/account/apikeys"),
|
|
|
+ requireRole: "Admin",
|
|
|
+ icon: "fa fa-key",
|
|
|
});
|
|
|
}
|
|
|
|
|
|
if ($scope.grafana.user.isSignedIn) {
|
|
|
$scope.menu.push({
|
|
|
- text: "Sign out", href: $scope.getUrl("/logout"),
|
|
|
- icon: "fa fa-sign-out",
|
|
|
+ text: "Profile", href: $scope.getUrl("/profile"),
|
|
|
+ icon: "fa fa-user",
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -70,6 +67,14 @@ function (angular, _, $, config) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ if ($scope.grafana.user.isSignedIn) {
|
|
|
+ $scope.menu.push({
|
|
|
+ text: "Sign out", href: $scope.getUrl("/logout"),
|
|
|
+ target: "_self",
|
|
|
+ icon: "fa fa-sign-out",
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
$scope.onAppEvent('$routeUpdate', function() {
|
|
|
$scope.updateState();
|
|
|
});
|