Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
{Spark-24553}{WEB-UI} http 302 fixes for href redirect
  • Loading branch information
SJKallman committed Jun 20, 2018
commit 7962d203b0ba082676af1fad07523a6777bd0a05
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ private[ui] class JobDataSource(

val jobDescription = UIUtils.makeDescription(lastStageDescription, basePath, plainText = false)

val detailUrl = "%s/jobs/job?id=%s".format(basePath, jobData.jobId)
val detailUrl = "%s/jobs/job/?id=%s".format(basePath, jobData.jobId)

new JobTableRowData(
jobData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private[ui] class StagePage(parent: StagesTab, store: AppStatusStore) extends We
val _taskTable = new TaskPagedTable(
stageData,
UIUtils.prependBaseUri(request, parent.basePath) +
s"/stages/stage?id=${stageId}&attempt=${stageAttemptId}",
s"/stages/stage/?id=${stageId}&attempt=${stageAttemptId}",
currentTime,
pageSize = taskPageSize,
sortColumn = taskSortColumn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ private[ui] class StagePagedTable(
Seq.empty
}

val nameLinkUri = s"$basePathUri/stages/stage?id=${s.stageId}&attempt=${s.attemptId}"
val nameLinkUri = s"$basePathUri/stages/stage/?id=${s.stageId}&attempt=${s.attemptId}"
val nameLink = <a href={nameLinkUri} class="name-link">{s.name}</a>

val cachedRddInfos = store.rddList().filter { rdd => s.rddIds.contains(rdd.id) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ private[ui] abstract class ExecutionTable(
}

private def jobURL(request: HttpServletRequest, jobId: Long): String =
"%s/jobs/job?id=%s".format(UIUtils.prependBaseUri(request, parent.basePath), jobId)
"%s/jobs/job/?id=%s".format(UIUtils.prependBaseUri(request, parent.basePath), jobId)

private def executionURL(request: HttpServletRequest, executionID: Long): String =
s"${UIUtils.prependBaseUri(
request, parent.basePath)}/${parent.prefix}/execution?id=$executionID"
request, parent.basePath)}/${parent.prefix}/execution/?id=$executionID"
}

private[ui] class RunningExecutionTable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class ExecutionPage(parent: SQLTab) extends WebUIPage("execution") with Logging
}

private def jobURL(request: HttpServletRequest, jobId: Long): String =
"%s/jobs/job?id=%s".format(UIUtils.prependBaseUri(request, parent.basePath), jobId)
"%s/jobs/job/?id=%s".format(UIUtils.prependBaseUri(request, parent.basePath), jobId)

private def physicalPlanDescription(physicalPlanDescription: String): Seq[Node] = {
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private[ui] class ThriftServerPage(parent: ThriftServerTab) extends WebUIPage(""

def generateDataRow(info: ExecutionInfo): Seq[Node] = {
val jobLink = info.jobId.map { id: String =>
<a href={"%s/jobs/job?id=%s".format(
<a href={"%s/jobs/job/?id=%s".format(
UIUtils.prependBaseUri(request, parent.basePath), id)}>
[{id}]
</a>
Expand Down Expand Up @@ -147,7 +147,7 @@ private[ui] class ThriftServerPage(parent: ThriftServerTab) extends WebUIPage(""
val headerRow = Seq("User", "IP", "Session ID", "Start Time", "Finish Time", "Duration",
"Total Execute")
def generateDataRow(session: SessionInfo): Seq[Node] = {
val sessionLink = "%s/%s/session?id=%s".format(
val sessionLink = "%s/%s/session/?id=%s".format(
UIUtils.prependBaseUri(request, parent.basePath), parent.prefix, session.sessionId)
<tr>
<td> {session.userName} </td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private[ui] class ThriftServerSessionPage(parent: ThriftServerTab)

def generateDataRow(info: ExecutionInfo): Seq[Node] = {
val jobLink = info.jobId.map { id: String =>
<a href={"%s/jobs/job?id=%s".format(
<a href={"%s/jobs/job/?id=%s".format(
UIUtils.prependBaseUri(request, parent.basePath), id)}>
[{id}]
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private[ui] class BatchPage(parent: StreamingTab) extends WebUIPage("batch") {
flatMap(info => info.failureReason).headOption.getOrElse("")
val formattedDuration = duration.map(d => SparkUIUtils.formatDuration(d)).getOrElse("-")
val detailUrl = s"${SparkUIUtils.prependBaseUri(
request, parent.basePath)}/jobs/job?id=${sparkJob.jobId}"
request, parent.basePath)}/jobs/job/?id=${sparkJob.jobId}"

// In the first row, output op id and its information needs to be shown. In other rows, these
// cells will be taken up due to "rowspan".
Expand Down