Forráskód Böngészése

AMBARI-2035. "Add local user" button is enabled but nothing happens upon clicking it under certain conditions. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1476481 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 éve
szülő
commit
22d6bf8392
2 módosított fájl, 7 hozzáadás és 9 törlés
  1. 3 0
      CHANGES.txt
  2. 4 9
      ambari-web/app/routes/main.js

+ 3 - 0
CHANGES.txt

@@ -802,6 +802,9 @@ Trunk (unreleased changes):
 
 
  BUG FIXES
  BUG FIXES
 
 
+ AMBARI-2035. "Add local user" button is enabled but nothing happens upon
+ clicking it under certain conditions. (yusaku)
+
  AMBARI-2034. Disable "Add Component" button in the Host Details page if the
  AMBARI-2034. Disable "Add Component" button in the Host Details page if the
  host is in UNKNOWN state or !isHeartbeating. (yusaku)
  host is in UNKNOWN state or !isHeartbeating. (yusaku)
 
 

+ 4 - 9
ambari-web/app/routes/main.js

@@ -548,26 +548,21 @@ module.exports = Em.Route.extend({
   admin: Em.Route.extend({
   admin: Em.Route.extend({
     route: '/admin',
     route: '/admin',
     enter: function (router, transition) {
     enter: function (router, transition) {
-      var controller = router.get('mainAdminController');
-      if (!App.db.getUser().admin) {
+      if (!App.isAdmin) {
         Em.run.next(function () {
         Em.run.next(function () {
           router.transitionTo('main.dashboard');
           router.transitionTo('main.dashboard');
         });
         });
-      } else {
-        // Em.run.next(function () {
-        // router.transitionTo('admin' + controller.get('category').capitalize());
-        //});
       }
       }
     },
     },
 
 
     routePath: function (router, event) {
     routePath: function (router, event) {
-      if (!App.db.getUser().admin) {
+      if (!App.isAdmin) {
         Em.run.next(function () {
         Em.run.next(function () {
           App.router.transitionTo('main.dashboard');
           App.router.transitionTo('main.dashboard');
         });
         });
       } else {
       } else {
-        // var controller = router.get('mainAdminController');
-        //router.transitionTo('admin' + controller.get('category').capitalize());
+        var controller = router.get('mainAdminController');
+        router.transitionTo('admin' + controller.get('category').capitalize());
       }
       }
     },
     },
     connectOutlets: function (router, context) {
     connectOutlets: function (router, context) {