netx/web/src/features/topology/lib/constants.ts
oliver ec19102446 Fix NE page lint errors, topology tree overflow and NE row height.
- NE page: derive the live connect-detail row instead of syncing it in an
  effect; one async path for topology deep links; memoize per-tag stats;
  re-seed the form dialog during render on open; move hop form state into
  lib/hopProxy so the component file only exports components.
- NE page: drop the "click a card to filter" hint; keep row actions on one
  line so rows no longer double in height.
- Topology tree: rows fit the sidebar, long names ellipsize with a tooltip,
  node counts stay visible; default sidebar width 260 -> 280.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:51:37 +08:00

33 lines
1.7 KiB
TypeScript

/** Flat world-map canvas (LOD / scatter). Temporarily offline in the UI. */
export const WORLD_MAP_ENABLED = false;
export const LAST_LEAF_KEY = "netx.topology.lastLeafViewId";
export const TREE_EXPAND_KEY = "netx.topology.treeExpanded";
export const SIDEBAR_WIDTH_KEY = "netx.topology.sidebarWidth";
export const SIDEBAR_WIDTH_DEFAULT = 280;
export const SIDEBAR_WIDTH_MIN = 180;
export const SIDEBAR_WIDTH_MAX = 560;
export const UNDO_MAX = 40;
export const PALETTE_DND = "application/x-netx-topo-palette";
export const SEP = " / ";
export const FIT_VIEW_OPTS = { padding: 0.2, includeHiddenNodes: true } as const;
export const WORLD_LOCATE_ZOOM = 0.22;
export const WORLD_LOCATE_HALF = 12000;
export const WORLD_FLAT_ACCUM_CAP = 8000;
export const EDGE_DEFAULTS_KEY = "netx.topology.edgeDefaults";
export const AUTO_LAYOUT_DISCOVER_KEY = "netx.topology.autoLayoutAfterDiscover";
export const DISCOVER_AUTO_ADD_KEY = "netx.topology.discoverAutoAddUnmatched.v2";
export const DISCOVER_PROJECT_NEIGHBORS_KEY = "netx.topology.discoverProjectNeighbors.v2";
export const SCALE_BUNDLE_WIDTH_KEY = "netx.topology.scaleBundleWidth";
export const SHOW_PLACEHOLDER_BADGE_KEY = "netx.topology.showPlaceholderBadge";
export const SHOW_CONNECT_STATUS_KEY = "netx.topology.showConnectStatus";
export const SHOW_ALARM_OVERLAY_KEY = "netx.topology.showAlarmOverlay";
export const SHOW_LEVEL_COLORS_KEY = "netx.topology.showLevelColors";
export const CANVAS_BG_KEY = "netx.topology.canvasBg";
export const DEFAULT_CANVAS_BG = "#0f172a";
export const LEGACY_CANVAS_BG = "#dbeafe";
export const LABEL_COLORS_KEY = "netx.topology.labelColors";
export const VENDOR_COLORS_KEY = "netx.topology.vendorColors";