deepashreeraghu commented on a change in pull request #78: KNOX-1584 - YARN v2
UI - Application - History link fix
URL: https://github.com/apache/knox/pull/78#discussion_r267771201
##########
File path:
gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/rewrite.xml
##########
@@ -171,12 +171,34 @@
</content>
</filter>
- <rule dir="IN" name="YARNUIV2/yarnuiv2/inbound/proxy"
pattern="*://*:*/**/yarnuiv2/proxy/{**}?{**}">
- <rewrite template="{$serviceUrl[YARNUIV2]}/proxy/{**}?{**}"/>
- </rule>
+ <filter name="YARNUIV2/yarnuiv2/outbound/headers/jobhistory/job">
+ <content type="application/x-http-headers">
+ <apply path="Location"
rule="YARNUIV2/yarnuiv2/outbound/headers/jobhistory/job/location"/>
+ </content>
+ </filter>
+
+ <rule dir="OUT" name="YARNUIV2/yarnuiv2/outbound/proxy"
pattern="*://*:*/proxy/{**}">
+ <rewrite template="{$frontend[url]}/yarnuiv2/proxy/{**}"/>
+ </rule>
+
- <rule dir="OUT" name="YARNUIV2/yarnuiv2/outbound/proxy"
pattern="*://*:*/proxy/{**}">
- <rewrite
template="{gateway.scheme}://{gateway.host}:{gateway.port}/gateway/default/sparkhistory/history/{**}?{**}"/>
- </rule>
+ <rule flow="OR" dir="OUT"
name="YARNUIV2/yarnuiv2/outbound/headers/jobhistory/job/location">
+ <match pattern="{scheme}://{host}:{port}/jobhistory/job/{**}">
+ <rewrite
template="{$frontend[url]}/jobhistory/job/{**}?{scheme}?{host}?{port}"/>
+ </match>
+ <match pattern="{scheme}://{host}:{port}/jobhistory/logs/{**}?{**}">
+ <rewrite template="{$frontend[url]}/jobhistory/logs/{**}"/>
+ </match>
+ <match pattern="*://*:*/history/{**}?{**}">
+ <rewrite template="{$frontend[url]}/sparkhistory/history/{**}?{**}"/>
+ </match>
+ <match pattern="*://*:*/cluster/app/{**}">
+ <rewrite template="{$frontend[url]}/yarnuiv2/cluster/app/{**}"/>
Review comment:
I see references to frontendurl in the existing rewrite file itself? Any
specific reason that, this needs to be changed?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services