knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject knox git commit: KNOX-1249 - Fix rewrite issues with YarnUIV2 (Sunil Govind via Sandeep More)
Date Tue, 01 May 2018 16:16:50 GMT
Repository: knox
Updated Branches:
  refs/heads/master c061d20a8 -> 90b5a0073


KNOX-1249 - Fix rewrite issues with YarnUIV2 (Sunil Govind via Sandeep More)


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

Branch: refs/heads/master
Commit: 90b5a0073eeb418517fda20a43d1a9cee588fd37
Parents: c061d20
Author: Sandeep More <more@apache.org>
Authored: Tue May 1 12:16:44 2018 -0400
Committer: Sandeep More <more@apache.org>
Committed: Tue May 1 12:16:44 2018 -0400

----------------------------------------------------------------------
 .../resources/services/yarnuiv2/3.0.0/rewrite.xml  | 17 +++++++++++------
 .../resources/services/yarnuiv2/3.0.0/service.xml  | 10 +++++++---
 2 files changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/90b5a007/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/rewrite.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/rewrite.xml
b/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/rewrite.xml
index 4af4c90..073d54a 100644
--- a/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/rewrite.xml
+++ b/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/rewrite.xml
@@ -25,10 +25,14 @@
     <rewrite template="http://{host}:{port=**}"/>
   </rule> 
  
-  <rule dir="IN" name="YARNUIV2/yarnuiv2/inbound/timeline" pattern="*://*:*/**/yarnuiv2/timeline?{host}&amp;{port=**}">
-    <rewrite template="http://{host}:{port=**}"/>
+  <rule dir="IN" name="YARNUIV2/yarnuiv2/inbound/timeline" pattern="*://*:*/**/yarnuiv2/timeline?{host}&amp;{port=**}?{**}">
+    <rewrite template="http://{host}:{port=**}?{**}"/>
   </rule> 
  
+  <rule dir="IN" name="YARNUIV2/yarnuiv2/inbound/logs" pattern="*://*:*/**/yarnuiv2/logs/?{**}">
+    <rewrite template="{$serviceUrl[YARNUIV2]}/logs/?{**}"/>
+  </rule>
+
   <rule dir="IN" name="YARNUIV2/yarnuiv2/inbound/path" pattern="*://*:*/**/yarnuiv2/{**}">
     <rewrite template="{$serviceUrl[YARNUIV2]}/ui2/{**}"/>
   </rule>
@@ -37,8 +41,8 @@
     <rewrite template="{$serviceUrl[YARNUIV2]}/{**}?{**}"/>
   </rule>
 
-  <rule dir="IN" name="YARNUIV2/yarnuiv2/inbound/ws" pattern="*://*:*/**/yarnuiv2/ws/{**}">
-    <rewrite template="{$serviceUrl[YARNUIV2]}/ws/{**}"/>
+  <rule dir="IN" name="YARNUIV2/yarnuiv2/inbound/ws" pattern="*://*:*/**/yarnuiv2/ws/{**}?{**}">
+    <rewrite template="{$serviceUrl[YARNUIV2]}/ws/{**}?{**}"/>
   </rule>
  
   <!-- Resources -->
@@ -114,7 +118,7 @@
     <rewrite template="ui2/#/cluster-overview"/>
   </rule>
 
-  <rule dir="IN" name="YARNUIV2/yarnuiv2/nodeaddress">
+  <rule dir="OUT" name="YARNUIV2/yarnuiv2/nodeaddress">
     <match pattern="{host}:{port}"/>
     <rewrite template="{$frontend[url]}/yarnuiv2/node?{host}?{port}"/>
   </rule>
@@ -138,6 +142,7 @@
   <filter name="YARNUIV2/yarnuiv2/outbound/mainpage">
     <content type="*/json">
       <apply path="$.nodes.node[*].nodeHTTPAddress" rule="YARNUIV2/yarnuiv2/nodeaddress"/>
+      <apply path="$.appAttempts.appAttempt[*].nodeHttpAddress" rule="YARNUIV2/yarnuiv2/nodeaddress"/>
     </content>
   </filter>
 
@@ -147,5 +152,5 @@
     </content>
   </filter>
 
-</rules>
+ </rules>
   

http://git-wip-us.apache.org/repos/asf/knox/blob/90b5a007/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/service.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/service.xml
b/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/service.xml
index 83d4dfd..bdbb0e7 100644
--- a/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/service.xml
+++ b/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/service.xml
@@ -15,19 +15,22 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<service role="YARNUIV2" name="yarnuiv2" version="0.1.0">
+<service role="YARNUIV2" name="yarnuiv2" version="3.0.0">
   <policies>
     <policy role="webappsec"/>
     <policy role="authentication" name="Anonymous"/>
     <policy role="rewrite"/>
     <policy role="authorization"/>
   </policies>
-
   <routes>
     <route path="/yarnuiv2">
       <rewrite apply="YARNUIV2/yarnuiv2/inbound/rootAppScript" to="request.url"/>
     </route>
-    
+
+    <route path="/yarnuiv2/logs/?**">
+      <rewrite apply="YARNUIV2/yarnuiv2/inbound/logs" to="request.url"/>
+    </route>
+
     <route path="/yarnuiv2/**">
       <rewrite apply="YARNUIV2/yarnuiv2/inbound/path" to="request.url"/>
     </route>
@@ -51,6 +54,7 @@
     
     <route path="/yarnuiv2/ws/**">
         <rewrite apply="YARNUIV2/yarnuiv2/inbound/ws" to="request.url"/>
+        <rewrite apply="YARNUIV2/yarnuiv2/headers/outbound" to="response.headers"/>
         <rewrite apply="YARNUIV2/yarnuiv2/outbound/mainpage" to="response.body"/>
         <dispatch contributor-name="http-client" />
     </route>


Mime
View raw message