AMBARI-19724 Refreshing the page (browser refresh) when on the tez view goes 
back to the main views page (non admin user). (atkach)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 8d390fa18c4fe109934387762787cc1cf48a2bc2
Parents: b6a06bd
Author: Andrii Tkach <atk...@apache.org>
Authored: Thu Jan 26 16:59:28 2017 +0200
Committer: Andrii Tkach <atk...@apache.org>
Committed: Thu Jan 26 17:01:04 2017 +0200

----------------------------------------------------------------------
 ambari-web/app/routes/main.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8d390fa1/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 382818b..354198b 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -42,7 +42,10 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
                         router.get('mainController').initialize();
                       });
                     } else {
-                      App.router.transitionTo('main.views.index');
+                      // Don't transit to Views when user already on View page
+                      if (App.router.currentState.name !== 'viewDetails') {
+                        App.router.transitionTo('main.views.index');
+                      }
                       App.router.get('clusterController').set('isLoaded', 
true); // hide loading bar
                     }
                   });

Reply via email to