浏览代码

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

Andrii Tkach 10 年之前
父节点
当前提交
f8bdd0696d
共有 3 个文件被更改,包括 4 次插入3 次删除
  1. 1 1
      ambari-web/app/routes/main.js
  2. 1 1
      ambari-web/app/views/main/admin.js
  3. 2 1
      ambari-web/app/views/main/menu.js

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

@@ -499,7 +499,7 @@ module.exports = Em.Route.extend({
     adminServiceAccounts: Em.Route.extend({
     adminServiceAccounts: Em.Route.extend({
       route: '/serviceAccounts',
       route: '/serviceAccounts',
       connectOutlets: function (router) {
       connectOutlets: function (router) {
-        router.set('mainAdminController.category', "serviceAccounts");
+        router.set('mainAdminController.category', "adminServiceAccounts");
         router.get('mainAdminController').connectOutlet('mainAdminServiceAccounts');
         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')
       label: Em.I18n.t('admin.stackUpgrade.title')
     });
     });
     items.push({
     items.push({
-      name: 'serviceAccounts',
+      name: 'adminServiceAccounts',
       url: 'adminServiceAccounts',
       url: 'adminServiceAccounts',
       label: Em.I18n.t('common.serviceAccounts')
       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) {
       goToCategory: function (event) {
         var itemName = this.get('parentView').get('content').routing;
         var itemName = this.get('parentView').get('content').routing;
         // route to correct category of current menu item
         // 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);
           App.router.route('main/admin/' + event.context);
         }
         }
       }
       }