Skip to content

Commit

Permalink
Web Dashboard: Extend tasks monitoring page to display czar ids
Browse files Browse the repository at this point in the history
  • Loading branch information
iagaponenko committed Feb 5, 2024
1 parent 72f54f3 commit f197905
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/wbase/Task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ memman::MemMan::Status Task::getMemHandleStatus() {
nlohmann::json Task::getJson() const {
// It would be nice to have the _queryString in this, but that could make the results very large.
nlohmann::json js;
js["czarId"] = _czarId;
js["queryId"] = _qId;
js["templateId"] = getTemplateId();
js["jobId"] = _jId;
Expand Down
4 changes: 4 additions & 0 deletions src/www/qserv/js/QservWorkerTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function(CSSLoader,
<th class="sticky" style="text-align:right;">QID</th>
<th class="sticky" style="text-align:center;"><i class="bi bi-info-circle-fill"></i></th>
<th class="sticky" style="text-align:center;">inter</th>
<th class="sticky" style="text-align:right;">czar</th>
<th class="sticky" style="text-align:right;">job</th>
<th class="sticky" style="text-align:right;">chunk</th>
<th class="sticky" style="text-align:right;">sub-ch</th>
Expand Down Expand Up @@ -290,13 +291,15 @@ function(CSSLoader,
numTasksTotal += query_stats[queryId].tasks.total;
numTasksSelected += query_stats[queryId].tasks.selected;
let scanInteractive = false;
let czarId = -1;
let tasks = _.sortBy(query_stats[queryId].tasks.entries, 'state');
const snapshotTime_msec = query_stats[queryId].tasks.snapshotTime_msec;
let prevJobId = -1;
for (let j in tasks) {
let task = tasks[j];
// In theory all tasks of the same query should have it the same.
scanInteractive = task.scanInteractive;
czarId = task.czarId;
// Display jobId and chunkId for the first subchunk of a job only. These parameters
// should have the same value for all subchunk tasks.
let jobId = '';
Expand Down Expand Up @@ -341,6 +344,7 @@ function(CSSLoader,
<button class="btn btn-outline-info btn-sm inspect-query" style="height:20px; margin:0px;" title="${queryInspectTitle}"></button>
</td>
<td rowspan="${rowspan}" style="text-align:center; vertical-align: top;"><pre>${scanInteractive ? "yes" : "no"}</pre></td>
<td rowspan="${rowspan}" style="text-align:center; vertical-align: top;"><pre>${czarId}</pre></td>
</tr>` + htmlTasks;
}
}
Expand Down

0 comments on commit f197905

Please sign in to comment.