Commit ad744beb by Torkel Ödegaard Committed by GitHub

NavModel: Fixed page header ui tabs issues for some admin pages (#17444)

parent dd52ff5a
......@@ -15,7 +15,7 @@ export class NavModelSrv {
return _.find(this.navItems, { id: 'cfg' });
}
getNav(...args: string[]) {
getNav(...args: Array<string | number>) {
let children = this.navItems;
const nav = {
breadcrumbs: [],
......
......@@ -5,7 +5,7 @@ export default class AdminEditOrgCtrl {
/** @ngInject */
constructor($scope: any, $routeParams: any, backendSrv: BackendSrv, $location: any, navModelSrv: NavModelSrv) {
$scope.init = () => {
$scope.navModel = navModelSrv.getNav('admin', 'global-orgs');
$scope.navModel = navModelSrv.getNav('admin', 'global-orgs', 0);
if ($routeParams.id) {
$scope.getOrg($routeParams.id);
......
......@@ -9,7 +9,7 @@ export default class AdminEditUserCtrl {
$scope.user = {};
$scope.newOrg = { name: '', role: 'Editor' };
$scope.permissions = {};
$scope.navModel = navModelSrv.getNav('admin', 'global-users');
$scope.navModel = navModelSrv.getNav('admin', 'global-users', 0);
$scope.init = () => {
if ($routeParams.id) {
......
......@@ -5,7 +5,7 @@ export default class AdminListOrgsCtrl {
/** @ngInject */
constructor($scope: any, backendSrv: BackendSrv, navModelSrv: NavModelSrv) {
$scope.init = () => {
$scope.navModel = navModelSrv.getNav('admin', 'global-orgs');
$scope.navModel = navModelSrv.getNav('admin', 'global-orgs', 0);
$scope.getOrgs();
};
......
......@@ -13,7 +13,7 @@ export default class AdminListUsersCtrl {
/** @ngInject */
constructor(private $scope: any, private backendSrv: BackendSrv, navModelSrv: NavModelSrv) {
this.navModel = navModelSrv.getNav('admin', 'global-users');
this.navModel = navModelSrv.getNav('admin', 'global-users', 0);
this.query = '';
this.getUsers();
}
......
......@@ -11,7 +11,7 @@ export default class StyleGuideCtrl {
/** @ngInject */
constructor(private $routeParams: any, private backendSrv: BackendSrv, navModelSrv: NavModelSrv) {
this.navModel = navModelSrv.getNav('admin', 'styleguide');
this.navModel = navModelSrv.getNav('admin', 'styleguide', 0);
this.theme = config.bootData.user.lightTheme ? 'light' : 'dark';
}
......
......@@ -13,7 +13,7 @@ class AdminSettingsCtrl {
/** @ngInject */
constructor($scope: any, backendSrv: BackendSrv, navModelSrv: NavModelSrv) {
this.navModel = navModelSrv.getNav('admin', 'server-settings');
this.navModel = navModelSrv.getNav('admin', 'server-settings', 0);
backendSrv.get('/api/admin/settings').then((settings: any) => {
$scope.settings = settings;
......
......@@ -32,7 +32,7 @@ export class AlertNotificationEditCtrl {
private $templateCache: any,
navModelSrv: NavModelSrv
) {
this.navModel = navModelSrv.getNav('alerting', 'channels');
this.navModel = navModelSrv.getNav('alerting', 'channels', 0);
this.isNew = !this.$routeParams.id;
this.getFrequencySuggestion = () => {
......
......@@ -8,7 +8,7 @@ export class AlertNotificationsListCtrl {
/** @ngInject */
constructor(private backendSrv: BackendSrv, navModelSrv: NavModelSrv) {
this.loadNotifications();
this.navModel = navModelSrv.getNav('alerting', 'channels');
this.navModel = navModelSrv.getNav('alerting', 'channels', 0);
}
loadNotifications() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment