ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-17217 Unexpected URI for "experimental" page. (atkach)
Date Tue, 14 Jun 2016 13:52:30 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 153d21a7f -> e67d6b2fe


AMBARI-17217 Unexpected URI for "experimental" page. (atkach)


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

Branch: refs/heads/branch-2.4
Commit: e67d6b2fe27b51c141b3cb654e25dd498e7bd369
Parents: 153d21a
Author: Andrii Tkach <atkach@apache.org>
Authored: Tue Jun 14 14:30:40 2016 +0300
Committer: Andrii Tkach <atkach@apache.org>
Committed: Tue Jun 14 16:51:17 2016 +0300

----------------------------------------------------------------------
 ambari-web/app/router.js | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e67d6b2f/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index d3caf6a..a057215 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -950,22 +950,24 @@ App.Router = Em.Router.extend({
     experimental: Em.Route.extend({
       route: '/experimental',
       enter: function (router, context) {
-        if (App.isAuthorized('CLUSTER.UPGRADE_DOWNGRADE_STACK')) {
-          Em.run.next(function () {
-            if (router.get('clusterInstallCompleted')) {
-              router.transitionTo("main.dashboard.widgets");
-            } else {
-              router.route("installer");
-            }
-          });
-        } else if (!App.isAuthorized('CLUSTER.UPGRADE_DOWNGRADE_STACK')) {
-          Em.run.next(function () {
-            router.transitionTo("main.views.index");
-          });
+        if (!App.isAuthorized('AMBARI.MANAGE_SETTINGS')) {
+          if (App.isAuthorized('CLUSTER.UPGRADE_DOWNGRADE_STACK')) {
+            Em.run.next(function () {
+              if (router.get('clusterInstallCompleted')) {
+                router.transitionTo("main.dashboard.widgets");
+              } else {
+                router.transitionTo("main.views.index");
+              }
+            });
+          } else {
+            Em.run.next(function () {
+              router.transitionTo("main.views.index");
+            });
+          }
         }
       },
       connectOutlets: function (router, context) {
-        if (App.isAuthorized('CLUSTER.UPGRADE_DOWNGRADE_STACK')) {
+        if (App.isAuthorized('AMBARI.MANAGE_SETTINGS')) {
           App.router.get('experimentalController').loadSupports().complete(function () {
             $('title').text(Em.I18n.t('app.name.subtitle.experimental'));
             router.get('applicationController').connectOutlet('experimental');


Mime
View raw message