Skip to content

Commit

Permalink
fix CI test, fix html document id duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjunbo committed Jan 5, 2024
1 parent 3a0e370 commit cd3ecac
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ case class EnginePage(parent: EngineTab) extends WebUIPage("") {
{onlineSession.size} session(s) are online,
running {runningSqlStat.size} operation(s)
</h4> ++
generateSessionStatsTable(request, onlineSession, closedSession) ++
generateStatementStatsTable(request, runningSqlStat, completedSqlStat, failedSqlStat)
generateSessionStatsTable(request, onlineSession.toSeq, closedSession.toSeq) ++
generateStatementStatsTable(
request,
runningSqlStat.toSeq,
completedSqlStat.toSeq,
failedSqlStat.toSeq)
UIUtils.headerSparkPage(request, parent.name, content, parent)
}

Expand Down Expand Up @@ -252,7 +256,7 @@ case class EnginePage(parent: EngineTab) extends WebUIPage("") {
data,
"kyuubi",
UIUtils.prependBaseUri(request, parent.basePath),
sqlTableTag).table(sqlTablePage)
s"${sqlTableTag}-table").table(sqlTablePage)
} catch {
case e @ (_: IllegalArgumentException | _: IndexOutOfBoundsException) =>
<div class="alert alert-error">
Expand Down Expand Up @@ -335,7 +339,7 @@ case class EnginePage(parent: EngineTab) extends WebUIPage("") {
data,
"kyuubi",
UIUtils.prependBaseUri(request, parent.basePath),
sessionTage).table(sessionPage)
s"${sessionTage}-table").table(sessionPage)
} catch {
case e @ (_: IllegalArgumentException | _: IndexOutOfBoundsException) =>
<div class="alert alert-error">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ case class EngineSessionPage(parent: EngineTab)
val content = mutable.ListBuffer[Node]()
if (running.nonEmpty) {
val sqlTableTag = "running"
val table = statementStatsTable(request, sqlTableTag, parent, running)
val table = statementStatsTable(request, sqlTableTag, parent, running.toSeq)
content ++=
<span id="sqlsessionstat" class="collapse-aggregated-runningSqlstat collapse-table"
onClick="collapseTable('collapse-aggregated-runningSqlstat',
Expand All @@ -164,12 +164,12 @@ case class EngineSessionPage(parent: EngineTab)

if (completed.nonEmpty) {
val table = {
val sessionTableTag = "completed"
val sqlTableTag = "completed"
statementStatsTable(
request,
sessionTableTag,
sqlTableTag,
parent,
completed)
completed.toSeq)
}

content ++=
Expand All @@ -190,12 +190,12 @@ case class EngineSessionPage(parent: EngineTab)

if (failed.nonEmpty) {
val table = {
val sessionTableTag = "failed"
val sqlTableTag = "failed"
statementStatsTable(
request,
sessionTableTag,
sqlTableTag,
parent,
failed)
failed.toSeq)
}

content ++=
Expand Down Expand Up @@ -232,7 +232,7 @@ case class EngineSessionPage(parent: EngineTab)
data,
"kyuubi/session",
UIUtils.prependBaseUri(request, parent.basePath),
sqlTableTag).table(sqlTablePage)
s"${sqlTableTag}").table(sqlTablePage)
} catch {
case e @ (_: IllegalArgumentException | _: IndexOutOfBoundsException) =>
<div class="alert alert-error">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ class EngineTabSuite extends WithSparkSQLEngine with HiveJDBCTestHelper {

// check sql stats table title
assert(resp.contains("Query Details"))
while (true) {
Thread.sleep(1000000)
}
}
response = client.execute(req)
assert(response.getStatusLine.getStatusCode === 200)
Expand Down

0 comments on commit cd3ecac

Please sign in to comment.