Browse Source

AMBARI-2020. Incorrect behavior of "Services" page. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1471784 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 years ago
parent
commit
88542d99c5
2 changed files with 12 additions and 10 deletions
  1. 2 0
      CHANGES.txt
  2. 10 10
      ambari-web/app/routes/main.js

+ 2 - 0
CHANGES.txt

@@ -790,6 +790,8 @@ Trunk (unreleased changes):
  Farrellee via mahadev)
  Farrellee via mahadev)
 
 
  BUG FIXES
  BUG FIXES
+ 
+ AMBARI-2020. Incorrect behavior of "Services" page. (yusaku)
 
 
  AMBARI-2018. Hosts page: no filter selection is shown after clicking on
  AMBARI-2018. Hosts page: no filter selection is shown after clicking on
  "Alerts" filter, navigating away, and coming back to Hosts page. (yusaku)
  "Alerts" filter, navigating away, and coming back to Hosts page. (yusaku)

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

@@ -783,17 +783,17 @@ module.exports = Em.Route.extend({
   services: Em.Route.extend({
   services: Em.Route.extend({
     route: '/services',
     route: '/services',
     index: Ember.Route.extend({
     index: Ember.Route.extend({
-      route: '/'
+      route: '/',
+      enter: function (router) {
+        Ember.run.next(function () {
+          var service = router.get('mainServiceItemController.content');
+          if (!service) {
+            service = App.Service.find().objectAt(0); // getting the first service to display
+          }
+          router.transitionTo('service.summary', service);
+        });
+      }
     }),
     }),
-    enter: function (router) {
-      Ember.run.next(function () {
-        var service = router.get('mainServiceItemController.content');
-        if (!service) {
-          service = App.Service.find().objectAt(0); // getting the first service to display
-        }
-        router.transitionTo('service.summary', service);
-      });
-    },
     connectOutlets: function (router, context) {
     connectOutlets: function (router, context) {
       router.get('mainController').connectOutlet('mainService');
       router.get('mainController').connectOutlet('mainService');
     },
     },