Hean-Chhinling opened a new pull request, #1185: URL: https://github.com/apache/knox/pull/1185
[KNOX-3286](https://issues.apache.org/jira/browse/KNOX-3286) - Put /scheduler-ui behind knox-proxy in YARN UI V2 ## What changes were proposed in this pull request? https://issues.apache.org/jira/browse/YARN-11938 integrate scheduler-ui in YARN UIV2. It works perfectly in a non-secure cluster. However, in a secure cluster with KNOX: When user view YARN UIV2 Navigate to Scheduler-UI navigation bar It will redirect user to {knox-gateway}/scheduler-ui Which will throw 404 status code because it is not behind knox-proxy In secured cluster, yarn-scheduler-ui is served under /yarn-scheduler-ui according to this ticket https://issues.apache.org/jira/browse/KNOX-3249 Thus the rewrite.xml should be updated for YARNUIV2 to put the /scheduler-ui behind KNOX proxy to /yarn-scheduler-ui when user click on navigation bar Scheduler UI. ## How was this patch tested? Tested manually and it rewrite to put behind KNOX proxy ``` buildFragment: function buildFragment(dom) { var el0 = dom.createDocumentFragment(); var el1 = dom.createTextNode(" "); dom.appendChild(el0, el1); var el1 = dom.createElement("li"); var el2 = dom.createElement("a"); dom.setAttribute(el2, "href", "/gateway/cdp-proxy/yarn-scheduler-ui"); dom.setAttribute(el2, "class", "navigation-link ember-view"); var el3 = dom.createTextNode("Scheduler UI"); dom.appendChild(el2, el3); dom.appendChild(el1, el2); dom.appendChild(el0, el1); var el1 = dom.createTextNode("\n"); dom.appendChild(el0, el1); return el0; }, ``` Please review [Knox Contributing Process](https://cwiki.apache.org/confluence/display/KNOX/Contribution+Process#ContributionProcess-GithubWorkflow) before opening a pull request. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
