Workers: Color status indicators

Match Jobs and Tasks.
This commit is contained in:
Pablo Vazquez 2022-07-07 12:20:25 +02:00
parent d072e2c146
commit 7032c1ad0b
2 changed files with 9 additions and 2 deletions

View File

@ -442,6 +442,11 @@ select {
--indicator-color: var(--color-worker-status-offline);
}
[class^='worker-status'] {
color: var(--indicator-color);
font-weight: bold;
}
.status-archiving,
.status-active,
.status-queued,

View File

@ -26,7 +26,7 @@ export function indicator(status, classNamePrefix) {
*/
export function workerStatus(worker) {
if (!worker.status_change) {
return `${worker.status}`;
return `<span class="worker-status-${worker.status}">${worker.status}</span>`;
}
let arrow;
@ -36,5 +36,7 @@ export function workerStatus(worker) {
arrow = `<span class='state-transition-arrow forced' title='forced status transition'>➜</span>`
}
return `${worker.status} ${arrow} ${worker.status_change.status}`;
return `<span class="worker-status-${worker.status}">${worker.status}</span>
${arrow}
<span class="worker-status-${worker.status_change.status}">${worker.status_change.status}</span>`;
}