hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohithsharm...@apache.org
Subject hadoop git commit: YARN-8469. [UI2] URL needs to be trimmed to handle index.html redirection while accessing via knox. Contributed by Sunil Govindan.
Date Fri, 29 Jun 2018 18:03:30 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-3.1 e7f2c9886 -> 00406f583


YARN-8469. [UI2] URL needs to be trimmed to handle index.html redirection while accessing
via knox. Contributed by Sunil Govindan.

(cherry picked from commit a820738e347854aed7cdaa7758d9c0830df624e3)


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

Branch: refs/heads/branch-3.1
Commit: 00406f583b407130c4ce1f62034bffabd1ff4650
Parents: e7f2c98
Author: Rohith Sharma K S <rohithsharmaks@apache.org>
Authored: Fri Jun 29 10:21:25 2018 -0700
Committer: Rohith Sharma K S <rohithsharmaks@apache.org>
Committed: Fri Jun 29 10:39:30 2018 -0700

----------------------------------------------------------------------
 .../src/main/webapp/app/initializers/loader.js            | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/00406f58/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js
index 6642869..96c8fcf 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/initializers/loader.js
@@ -205,5 +205,13 @@ export default {
 
 const skipTrailingSlash = function(path) {
   path = path.replace('ui2/', '');
-  return path.replace(/\/$/, '');
+  path = path.replace(/\/$/, '');
+  console.log('base url:' + path)
+  if(path.includes("redirect")) {
+    var to = path.lastIndexOf('/');
+    to = to == -1 ? path.length : to + 1;
+    path = path.substring(0, to);
+    console.log('base url after redirect:' + path)
+  }
+  return path;
 };


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message