Open LLDP job detail when jumping from canvas discover.

Pass job_id in the LLDP page URL so the network module auto-opens the task detail modal.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-05 19:27:52 +08:00
parent fa8e3abcc7
commit 84a4fc037a
3 changed files with 27 additions and 4 deletions

View file

@ -1602,6 +1602,7 @@ export function TopologyPage() {
const out: TopologyDiscoverOut = {
map_id: mapId,
protocol: "lldp",
job_id: job.id,
scanned: job.done,
edges_added: job.edges_added,
edges_updated: job.edges_updated,
@ -3533,12 +3534,14 @@ export function TopologyPage() {
<button
type="button"
className="btn btn--sm btn--ghost"
onClick={() =>
onClick={() => {
const jobId = String(discoverReport?.job_id || "").trim();
const qs = jobId ? `?job_id=${encodeURIComponent(jobId)}` : "";
openOrFocusModule({
moduleId: "network",
path: "/network/topology/lldp",
})
}
path: `/network/topology/lldp${qs}`,
});
}}
>
{t("topology.discoverGoLldp")}
</button>