mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 11:50:44 +08:00
Add Network Management module with collapsible left nav.
Consolidate devices, topology, alarms, WebCRT, and collection tasks under /network; keep legacy path redirects and workbench entry. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3bd5d5b7da
commit
2fc47e5135
13 changed files with 595 additions and 182 deletions
|
|
@ -27,40 +27,13 @@ export const MODULES: readonly ModuleDefinition[] = [
|
|||
titleKey: "layout.titleUme",
|
||||
},
|
||||
{
|
||||
moduleId: "managed-ne",
|
||||
path: "/ne",
|
||||
moduleId: "network",
|
||||
path: "/network",
|
||||
section: "operations",
|
||||
labelKey: "workbench.cards.managedNe",
|
||||
descKey: "workbench.cards.managedNeDesc",
|
||||
labelKey: "workbench.cards.network",
|
||||
descKey: "workbench.cards.networkDesc",
|
||||
iconTone: "green",
|
||||
titleKey: "layout.titleManagedNe",
|
||||
},
|
||||
{
|
||||
moduleId: "collect",
|
||||
path: "/collect",
|
||||
section: "operations",
|
||||
labelKey: "workbench.cards.collect",
|
||||
descKey: "workbench.cards.collectDesc",
|
||||
iconTone: "amber",
|
||||
titleKey: "layout.titleCollect",
|
||||
},
|
||||
{
|
||||
moduleId: "webcrt",
|
||||
path: "/webcrt",
|
||||
section: "operations",
|
||||
labelKey: "workbench.cards.webcrt",
|
||||
descKey: "workbench.cards.webcrtDesc",
|
||||
iconTone: "slate",
|
||||
titleKey: "layout.titleWebcrt",
|
||||
},
|
||||
{
|
||||
moduleId: "topology",
|
||||
path: "/topology",
|
||||
section: "operations",
|
||||
labelKey: "workbench.cards.topology",
|
||||
descKey: "workbench.cards.topologyDesc",
|
||||
iconTone: "blue",
|
||||
titleKey: "layout.titleTopology",
|
||||
titleKey: "layout.titleNetwork",
|
||||
},
|
||||
{
|
||||
moduleId: "users",
|
||||
|
|
|
|||
50
web/src/config/networkNav.ts
Normal file
50
web/src/config/networkNav.ts
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/**
|
||||
* Left-nav tree for the Network Management module.
|
||||
* Add leaf items here when extending (devices / topology / alarms / tasks).
|
||||
*/
|
||||
|
||||
export type NetworkNavGroupId = "detail" | "tasks";
|
||||
|
||||
export type NetworkNavItem = {
|
||||
id: string;
|
||||
path: string;
|
||||
labelKey: string;
|
||||
group: NetworkNavGroupId;
|
||||
};
|
||||
|
||||
export type NetworkNavGroup = {
|
||||
id: NetworkNavGroupId;
|
||||
labelKey: string;
|
||||
items: NetworkNavItem[];
|
||||
};
|
||||
|
||||
export const NETWORK_NAV: readonly NetworkNavGroup[] = [
|
||||
{
|
||||
id: "detail",
|
||||
labelKey: "network.nav.detail",
|
||||
items: [
|
||||
{ id: "devices", path: "/network/devices", labelKey: "network.nav.devices", group: "detail" },
|
||||
{ id: "topology", path: "/network/topology", labelKey: "network.nav.topology", group: "detail" },
|
||||
{ id: "alarms", path: "/network/alarms", labelKey: "network.nav.alarms", group: "detail" },
|
||||
{ id: "webcrt", path: "/network/webcrt", labelKey: "network.nav.webcrt", group: "detail" },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "tasks",
|
||||
labelKey: "network.nav.tasks",
|
||||
items: [
|
||||
{
|
||||
id: "config-sync",
|
||||
path: "/network/tasks/config-sync",
|
||||
labelKey: "network.nav.configSync",
|
||||
group: "tasks",
|
||||
},
|
||||
{
|
||||
id: "port-traffic",
|
||||
path: "/network/tasks/port-traffic",
|
||||
labelKey: "network.nav.portTraffic",
|
||||
group: "tasks",
|
||||
},
|
||||
],
|
||||
},
|
||||
] as const;
|
||||
Loading…
Add table
Add a link
Reference in a new issue