Show aux commands in biz-state UI; keep only config_vrf under BGP VRF summary.

Add an Aux column for each monitor item. Drop ip_route/ipv6_route as summary enrich aux so FIB stays a standalone collect profile. Export defaults to primary commands only.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-22 11:39:44 +08:00
parent 67930bb348
commit 089c88d35e
9 changed files with 116 additions and 29 deletions

View file

@ -237,6 +237,7 @@ const en = {
profiles: "Monitor items",
enable: "On",
command: "Command template",
colAux: "Aux commands",
params: "Bindings",
discoverVrf: "Discover VRFs",
discoverBind: "Discover / Bind",

View file

@ -237,6 +237,7 @@ const zh = {
profiles: "监控项",
enable: "启用",
command: "命令模板",
colAux: "辅命令",
params: "参数关联",
discoverVrf: "发现 VRF",
discoverBind: "发现 / 关联",

View file

@ -11331,7 +11331,7 @@ html.login-page--paused .login-page__flare {
.bs-profiles-table {
width: 100%;
min-width: 960px;
min-width: 1180px;
table-layout: fixed;
border-collapse: separate;
border-spacing: 0;
@ -11352,21 +11352,26 @@ html.login-page--paused .login-page__flare {
.bs-profiles-table th:nth-child(2),
.bs-profiles-table td:nth-child(2) {
width: 220px;
width: 200px;
}
.bs-profiles-table th:nth-child(3),
.bs-profiles-table td:nth-child(3) {
width: 240px;
width: 200px;
}
.bs-profiles-table th:nth-child(4),
.bs-profiles-table td:nth-child(4) {
width: 108px;
width: 100px;
}
.bs-profiles-table th:nth-child(5),
.bs-profiles-table td:nth-child(5) {
width: 280px;
}
.bs-profiles-table th:nth-child(6),
.bs-profiles-table td:nth-child(6) {
width: auto;
}
@ -11379,6 +11384,40 @@ html.login-page--paused .login-page__flare {
max-width: 100%;
}
.bs-profiles-table .bs-aux-cell {
vertical-align: top;
font-size: 12px;
}
.bs-profiles-table .bs-aux-list {
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-direction: column;
gap: 6px;
}
.bs-profiles-table .bs-aux-list li {
min-width: 0;
}
.bs-profiles-table .bs-aux-key {
font-weight: 600;
color: #cbd5e1;
}
.bs-profiles-table .bs-aux-cmd {
display: block;
margin-top: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 11px;
color: #94a3b8;
max-width: 100%;
}
.bs-profiles-table .bs-params-cell {
vertical-align: top;
}

View file

@ -68,6 +68,12 @@ type Profile = {
metric_id: string;
kind?: string;
placeholders?: Placeholder[];
aux_commands?: Array<{
key: string;
profile_id: string;
title?: string;
command_template?: string;
}>;
};
type BatchRow = {
@ -1429,6 +1435,7 @@ export function BizStatePage() {
<th>{t("bizState.params")}</th>
<th>{t("bizState.colActions")}</th>
<th>{t("bizState.command")}</th>
<th>{t("bizState.colAux")}</th>
</tr>
</thead>
<tbody>
@ -1443,6 +1450,7 @@ export function BizStatePage() {
}[];
const needsBind = (prof.placeholders || []).length > 0;
const phNames = (prof.placeholders || []).map((p) => p.name);
const auxList = prof.aux_commands || [];
let bindLines: string[] = [];
if (needsBind && binds.length) {
if (phNames.length >= 2) {
@ -1533,7 +1541,30 @@ export function BizStatePage() {
)}
</td>
<td>
<code className="bs-cmd-cell">{prof.command_template}</code>
<code className="bs-cmd-cell" title={prof.command_template}>
{prof.command_template}
</code>
</td>
<td className="bs-aux-cell">
{auxList.length ? (
<ul className="bs-aux-list">
{auxList.map((a) => {
const label = a.title || a.key || a.profile_id;
const tmpl = String(a.command_template || "").trim();
return (
<li key={`${a.key}:${a.profile_id}`} title={tmpl || a.profile_id}>
<span className="bs-aux-key">{a.key}</span>
<span className="muted"> · {label}</span>
{tmpl ? (
<code className="bs-aux-cmd">{tmpl}</code>
) : null}
</li>
);
})}
</ul>
) : (
<span className="muted">—</span>
)}
</td>
</tr>
);