Repository: ambari
Updated Branches:
  refs/heads/trunk ff82ef366 -> de2ba0fc8


AMBARI-6486 Incorrect services navigation after clicking refresh icon next to 
service name. (Max Shepel via atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/de2ba0fc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/de2ba0fc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/de2ba0fc

Branch: refs/heads/trunk
Commit: de2ba0fc82304753e76da164999691231879c955
Parents: ff82ef3
Author: atkach <atk...@hortonworks.com>
Authored: Tue Jul 15 16:33:17 2014 +0300
Committer: atkach <atk...@hortonworks.com>
Committed: Tue Jul 15 16:33:17 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/routes/main.js             |  6 +++++-
 ambari-web/app/views/main/service/menu.js | 10 ++++++----
 2 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/de2ba0fc/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 5a7d771..3bfa496 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -670,7 +670,11 @@ module.exports = Em.Route.extend({
       route: '/:service_id',
       connectOutlets: function (router, service) {
         router.get('mainServiceController').connectOutlet('mainServiceItem', 
service);
-        router.transitionTo('summary');
+        if (service && service.get('routeToConfigs')) {
+          router.transitionTo('configs');
+        } else {
+          router.transitionTo('summary');
+        }
       },
       index: Ember.Route.extend({
         route: '/'

http://git-wip-us.apache.org/repos/asf/ambari/blob/de2ba0fc/ambari-web/app/views/main/service/menu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/menu.js 
b/ambari-web/app/views/main/service/menu.js
index 879d13e..6731f2d 100644
--- a/ambari-web/app/views/main/service/menu.js
+++ b/ambari-web/app/views/main/service/menu.js
@@ -86,8 +86,9 @@ App.MainServiceMenuView = Em.CollectionView.extend({
     }.property('App.router.currentState.name', 'parentView.activeServiceId', 
'isConfigurable'),
 
     goToConfigs: function () {
-      App.router.transitionTo('service.configs', this.get('content'));
-      App.router.set('currentState.name', 'configs');
+      this.set('content.routeToConfigs', true);
+      App.router.transitionTo('services.service.configs', this.get('content'));
+      this.set('content.routeToConfigs', false);
     },
 
     refreshRestartRequiredMessage: function() {
@@ -183,8 +184,9 @@ App.TopNavServiceMenuView = Em.CollectionView.extend({
     }.property('App.router.currentState.name', 
'parentView.activeServiceId','isConfigurable'),
 
     goToConfigs: function () {
-      App.router.transitionTo('service.configs', this.get('content'));
-      App.router.set('currentState.name', 'configs');
+      this.set('content.routeToConfigs', true);
+      App.router.transitionTo('services.service.configs', this.get('content'));
+      this.set('content.routeToConfigs', false);
     },
 
     refreshRestartRequiredMessage: function() {

Reply via email to