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

    https://github.com/apache/spark/pull/22645#discussion_r223190984
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala
 ---
    @@ -121,65 +122,247 @@ private[ui] class AllExecutionsPage(parent: SQLTab) 
extends WebUIPage("") with L
               {
                 if (running.nonEmpty) {
                   <li>
    -                <a href="#running-execution-table"><strong>Running 
Queries:</strong></a>
    +                <a href="#running"><strong>Running Queries:</strong></a>
                     {running.size}
                   </li>
                 }
               }
               {
                 if (completed.nonEmpty) {
                   <li>
    -                <a href="#completed-execution-table"><strong>Completed 
Queries:</strong></a>
    +                <a href="#completed"><strong>Completed 
Queries:</strong></a>
                     {completed.size}
                   </li>
                 }
               }
               {
                 if (failed.nonEmpty) {
                   <li>
    -                <a href="#failed-execution-table"><strong>Failed 
Queries:</strong></a>
    +                <a href="#failed"><strong>Failed Queries:</strong></a>
                     {failed.size}
                   </li>
                 }
               }
             </ul>
           </div>
    +
         UIUtils.headerSparkPage(request, "SQL", summary ++ content, parent, 
Some(5000))
       }
    +
    +  private def executionsTable(
    +    request: HttpServletRequest,
    +    executionTag: String,
    +    executionData: Seq[SQLExecutionUIData],
    +    currentTime: Long,
    +    showRunningJobs: Boolean,
    +    showSucceededJobs: Boolean,
    +    showFailedJobs: Boolean): Seq[Node] = {
    +
    +    // stripXSS is called to remove suspicious characters used in XSS 
attacks
    +    val allParameters = request.getParameterMap.asScala.toMap.map { case 
(k, v) =>
    +      UIUtils.stripXSS(k) -> v.map(UIUtils.stripXSS).toSeq
    +    }
    +    val parameterOtherTable = 
allParameters.filterNot(_._1.startsWith(executionTag))
    +      .map(para => para._1 + "=" + para._2(0))
    +
    +    val parameterExecutionPage = 
UIUtils.stripXSS(request.getParameter(executionTag + ".page"))
    +    val parameterExecutionSortColumn = UIUtils.stripXSS(request.
    +      getParameter(executionTag + ".sort"))
    +    val parameterExecutionSortDesc = 
UIUtils.stripXSS(request.getParameter(executionTag + ".desc"))
    +    val parameterExecutionPageSize = UIUtils.stripXSS(request.
    +      getParameter(executionTag + ".pageSize"))
    +    val parameterExecutionPrevPageSize = UIUtils.stripXSS(request.
    +      getParameter(executionTag + ".prevPageSize"))
    +
    +    val executionPage = 
Option(parameterExecutionPage).map(_.toInt).getOrElse(1)
    +    val executionSortColumn = Option(parameterExecutionSortColumn).map { 
sortColumn =>
    +      UIUtils.decodeURLParameter(sortColumn)
    +    }.getOrElse("ID")
    +    val executionSortDesc = 
Option(parameterExecutionSortDesc).map(_.toBoolean).getOrElse(
    +      // New executions should be shown above old executions by default.
    +      executionSortColumn == "ID"
    +    )
    +    val executionPageSize = 
Option(parameterExecutionPageSize).map(_.toInt).getOrElse(100)
    +    val executionPrevPageSize = 
Option(parameterExecutionPrevPageSize).map(_.toInt).
    +      getOrElse(executionPageSize)
    +
    +    val page: Int = {
    --- End diff --
    
    Done. Thanks


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to