Skip to content

[SPARK-14397][WEBUI] <html> and <body> tags are nested in LogPage #12170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

sarutak
Copy link
Member

@sarutak sarutak commented Apr 5, 2016

What changes were proposed in this pull request?

In LogPage, the content to be rendered is defined as follows.

    val content =
      <html>
        <body>
          {linkToMaster}
          <div>
            <div style="float:left; margin-right:10px">{backButton}</div>
            <div style="float:left;">{range}</div>
            <div style="float:right; margin-left:10px">{nextButton}</div>
          </div>
          <br />
          <div style="height:500px; overflow:auto; padding:5px;">
            <pre>{logText}</pre>
          </div>
        </body>
      </html>
    UIUtils.basicSparkPage(content, logType + " log page for " + pageName)

As you can see, and tags will be rendered.

On the other hand, UIUtils.basicSparkPage will render those tags so those tags will be nested.

  def basicSparkPage(
      content: => Seq[Node],
      title: String,
      useDataTables: Boolean = false): Seq[Node] = {
    <html>
      <head>
        {commonHeaderNodes}
        {if (useDataTables) dataTablesHeaderNodes else Seq.empty}
        <title>{title}</title>
      </head>
      <body>
        <div class="container-fluid">
          <div class="row-fluid">
            <div class="span12">
              <h3 style="vertical-align: middle; display: inline-block;">
                <a style="text-decoration: none" href={prependBaseUri("/")}>
                  <img src={prependBaseUri("/static/spark-logo-77x50px-hd.png")} />
                  <span class="version"
                        style="margin-right: 15px;">{org.apache.spark.SPARK_VERSION}</span>
                </a>
                {title}
              </h3>
            </div>
          </div>
          {content}
        </div>
      </body>
    </html>
  }

These are the screen shots before this patch is applied.

before1
before2

And these are the ones after this patch is applied.

after1
after2

The appearance is not changed but the html source code is changed.

How was this patch tested?

Manually run some jobs on my standalone-cluster and check the WebUI.

@SparkQA
Copy link

SparkQA commented Apr 5, 2016

Test build #54962 has finished for PR 12170 at commit 6afb3fb.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Apr 5, 2016

LGTM

@zsxwing
Copy link
Member

zsxwing commented Apr 5, 2016

LGTM. Merging to master

@asfgit asfgit closed this in e4bd504 Apr 5, 2016
@sarutak sarutak deleted the SPARK-14397 branch April 12, 2016 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants