mirror of
https://github.com/hansjone/netx.git
synced 2026-10-12 03:00:46 +08:00
Align compare board toolbar and show device name with collect time.
Drop the batch-run label, resolve NE from job tasks, and slim left-nav badges to pass or non-zero fail counts only. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
182b65de2a
commit
d96cbf330a
3 changed files with 238 additions and 121 deletions
|
|
@ -39,49 +39,71 @@ def _utcnow() -> datetime:
|
||||||
return utcnow_naive()
|
return utcnow_naive()
|
||||||
|
|
||||||
|
|
||||||
def _compare_side(db: Session, batch_id: str) -> dict[str, Any]:
|
def _compare_side(
|
||||||
|
db: Session,
|
||||||
|
batch_id: str,
|
||||||
|
*,
|
||||||
|
fallback_task_id: str = "",
|
||||||
|
) -> dict[str, Any]:
|
||||||
"""Human-readable before/after side for board header (who vs who)."""
|
"""Human-readable before/after side for board header (who vs who)."""
|
||||||
bid = str(batch_id or "").strip()
|
bid = str(batch_id or "").strip()
|
||||||
|
fb_tid = str(fallback_task_id or "").strip()
|
||||||
|
empty = {
|
||||||
|
"batch_id": bid,
|
||||||
|
"task_id": fb_tid,
|
||||||
|
"ne_name": "",
|
||||||
|
"ne_id": "",
|
||||||
|
"ne_ip": "",
|
||||||
|
"vendor": "",
|
||||||
|
"status": "",
|
||||||
|
"row_count": 0,
|
||||||
|
"started_at": None,
|
||||||
|
"label": "",
|
||||||
|
}
|
||||||
if not bid:
|
if not bid:
|
||||||
return {
|
# Still resolve device from job task when batch not chosen yet
|
||||||
"batch_id": "",
|
if fb_tid:
|
||||||
"task_id": "",
|
task = db.get(BizStateTask, fb_tid)
|
||||||
"ne_name": "",
|
if task:
|
||||||
"ne_id": "",
|
ne_name = str(task.ne_name or "").strip()
|
||||||
"ne_ip": "",
|
ne_ip = str(task.ne_ip or "").strip()
|
||||||
"vendor": "",
|
label = ne_name or ne_ip or fb_tid[:12]
|
||||||
"status": "",
|
return {
|
||||||
"row_count": 0,
|
**empty,
|
||||||
"started_at": None,
|
"ne_name": ne_name,
|
||||||
"label": "",
|
"ne_id": str(task.ne_id or "").strip(),
|
||||||
}
|
"ne_ip": ne_ip,
|
||||||
|
"vendor": str(task.vendor or "").strip(),
|
||||||
|
"label": label,
|
||||||
|
}
|
||||||
|
return empty
|
||||||
b = db.get(BizStateBatch, bid)
|
b = db.get(BizStateBatch, bid)
|
||||||
if not b:
|
if not b:
|
||||||
|
task = db.get(BizStateTask, fb_tid) if fb_tid else None
|
||||||
|
ne_name = str((task.ne_name if task else "") or "").strip()
|
||||||
|
ne_ip = str((task.ne_ip if task else "") or "").strip()
|
||||||
|
label = ne_name or ne_ip or bid[:12]
|
||||||
return {
|
return {
|
||||||
"batch_id": bid,
|
**empty,
|
||||||
"task_id": "",
|
|
||||||
"ne_name": "",
|
|
||||||
"ne_id": "",
|
|
||||||
"ne_ip": "",
|
|
||||||
"vendor": "",
|
|
||||||
"status": "missing",
|
"status": "missing",
|
||||||
"row_count": 0,
|
"ne_name": ne_name,
|
||||||
"started_at": None,
|
"ne_id": str((task.ne_id if task else "") or "").strip(),
|
||||||
"label": bid[:12],
|
"ne_ip": ne_ip,
|
||||||
|
"vendor": str((task.vendor if task else "") or "").strip(),
|
||||||
|
"label": label,
|
||||||
}
|
}
|
||||||
task = db.get(BizStateTask, b.task_id) if b.task_id else None
|
task = db.get(BizStateTask, b.task_id) if b.task_id else None
|
||||||
|
if task is None and fb_tid:
|
||||||
|
task = db.get(BizStateTask, fb_tid)
|
||||||
ne_name = str(b.ne_name or (task.ne_name if task else "") or "").strip()
|
ne_name = str(b.ne_name or (task.ne_name if task else "") or "").strip()
|
||||||
ne_id = str(b.ne_id or (task.ne_id if task else "") or "").strip()
|
ne_id = str(b.ne_id or (task.ne_id if task else "") or "").strip()
|
||||||
ne_ip = str((task.ne_ip if task else "") or "").strip()
|
ne_ip = str((task.ne_ip if task else "") or "").strip()
|
||||||
vendor = str(b.vendor or (task.vendor if task else "") or "").strip()
|
vendor = str(b.vendor or (task.vendor if task else "") or "").strip()
|
||||||
title = ne_name or ne_id or (b.task_id or bid)[:12]
|
title = ne_name or ne_ip or ne_id or ""
|
||||||
if ne_ip and ne_ip not in (ne_name, ne_id, title):
|
label = title if title else bid[:12]
|
||||||
label = f"{title} ({ne_ip})"
|
|
||||||
else:
|
|
||||||
label = title
|
|
||||||
return {
|
return {
|
||||||
"batch_id": bid,
|
"batch_id": bid,
|
||||||
"task_id": str(b.task_id or ""),
|
"task_id": str(b.task_id or fb_tid or ""),
|
||||||
"ne_name": ne_name,
|
"ne_name": ne_name,
|
||||||
"ne_id": ne_id,
|
"ne_id": ne_id,
|
||||||
"ne_ip": ne_ip,
|
"ne_ip": ne_ip,
|
||||||
|
|
@ -1394,8 +1416,12 @@ def get_run(db: Session, run_id: str) -> dict[str, Any]:
|
||||||
stored = "rows" if _run_has_diff_rows(db, run_id) else "inline"
|
stored = "rows" if _run_has_diff_rows(db, run_id) else "inline"
|
||||||
job = db.get(BizCompareJob, r.job_id) if r.job_id else None
|
job = db.get(BizCompareJob, r.job_id) if r.job_id else None
|
||||||
mapping = db.get(BizPortMapping, r.mapping_id) if r.mapping_id else None
|
mapping = db.get(BizPortMapping, r.mapping_id) if r.mapping_id else None
|
||||||
before_side = _compare_side(db, r.before_batch_id)
|
before_side = _compare_side(
|
||||||
after_side = _compare_side(db, r.after_batch_id)
|
db, r.before_batch_id, fallback_task_id=(job.before_task_id if job else "")
|
||||||
|
)
|
||||||
|
after_side = _compare_side(
|
||||||
|
db, r.after_batch_id, fallback_task_id=(job.after_task_id if job else "")
|
||||||
|
)
|
||||||
return {
|
return {
|
||||||
"id": r.id,
|
"id": r.id,
|
||||||
"job_id": r.job_id,
|
"job_id": r.job_id,
|
||||||
|
|
@ -1590,13 +1616,16 @@ def list_runs(db: Session, job_id: str, *, limit: int = 20) -> list[dict[str, An
|
||||||
.limit(max(1, min(100, int(limit))))
|
.limit(max(1, min(100, int(limit))))
|
||||||
.all()
|
.all()
|
||||||
)
|
)
|
||||||
|
job = db.get(BizCompareJob, job_id)
|
||||||
|
before_tid = str(job.before_task_id or "") if job else ""
|
||||||
|
after_tid = str(job.after_task_id or "") if job else ""
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
"id": r.id,
|
"id": r.id,
|
||||||
"before_batch_id": r.before_batch_id,
|
"before_batch_id": r.before_batch_id,
|
||||||
"after_batch_id": r.after_batch_id,
|
"after_batch_id": r.after_batch_id,
|
||||||
"before": _compare_side(db, r.before_batch_id),
|
"before": _compare_side(db, r.before_batch_id, fallback_task_id=before_tid),
|
||||||
"after": _compare_side(db, r.after_batch_id),
|
"after": _compare_side(db, r.after_batch_id, fallback_task_id=after_tid),
|
||||||
"status": r.status,
|
"status": r.status,
|
||||||
"summary": {
|
"summary": {
|
||||||
k: (r.summary_json or {}).get(k, 0)
|
k: (r.summary_json or {}).get(k, 0)
|
||||||
|
|
|
||||||
|
|
@ -10096,39 +10096,52 @@ html.login-page--paused .login-page__flare {
|
||||||
|
|
||||||
.bs-cmp-board__toolbar {
|
.bs-cmp-board__toolbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: nowrap;
|
||||||
gap: 8px 12px;
|
gap: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
|
min-height: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-cmp-board__run-select {
|
||||||
|
flex: 0 1 280px;
|
||||||
|
min-width: 160px;
|
||||||
|
max-width: 320px;
|
||||||
|
height: 32px;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-cmp-board__actions {
|
.bs-cmp-board__actions {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-cmp-sides {
|
.bs-cmp-sides {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px 8px;
|
gap: 6px 8px;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
padding: 4px 8px;
|
height: 32px;
|
||||||
|
padding: 0 8px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid var(--bs-cmp-border, rgba(148, 163, 184, 0.22));
|
border: 1px solid var(--bs-cmp-border, rgba(148, 163, 184, 0.22));
|
||||||
background: rgba(15, 23, 42, 0.45);
|
background: rgba(15, 23, 42, 0.45);
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-cmp-sides__side {
|
.bs-cmp-sides__side {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: nowrap;
|
||||||
align-items: baseline;
|
align-items: center;
|
||||||
gap: 4px 8px;
|
gap: 6px;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
padding: 2px 6px;
|
padding: 0 6px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-cmp-sides__side.is-before {
|
.bs-cmp-sides__side.is-before {
|
||||||
|
|
@ -10158,14 +10171,14 @@ html.login-page--paused .login-page__flare {
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-cmp-sides__name {
|
.bs-cmp-sides__name {
|
||||||
font-size: 13px;
|
font-size: 12px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #f1f5f9;
|
color: #f1f5f9;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
max-width: 14rem;
|
max-width: 10rem;
|
||||||
line-height: 1.3;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-cmp-sides__meta {
|
.bs-cmp-sides__meta {
|
||||||
|
|
@ -10175,19 +10188,22 @@ html.login-page--paused .login-page__flare {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bs-cmp-sides__vs {
|
.bs-cmp-sides__arrow {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
padding: 2px 8px;
|
|
||||||
border-radius: 999px;
|
|
||||||
background: rgba(59, 130, 246, 0.18);
|
|
||||||
border: 1px solid rgba(96, 165, 250, 0.35);
|
|
||||||
color: #93c5fd;
|
color: #93c5fd;
|
||||||
font-size: 11px;
|
font-weight: 700;
|
||||||
font-weight: 800;
|
opacity: 0.85;
|
||||||
letter-spacing: 0.02em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 900px) {
|
.bs-cmp-sides__vs {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1100px) {
|
||||||
|
.bs-cmp-board__toolbar {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
.bs-cmp-board__actions {
|
.bs-cmp-board__actions {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
@ -10195,10 +10211,9 @@ html.login-page--paused .login-page__flare {
|
||||||
.bs-cmp-sides {
|
.bs-cmp-sides {
|
||||||
flex: 1 1 100%;
|
flex: 1 1 100%;
|
||||||
order: 3;
|
order: 3;
|
||||||
}
|
height: auto;
|
||||||
|
min-height: 32px;
|
||||||
.bs-cmp-board__actions {
|
padding: 4px 8px;
|
||||||
order: 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -10370,6 +10385,16 @@ html.login-page--paused .login-page__flare {
|
||||||
color: #94a3b8;
|
color: #94a3b8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bs-cmp-nav__badge--pass.is-hot {
|
||||||
|
color: #bbf7d0;
|
||||||
|
background: rgba(34, 197, 94, 0.14);
|
||||||
|
border-color: rgba(74, 222, 128, 0.35);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bs-cmp-nav__badge--pass.is-hot b {
|
||||||
|
color: #86efac;
|
||||||
|
}
|
||||||
|
|
||||||
.bs-cmp-main {
|
.bs-cmp-main {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
|
||||||
|
|
@ -213,13 +213,41 @@ function sideDeviceName(side?: {
|
||||||
batch_id?: string;
|
batch_id?: string;
|
||||||
} | null): string {
|
} | null): string {
|
||||||
if (!side) return "—";
|
if (!side) return "—";
|
||||||
return (
|
const name = String(side.ne_name || "").trim();
|
||||||
String(side.ne_name || "").trim() ||
|
const ip = String(side.ne_ip || "").trim();
|
||||||
String(side.ne_ip || "").trim() ||
|
const label = String(side.label || "").trim();
|
||||||
String(side.label || "").trim() ||
|
// Prefer real device identity; ignore hex-ish fallbacks that look like batch ids
|
||||||
String(side.batch_id || "").slice(0, 8) ||
|
if (name) return name;
|
||||||
"—"
|
if (ip) return ip;
|
||||||
);
|
if (label && !/^[a-f0-9]{8,32}$/i.test(label)) return label;
|
||||||
|
return "—";
|
||||||
|
}
|
||||||
|
|
||||||
|
function sideCollectTime(side?: { started_at?: string | null } | null): string {
|
||||||
|
return fmtTime(side?.started_at);
|
||||||
|
}
|
||||||
|
|
||||||
|
function enrichSideFromTask(
|
||||||
|
side: Record<string, unknown> | null | undefined,
|
||||||
|
taskId: string,
|
||||||
|
tasks: TaskOpt[],
|
||||||
|
): { ne_name?: string; ne_ip?: string; label?: string; batch_id?: string; started_at?: string | null } {
|
||||||
|
const base = { ...(side || {}) } as {
|
||||||
|
ne_name?: string;
|
||||||
|
ne_ip?: string;
|
||||||
|
label?: string;
|
||||||
|
batch_id?: string;
|
||||||
|
started_at?: string | null;
|
||||||
|
};
|
||||||
|
if (sideDeviceName(base) !== "—") return base;
|
||||||
|
const task = tasks.find((t) => t.id === taskId);
|
||||||
|
if (!task) return base;
|
||||||
|
return {
|
||||||
|
...base,
|
||||||
|
ne_name: task.ne_name || base.ne_name,
|
||||||
|
ne_ip: task.ne_ip || base.ne_ip,
|
||||||
|
label: task.ne_name || task.ne_ip || base.label,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function taskLabel(row: TaskOpt) {
|
function taskLabel(row: TaskOpt) {
|
||||||
|
|
@ -2074,8 +2102,9 @@ export function BizComparePage() {
|
||||||
className={`bs-cmp-board${boardFs ? " is-fullscreen" : ""}`}
|
className={`bs-cmp-board${boardFs ? " is-fullscreen" : ""}`}
|
||||||
>
|
>
|
||||||
<div className="bs-cmp-board__toolbar">
|
<div className="bs-cmp-board__toolbar">
|
||||||
<FieldSelect
|
<select
|
||||||
label={t("bizCompare.pickBatchRun")}
|
className="ui-field__select bs-cmp-board__run-select"
|
||||||
|
aria-label={t("bizCompare.pickBatchRun")}
|
||||||
value={runDetail?.id || ""}
|
value={runDetail?.id || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const id = e.target.value;
|
const id = e.target.value;
|
||||||
|
|
@ -2084,44 +2113,70 @@ export function BizComparePage() {
|
||||||
>
|
>
|
||||||
<option value="">{t("bizCompare.pickRun")}</option>
|
<option value="">{t("bizCompare.pickRun")}</option>
|
||||||
{runs.map((r) => {
|
{runs.map((r) => {
|
||||||
const bl = sideDeviceName((r as any).before);
|
const before = enrichSideFromTask(
|
||||||
const al = sideDeviceName((r as any).after);
|
(r as any).before,
|
||||||
const sides =
|
beforeTaskId,
|
||||||
bl !== "—" || al !== "—" ? `${bl} → ${al} · ` : "";
|
tasks,
|
||||||
|
);
|
||||||
|
const after = enrichSideFromTask(
|
||||||
|
(r as any).after,
|
||||||
|
afterTaskId || beforeTaskId,
|
||||||
|
tasks,
|
||||||
|
);
|
||||||
|
const bl = sideDeviceName(before);
|
||||||
|
const al = sideDeviceName(after);
|
||||||
return (
|
return (
|
||||||
<option key={r.id} value={r.id}>
|
<option key={r.id} value={r.id}>
|
||||||
{sides}
|
{bl} {sideCollectTime(before)} → {al} {sideCollectTime(after)}
|
||||||
{fmtTime(r.created_at)} · {t("bizCompare.failCount")}{" "}
|
|
||||||
{(r.summary?.added ?? 0) +
|
|
||||||
(r.summary?.removed ?? 0) +
|
|
||||||
(r.summary?.changed ?? 0)}
|
|
||||||
</option>
|
</option>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</FieldSelect>
|
</select>
|
||||||
{runDetail ? (
|
{runDetail ? (
|
||||||
<div className="bs-cmp-sides" aria-label={t("bizCompare.sidesTitle")}>
|
<div className="bs-cmp-sides" aria-label={t("bizCompare.sidesTitle")}>
|
||||||
<div className="bs-cmp-sides__side is-before">
|
{(() => {
|
||||||
<span className="bs-cmp-sides__tag">{t("bizCompare.sideBefore")}</span>
|
const before = enrichSideFromTask(
|
||||||
<strong className="bs-cmp-sides__name" title={sideDeviceName(runDetail.before)}>
|
runDetail.before,
|
||||||
{sideDeviceName(runDetail.before)}
|
beforeTaskId,
|
||||||
</strong>
|
tasks,
|
||||||
<span className="bs-cmp-sides__meta muted">
|
);
|
||||||
{fmtTime(runDetail.before?.started_at)}
|
const after = enrichSideFromTask(
|
||||||
</span>
|
runDetail.after,
|
||||||
</div>
|
afterTaskId || beforeTaskId,
|
||||||
<span className="bs-cmp-sides__vs" aria-hidden>
|
tasks,
|
||||||
{t("bizCompare.sidesVs")}
|
);
|
||||||
</span>
|
return (
|
||||||
<div className="bs-cmp-sides__side is-after">
|
<>
|
||||||
<span className="bs-cmp-sides__tag">{t("bizCompare.sideAfter")}</span>
|
<div className="bs-cmp-sides__side is-before">
|
||||||
<strong className="bs-cmp-sides__name" title={sideDeviceName(runDetail.after)}>
|
<span className="bs-cmp-sides__tag">{t("bizCompare.sideBefore")}</span>
|
||||||
{sideDeviceName(runDetail.after)}
|
<strong
|
||||||
</strong>
|
className="bs-cmp-sides__name"
|
||||||
<span className="bs-cmp-sides__meta muted">
|
title={sideDeviceName(before)}
|
||||||
{fmtTime(runDetail.after?.started_at)}
|
>
|
||||||
</span>
|
{sideDeviceName(before)}
|
||||||
</div>
|
</strong>
|
||||||
|
<span className="bs-cmp-sides__meta muted">
|
||||||
|
{sideCollectTime(before)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span className="bs-cmp-sides__arrow" aria-hidden>
|
||||||
|
→
|
||||||
|
</span>
|
||||||
|
<div className="bs-cmp-sides__side is-after">
|
||||||
|
<span className="bs-cmp-sides__tag">{t("bizCompare.sideAfter")}</span>
|
||||||
|
<strong
|
||||||
|
className="bs-cmp-sides__name"
|
||||||
|
title={sideDeviceName(after)}
|
||||||
|
>
|
||||||
|
{sideDeviceName(after)}
|
||||||
|
</strong>
|
||||||
|
<span className="bs-cmp-sides__meta muted">
|
||||||
|
{sideCollectTime(after)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
<div className="btn-row bs-cmp-board__actions">
|
<div className="btn-row bs-cmp-board__actions">
|
||||||
|
|
@ -2193,31 +2248,39 @@ export function BizComparePage() {
|
||||||
>
|
>
|
||||||
<span className="bs-cmp-nav__dot" aria-hidden />
|
<span className="bs-cmp-nav__dot" aria-hidden />
|
||||||
<span className="bs-cmp-nav__name">{c.metric_id}</span>
|
<span className="bs-cmp-nav__name">{c.metric_id}</span>
|
||||||
<span className="bs-cmp-nav__badges" aria-label={c.metric_id}>
|
<span className="bs-cmp-nav__badges">
|
||||||
<span
|
{dirty > 0 ? (
|
||||||
className={`bs-cmp-nav__badge bs-cmp-nav__badge--removed${
|
<>
|
||||||
Number(c.removed || 0) > 0 ? " is-hot" : ""
|
{Number(c.removed || 0) > 0 ? (
|
||||||
}`}
|
<span className="bs-cmp-nav__badge bs-cmp-nav__badge--removed is-hot">
|
||||||
>
|
{t("bizCompare.missCount")}{" "}
|
||||||
{t("bizCompare.missCount")} <b>{Number(c.removed || 0)}</b>
|
<b>{Number(c.removed || 0)}</b>
|
||||||
</span>
|
</span>
|
||||||
<span
|
) : null}
|
||||||
className={`bs-cmp-nav__badge bs-cmp-nav__badge--added${
|
{Number(c.added || 0) > 0 ? (
|
||||||
Number(c.added || 0) > 0 ? " is-hot" : ""
|
<span className="bs-cmp-nav__badge bs-cmp-nav__badge--added is-hot">
|
||||||
}`}
|
{t("bizCompare.extraCount")}{" "}
|
||||||
>
|
<b>{Number(c.added || 0)}</b>
|
||||||
{t("bizCompare.extraCount")} <b>{Number(c.added || 0)}</b>
|
</span>
|
||||||
</span>
|
) : null}
|
||||||
<span
|
{Number(c.changed || 0) > 0 ? (
|
||||||
className={`bs-cmp-nav__badge bs-cmp-nav__badge--changed${
|
<span className="bs-cmp-nav__badge bs-cmp-nav__badge--changed is-hot">
|
||||||
Number(c.changed || 0) > 0 ? " is-hot" : ""
|
{t("bizCompare.mismatchCount")}{" "}
|
||||||
}`}
|
<b>{Number(c.changed || 0)}</b>
|
||||||
>
|
</span>
|
||||||
{t("bizCompare.mismatchCount")} <b>{Number(c.changed || 0)}</b>
|
) : null}
|
||||||
</span>
|
</>
|
||||||
<span className="bs-cmp-nav__badge bs-cmp-nav__badge--unchanged">
|
) : (
|
||||||
{t("bizCompare.matchCount")} <b>{Number(c.unchanged || 0)}</b>
|
<span className="bs-cmp-nav__badge bs-cmp-nav__badge--pass is-hot">
|
||||||
</span>
|
{t("bizCompare.kindPass")}
|
||||||
|
{Number(c.unchanged || 0) > 0 ? (
|
||||||
|
<>
|
||||||
|
{" "}
|
||||||
|
<b>{Number(c.unchanged || 0)}</b>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue