diff --git a/pkg/api/index.go b/pkg/api/index.go index 3c4d658ce19..eb9e70bb404 100644 --- a/pkg/api/index.go +++ b/pkg/api/index.go @@ -263,16 +263,18 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) { Divider: true, HideFromTabs: true, }) cfgNode.Children = append(cfgNode.Children, &dtos.NavLink{ - Text: "Server Admin", - Id: "admin", - Icon: "fa fa-fw fa-shield", - Url: setting.AppSubUrl + "/admin", + Text: "Server Admin", + HideFromTabs: true, + SubTitle: "Manage all users & orgs", + Id: "admin", + Icon: "fa fa-fw fa-shield", + Url: setting.AppSubUrl + "/admin/users", Children: []*dtos.NavLink{ - {Text: "Users", Id: "global-users", Url: setting.AppSubUrl + "/admin/users"}, - {Text: "Orgs", Id: "global-orgs", Url: setting.AppSubUrl + "/admin/orgs"}, - {Text: "Server Settings", Id: "server-settings", Url: setting.AppSubUrl + "/admin/settings"}, - {Text: "Server Stats", Id: "server-stats", Url: setting.AppSubUrl + "/admin/stats"}, - {Text: "Style Guide", Id: "styleguide", Url: setting.AppSubUrl + "/styleguide"}, + {Text: "Users", Id: "global-users", Url: setting.AppSubUrl + "/admin/users", Icon: "icon-gf icon-gf-fw icon-gf-users"}, + {Text: "Orgs", Id: "global-orgs", Url: setting.AppSubUrl + "/admin/orgs", Icon: "gicon gicon-org"}, + {Text: "Settings", Id: "server-settings", Url: setting.AppSubUrl + "/admin/settings", Icon: "fa fa-fw fa-sliders"}, + {Text: "Stats", Id: "server-stats", Url: setting.AppSubUrl + "/admin/stats", Icon: "fa fa-fw fa-bar-chart"}, + {Text: "Style Guide", Id: "styleguide", Url: setting.AppSubUrl + "/styleguide", Icon: "fa fa-fw fa-eyedropper"}, }, }) } diff --git a/public/app/core/routes/routes.ts b/public/app/core/routes/routes.ts index 24f9101a88f..68595da4296 100644 --- a/public/app/core/routes/routes.ts +++ b/public/app/core/routes/routes.ts @@ -48,12 +48,6 @@ function setupAngularRoutes($routeProvider, $locationProvider) { reloadOnSearch: false, pageClass: 'page-dashboard', }) - .when('/configuration', { - templateUrl: 'public/app/features/admin/partials/configuration_home.html', - controller : 'ConfigurationHomeCtrl', - controllerAs: 'ctrl', - resolve: loadAdminBundle, - }) .when('/datasources', { templateUrl: 'public/app/features/plugins/partials/ds_list.html', controller : 'DataSourcesCtrl', diff --git a/public/app/features/admin/admin.ts b/public/app/features/admin/admin.ts index 4092669cb15..6683ad6e85b 100644 --- a/public/app/features/admin/admin.ts +++ b/public/app/features/admin/admin.ts @@ -10,7 +10,7 @@ class AdminSettingsCtrl { /** @ngInject **/ constructor($scope, backendSrv, navModelSrv) { - this.navModel = navModelSrv.getNav('cfg', 'admin', 'server-settings'); + this.navModel = navModelSrv.getNav('cfg', 'admin', 'server-settings', 1); backendSrv.get('/api/admin/settings').then(function(settings) { $scope.settings = settings; @@ -24,7 +24,7 @@ class AdminHomeCtrl { /** @ngInject **/ constructor(navModelSrv) { - this.navModel = navModelSrv.getNav('cfg', 'admin'); + this.navModel = navModelSrv.getNav('cfg', 'admin', 1); } } @@ -34,7 +34,7 @@ export class AdminStatsCtrl { /** @ngInject */ constructor(backendSrv: any, navModelSrv) { - this.navModel = navModelSrv.getNav('cfg', 'admin', 'server-stats'); + this.navModel = navModelSrv.getNav('cfg', 'admin', 'server-stats', 1); backendSrv.get('/api/admin/stats').then(stats => { this.stats = stats; @@ -42,16 +42,6 @@ export class AdminStatsCtrl { } } -export class ConfigurationHomeCtrl { - navModel: any; - - /** @ngInject */ - constructor(navModelSrv) { - this.navModel = navModelSrv.getNav('cfg'); - } -} - -coreModule.controller('ConfigurationHomeCtrl', ConfigurationHomeCtrl); coreModule.controller('AdminSettingsCtrl', AdminSettingsCtrl); coreModule.controller('AdminHomeCtrl', AdminHomeCtrl); coreModule.controller('AdminStatsCtrl', AdminStatsCtrl); diff --git a/public/app/features/admin/admin_edit_org_ctrl.ts b/public/app/features/admin/admin_edit_org_ctrl.ts index 40ad467da9f..2c69c00ef9d 100644 --- a/public/app/features/admin/admin_edit_org_ctrl.ts +++ b/public/app/features/admin/admin_edit_org_ctrl.ts @@ -5,7 +5,7 @@ export class AdminEditOrgCtrl { /** @ngInject */ constructor($scope, $routeParams, backendSrv, $location, navModelSrv) { $scope.init = function() { - $scope.navModel = navModelSrv.getNav('cfg', 'admin', 'global-orgs'); + $scope.navModel = navModelSrv.getNav('cfg', 'admin', 'global-orgs', 1); if ($routeParams.id) { $scope.getOrg($routeParams.id); diff --git a/public/app/features/admin/admin_edit_user_ctrl.ts b/public/app/features/admin/admin_edit_user_ctrl.ts index 714f38357a9..1ed885505c3 100644 --- a/public/app/features/admin/admin_edit_user_ctrl.ts +++ b/public/app/features/admin/admin_edit_user_ctrl.ts @@ -8,7 +8,7 @@ export class AdminEditUserCtrl { $scope.user = {}; $scope.newOrg = { name: '', role: 'Editor' }; $scope.permissions = {}; - $scope.navModel = navModelSrv.getNav('cfg', 'admin', 'global-users'); + $scope.navModel = navModelSrv.getNav('cfg', 'admin', 'global-users', 1); $scope.init = function() { if ($routeParams.id) { diff --git a/public/app/features/admin/admin_list_orgs_ctrl.ts b/public/app/features/admin/admin_list_orgs_ctrl.ts index 4b016d430de..e8722f7e19b 100644 --- a/public/app/features/admin/admin_list_orgs_ctrl.ts +++ b/public/app/features/admin/admin_list_orgs_ctrl.ts @@ -5,7 +5,7 @@ export class AdminListOrgsCtrl { /** @ngInject */ constructor($scope, backendSrv, navModelSrv) { $scope.init = function() { - $scope.navModel = navModelSrv.getNav('cfg', 'admin', 'global-orgs'); + $scope.navModel = navModelSrv.getNav('cfg', 'admin', 'global-orgs', 1); $scope.getOrgs(); }; diff --git a/public/app/features/admin/admin_list_users_ctrl.ts b/public/app/features/admin/admin_list_users_ctrl.ts index b2fcf403702..1574bd07a77 100644 --- a/public/app/features/admin/admin_list_users_ctrl.ts +++ b/public/app/features/admin/admin_list_users_ctrl.ts @@ -10,7 +10,7 @@ export default class AdminListUsersCtrl { /** @ngInject */ constructor(private $scope, private backendSrv, navModelSrv) { - this.navModel = navModelSrv.getNav('cfg', 'admin', 'global-users'); + this.navModel = navModelSrv.getNav('cfg', 'admin', 'global-users', 1); this.query = ''; this.getUsers(); } diff --git a/public/app/features/admin/partials/admin_home.html b/public/app/features/admin/partials/admin_home.html index 266a4698cdc..ea61385f006 100644 --- a/public/app/features/admin/partials/admin_home.html +++ b/public/app/features/admin/partials/admin_home.html @@ -1,35 +1,11 @@ - + -
- +
-
-
    -
  1. - -
    -
    -
    -
    -
    -
    - -
    -
    -
    - {{navItem.text}} -
    -
    - {{navItem.description}} -
    -
    -
    -
    -
  2. -
-
+
+ Grafana is a multi-tenant system where most can be configured per organization. These + admin pages are for server admins where you can manage orgs, & all users across all orgs. +
diff --git a/public/app/features/admin/partials/configuration_home.html b/public/app/features/admin/partials/configuration_home.html deleted file mode 100644 index 7ebc5127b4a..00000000000 --- a/public/app/features/admin/partials/configuration_home.html +++ /dev/null @@ -1,29 +0,0 @@ - - -
-
-
    -
  1. - -
    -
    -
    -
    -
    -
    - -
    -
    -
    - {{navItem.text}} -
    -
    - {{navItem.description}} -
    -
    -
    -
    -
  2. -
-
-
diff --git a/public/app/features/admin/partials/edit_org.html b/public/app/features/admin/partials/edit_org.html index 39028645b38..c50cf2c7701 100644 --- a/public/app/features/admin/partials/edit_org.html +++ b/public/app/features/admin/partials/edit_org.html @@ -1,9 +1,7 @@ - + -
- +
+

Edit Organization

diff --git a/public/app/features/admin/partials/edit_user.html b/public/app/features/admin/partials/edit_user.html index 384601affb7..7686ac7f079 100644 --- a/public/app/features/admin/partials/edit_user.html +++ b/public/app/features/admin/partials/edit_user.html @@ -1,8 +1,9 @@ - + -
-