netx/web/src/i18n/locales/en/portTraffic.ts
oliver 0d894efe5e Refactor web UI: feature-first structure, tokenized styles, modern blue theme.
Structure
- pages/ -> features/<domain>/{Page, components, hooks, lib}; 95 files moved,
  333 imports rewritten, verified with tsc.
- services/api.ts -> services/api/<domain>.ts (250 exports preserved),
  types.ts -> types/<domain>.ts, i18n zh/en -> locales/<lang>/<namespace>.ts
  (2696 messages deep-equal before/after).
- ESLint rule: shared layers must not import features/.

Styles
- index.css (16k lines) split losslessly into styles/{base,layout,components,
  pages,legacy,theme}; compiled CSS was byte-identical before tokenizing.
- ~930 hard-coded colors replaced by --nx-* tokens (theme/tokens.css); WebCRT
  off-palette colors unified; fixed dark-on-dark text introduced by mapping.
- theme/theme.css: modern blue design language (rounded shapes, gradients,
  unified buttons/fields/tables/modals), form-grid alignment fix, flat nav list
  without tree indent, soft selected state instead of left accent bar.

Docs: WEB.md documents code structure and style rules.
Not touched: the large Biz*/Webcrt/Topology page components (to be split later).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 03:17:51 +08:00

207 lines
7.1 KiB
TypeScript

