fix(web): hide idle software job indicators
This commit is contained in:
parent
0bc6d695ef
commit
7f439a91d5
|
|
@ -33,6 +33,8 @@ class StaticVendorTests(unittest.TestCase):
|
||||||
self.assertIn('id="right-tab-jobs"', html)
|
self.assertIn('id="right-tab-jobs"', html)
|
||||||
self.assertIn('id="right-jobs-panel"', html)
|
self.assertIn('id="right-jobs-panel"', html)
|
||||||
self.assertIn('id="software-job-badge"', html)
|
self.assertIn('id="software-job-badge"', html)
|
||||||
|
self.assertIn(".workspace-badge[hidden]", html)
|
||||||
|
self.assertIn(".sj-entry-dot.succeeded, .sj-entry-dot.failed", html)
|
||||||
self.assertIn(".right-workspace-panel {", html)
|
self.assertIn(".right-workspace-panel {", html)
|
||||||
self.assertLess(
|
self.assertLess(
|
||||||
html.index('id="right-tab-jobs"'),
|
html.index('id="right-tab-jobs"'),
|
||||||
|
|
@ -50,6 +52,7 @@ class StaticVendorTests(unittest.TestCase):
|
||||||
self.assertIn("续接自 Job ${sourceJobId.slice(0, 8)}", source)
|
self.assertIn("续接自 Job ${sourceJobId.slice(0, 8)}", source)
|
||||||
self.assertIn("<dt>来源 Job</dt>", source)
|
self.assertIn("<dt>来源 Job</dt>", source)
|
||||||
self.assertIn("refreshCurrentTaskAfterSoftwareJob(job.task_id)", source)
|
self.assertIn("refreshCurrentTaskAfterSoftwareJob(job.task_id)", source)
|
||||||
|
self.assertNotIn('else if (active.length) entryDot.classList.add("active")', source)
|
||||||
self.assertIn("job.execution_runtime", source)
|
self.assertIn("job.execution_runtime", source)
|
||||||
self.assertIn("执行版本未记录", source)
|
self.assertIn("执行版本未记录", source)
|
||||||
self.assertIn("执行版本</dt><dd>${escapeHtml(jobRuntimeText(job))}", source)
|
self.assertIn("执行版本</dt><dd>${escapeHtml(jobRuntimeText(job))}", source)
|
||||||
|
|
|
||||||
|
|
@ -1147,10 +1147,11 @@
|
||||||
}
|
}
|
||||||
.workspace-badge {
|
.workspace-badge {
|
||||||
min-width: 16px; height: 16px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center;
|
min-width: 16px; height: 16px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center;
|
||||||
border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-style: normal; line-height: 1;
|
border-radius: 999px; background: var(--c-blue); color: #fff; font-size: 10px; font-style: normal; line-height: 1;
|
||||||
}
|
}
|
||||||
.sj-entry-dot { position: absolute; right: 2px; top: 1px; width: 8px; height: 8px; border: 2px solid #fafafa; border-radius: 50%; background: transparent; }
|
.workspace-badge[hidden] { display: none; }
|
||||||
.sj-entry-dot.active { background: #e28a2b; box-shadow: 0 0 0 2px rgba(226,138,43,.14); }
|
.sj-entry-dot { display: none; position: absolute; right: 2px; top: 1px; width: 8px; height: 8px; border: 2px solid #fafafa; border-radius: 50%; }
|
||||||
|
.sj-entry-dot.succeeded, .sj-entry-dot.failed { display: block; }
|
||||||
.sj-entry-dot.succeeded { background: #35a164; }
|
.sj-entry-dot.succeeded { background: #35a164; }
|
||||||
.sj-entry-dot.failed { background: var(--danger); }
|
.sj-entry-dot.failed { background: var(--danger); }
|
||||||
.software-job-summary {
|
.software-job-summary {
|
||||||
|
|
|
||||||
|
|
@ -293,7 +293,6 @@ function render() {
|
||||||
entryDot.className = "sj-entry-dot";
|
entryDot.className = "sj-entry-dot";
|
||||||
if (unreadJob?.status === "failed") entryDot.classList.add("failed");
|
if (unreadJob?.status === "failed") entryDot.classList.add("failed");
|
||||||
else if (unreadJob) entryDot.classList.add("succeeded");
|
else if (unreadJob) entryDot.classList.add("succeeded");
|
||||||
else if (active.length) entryDot.classList.add("active");
|
|
||||||
for (const id of ["software-job-badge", "software-job-mobile-badge"]) {
|
for (const id of ["software-job-badge", "software-job-mobile-badge"]) {
|
||||||
const badge = $(id);
|
const badge = $(id);
|
||||||
badge.hidden = active.length === 0;
|
badge.hidden = active.length === 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue