mirror of
https://github.com/hansjone/netx.git
synced 2026-10-17 08:33:25 +08:00
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:
parent
fa8e3abcc7
commit
84a4fc037a
3 changed files with 27 additions and 4 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue