Browse Source

AMBARI-9594 Browsing to Admin > Stack and Versions puts you on wrong tab. (atkach)

Andrii Tkach 10 năm trước cách đây
mục cha
commit
f8bdd0696d

+ 1 - 1
ambari-web/app/routes/main.js

@@ -499,7 +499,7 @@ module.exports = Em.Route.extend({
     adminServiceAccounts: Em.Route.extend({
       route: '/serviceAccounts',
       connectOutlets: function (router) {
-        router.set('mainAdminController.category', "serviceAccounts");
+        router.set('mainAdminController.category', "adminServiceAccounts");
         router.get('mainAdminController').connectOutlet('mainAdminServiceAccounts');
       }
     }),

+ 1 - 1
ambari-web/app/views/main/admin.js

@@ -29,7 +29,7 @@ App.MainAdminView = Em.View.extend({
       label: Em.I18n.t('admin.stackUpgrade.title')
     });
     items.push({
-      name: 'serviceAccounts',
+      name: 'adminServiceAccounts',
       url: 'adminServiceAccounts',
       label: Em.I18n.t('common.serviceAccounts')
     });

+ 2 - 1
ambari-web/app/views/main/menu.js

@@ -157,7 +157,8 @@ App.MainMenuView = Em.CollectionView.extend({
       goToCategory: function (event) {
         var itemName = this.get('parentView').get('content').routing;
         // route to correct category of current menu item
-        if (itemName == 'admin') {
+        // skip routing to already selected category
+        if (itemName === 'admin' && !this.get('isActive')) {
           App.router.route('main/admin/' + event.context);
         }
       }