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

This commit is contained in:
Torkel Ödegaard 2019-06-05 15:18:31 +02:00 committed by GitHub
parent dd52ff5ac5
commit ad744beb60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 9 additions and 9 deletions

View File

@ -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: [],

View File

@ -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);

View File

@ -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) {

View File

@ -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();
};

View File

@ -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();
}

View File

@ -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';
}

View File

@ -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;

View File

@ -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 = () => {

View File

@ -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() {