Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13950#discussion_r75185088
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala ---
    @@ -176,7 +176,13 @@ private[ui] class MasterPage(parent: MasterWebUI) 
extends WebUIPage("") {
       private def workerRow(worker: WorkerInfo): Seq[Node] = {
         <tr>
           <td>
    -        <a href={worker.webUiAddress}>{worker.id}</a>
    +        {
    +          if (parent.master.reverseProxy) {
    --- End diff --
    
    This pattern is being used in a lot of places and it's kinda becoming 
noisy... perhaps a better approach would be to have a method somewhere that 
takes both the proxied and non-proxied versions, and returns which one to use. 
e.g.
    
        def href(normal: String, proxied: String): String = if (reverseProxy) 
s"/proxy/$proxied" else normal



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to