Show task name before enabled state

This commit is contained in:
way
2026-10-17 23:34:26 +08:00
parent c1459aef45
commit 242b0d223f
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ export function hostCard(entry) {
const kind = !current || unknown || result === undefined ? 'unknown' : result === 1 ? 'normal' : 'error';
const stateLabel = kind === 'normal' ? text('正常', 'Normal') : kind === 'error' ? text('失败', 'Failed') : text('待确认', 'Unconfirmed');
const title = /轮播/.test(resource.name || '') ? text('轮播任务', 'Slideshow task') : resource.name || text('任务', 'Job');
return [card(title, enabled ? text('启用', 'Enabled') : text('停用', 'Disabled'), status(kind, stateLabel))];
return [card(title, `${resource.name || text('任务', 'Job')} · ${enabled ? text('启用', 'Enabled') : text('停用', 'Disabled')}`, status(kind, stateLabel))];
}
return metrics.filter(m => m.resource_id === resource.id).map(metric => {
const title = label(metric);
+1
View File
@@ -26,6 +26,7 @@ assert.equal(result.nested,0);
assert.equal(result.subtitle,'渡口浪人的相框');
assert.equal(result.status,lang==='zh'?'正常':'Normal');
assert(result.text.includes(lang==='zh'?'轮播任务':'Slideshow task'));
assert(result.text.includes('家庭照片轮播 · '+(lang==='zh'?'启用':'Enabled')));
await page.close();
}
console.log('6 browser checks passed');