const portTraffic = {
title: "Port traffic",
create: "Monitor device",
backList: "Back to list",
created: "Device monitoring added",
createFailed: "Create failed",
updated: "Saved",
interfacesSaved: "Interfaces updated",
started: "Started",
paused: "Paused",
stopped: "Stopped",
statusRunning: "Running",
statusPaused: "Paused",
statusStopped: "Stopped",
statusDraft: "Draft",
collecting: "Collecting",
deleted: "Deleted",
confirmDelete: "Delete this device monitoring and its samples?",
empty: "No devices monitored yet. Pick a NE and interfaces to start.",
keywordPh: "Name / IP / note / ID",
allStatus: "All statuses",
exportDevicesName: "port-traffic-devices",
exportEventsName: "port-traffic-events",
wall: "Ops wall",
wallTitle: "Port traffic wall",
toDevices: "Manage devices",
wallEmpty: "No monitored devices yet. Add a device and pick interfaces first.",
fullscreen: "Fullscreen",
exitFullscreen: "Exit fullscreen",
board: "Board",
boardPick: "Select board",
boardPickHint: "Select or create a traffic wall board.",
boardEmpty: "No boards yet. Create one for cutover or duty monitoring.",
boardDefaultName: "Untitled board",
boardName: "Name",
boardCols: "Columns",
boardCreate: "New board",
boardEdit: "Edit layout",
boardSave: "Save",
boardCancel: "Cancel",
boardSaved: "Board saved",
boardCreated: "Board created",
boardDeleted: "Board deleted",
boardConfirmDelete: "Delete this board and its panels?",
boardUnsavedLeave: "You have unsaved changes. Leave anyway?",
boardOpenTab: "Open in new tab",
boardOpen: "Open wall",
boardListHint: "Open a board in its own browser tab; launching Network from the workbench will not refresh open walls.",
boardPanelCount: "Panels",
boardUpdated: "Updated",
boardClosedHint: "You can close this tab, or reopen from Network → Traffic wall list.",
boardAddPanel: "Add panel",
boardNoPanels: "No panels yet. Edit the board and add interfaces.",
boardPickDevice: "Select device",
boardPanelSettings: "Panel settings",
boardPanelTitle: "Title (optional)",
boardColSpan: "Column span",
boardPanelStale: "Interface missing or inactive. Please reselect.",
boardRetarget: "Reselect port",
edit: "Edit",
save: "Save",
start: "Start",
pause: "Pause",
stop: "Stop",
delete: "Delete",
wizStep1: "Device",
wizStep2: "Interfaces",
wizStep3: "Params",
step1: "Params",
step2: "NEs",
step3: "Interfaces",
step4: "Confirm",
prev: "Back",
next: "Next",
fieldTitle: "Task name",
titlePh: "e.g. Uplink group",
titleRequired: "Task name is required",
portsRequired: "Select at least one interface",
interval: "Interval (sec)",
retention: "Retention (days)",
retentionHintWizard: "Use ≥8 days for week-over-week compare",
concurrency: "Concurrency",
note: "Note",
notePh: "Optional",
startNow: "Start after create",
neKeywordPh: "Name / IP / vendor",
deepLinkHint: "Opened from topology: NE {{ne}}{{ifname}}. Confirm selection, then continue.",
deepLinkIfname: ", interface {{ifname}}",
selectedNe: "{{count}} NE(s) selected",
selectedOneNe: "Selected",
selectedPorts: "{{count}} interface(s) selected",
pickNeFirst: "Select one NE first",
discover: "Discover interfaces",
discoverDetail: "Discover detail",
discoverCommand: "Command",
discoverRaw: "Raw log",
discoverOk: "Discover succeeded",
discoverFail: "Discover failed",
confirmCreate: "Start monitoring",
wallTask: "Task",
wallPort: "Interface",
wallDevice: "Device",
wallDeviceLabel: "Device",
pickPort: "Select interface",
range: "Range",
compare: "Compare",
compareOff: "Off",
compareDay: "Yesterday (same TOD)",
compareWeek: "Last week (same weekday)",
compareShift: "Previous window",
compareCustom: "Custom offset",
offsetHours: "Offset (hours)",
aheadHours: "Extend past now (hours)",
aheadHoursHint:
"Push the chart end past now. With period compare enabled, the overlay can show trend after the current clock; 0 ends at now.",
mapBaselineHint:
"Mapped baseline can be combined with period compare; turn on Yesterday yourself when you need that contrast.",
baseline: "Baseline",
baselineAt: "Baseline time",
baselineDevice: "Baseline device",
baselinePort: "Baseline interface",
seriesCurrentIn: "Current In",
seriesCurrentOut: "Current Out",
seriesBaselineIn: "Baseline In",
seriesBaselineOut: "Baseline Out",
mapBaselinePort: "Mapped baseline interface",
mapBaselineTask: "Mapped baseline task",
mapBaselineNone: "None",
retentionHint: "Week compare needs retention_days ≥ 8 or the baseline may be empty.",
collectNow: "Collect now",
collectStarted: "Collect triggered",
collectBusy: "Collect already running",
targetError: "Last interface error",
waitSamples: "Samples appear after the device runs; or click Collect now. Chart auto-refreshes.",
waitAfterError: "Collect failed — open Logs under Traffic monitoring for details, then Collect now.",
log: "Logs",
logTitle: "Collect logs",
logEmpty: "No log entries yet.",
logDevice: "Device",
logLevel: "Level",
logTime: "Time",
logMessage: "Message",
logClose: "Close",
logHasError: "Has error",
rebind: "Rebind NE",
rebindTitle: "Rebind network element",
rebindOk: "Rebound to selected NE; collect can resume",
rebindFailed: "Rebind failed",
rebindHint:
"Pick the correct NE and confirm. IPs may not be unique, and a matching IP does not mean the same device. History is kept.",
rebindCurrent: "Current binding",
rebindEmpty: "No NEs found — add the device back under inventory first.",
rebindSameIp: "Same IP",
rebindSameIpHint: "IP matches current monitor — still verify name and ID",
rebindSubmit: "Confirm rebind",
rebindConfirm: "Bind monitoring to {{ne}}? History samples are kept.",
err: {
managedNeNotFound:
"Managed NE not found (often deleted then re-created with a new id). Use Rebind NE and pick manually.",
targetErrors: "{{count}} interface(s) failed",
unsupportedVendor: "Unsupported vendor / device type",
invalidSource: "Invalid NE source",
rebindPickFirst: "Select an NE first",
rebindNeMissing: "Selected NE not found — refresh and try again",
rebindSourceMismatch: "NE source does not match this monitor device",
alreadyMonitored: "That NE is already monitored by another device entry",
},
kpiLatest: "latest",
kpiBw: "Bandwidth",
latestAt: "Latest sample",
hoverPoint: "Cursor",
wallLiveTitle: "Live traffic",
filterView: "View",
filterMap: "Mapped baseline",
yMode: "Y axis",
yModeAuto: "Auto (incl. baseline)",
yModeCurrent: "Fit current",
yModeUtil: "Utilization %",
kpi: {
tasks: "Tasks",
devices: "Devices",
running: "Running",
ports: "Interfaces",
samples24h: "Samples 24h",
},
col: {
title: "Task",
device: "Device",
status: "Status",
ports: "Interfaces",
interval: "Interval",
last: "Last collect",
actions: "Actions",
source: "Source",
name: "Device",
vendor: "Vendor",
ifname: "Interface",
bw: "BW",
upDown: "Admin / Phy / Prot",
admin: "Admin",
phy: "Phy",
prot: "Prot",
description: "Description",
},
};
export default portTraffic;