mirror of
https://github.com/hansjone/netx.git
synced 2026-10-15 18:23:18 +08:00
Improve managed NE filters/validation and simplify the workbench UI.
Add column filters and clearer API error mapping for NE management, tighten port validation, and slim the workbench into reusable modules with cleaner styles. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3c9e0efd2b
commit
312f6f2f96
25 changed files with 1484 additions and 2016 deletions
|
|
@ -18,6 +18,10 @@ const managedNe = {
|
|||
batchDeleteDone: "Deleted {{n}} network element(s)",
|
||||
batchDeleteSelectRequired: "Select network elements to delete",
|
||||
keywordPh: "name / IP / user / tags",
|
||||
emptyFiltered: "No NEs match the current filters. Adjust or clear them.",
|
||||
selectedCount: "{{n}} selected",
|
||||
clearSelection: "Clear selection",
|
||||
loadFailed: "Failed to load NEs: {{error}}",
|
||||
allVendors: "All vendors",
|
||||
allConnectStatus: "All connect status",
|
||||
stats: {
|
||||
|
|
@ -38,6 +42,9 @@ const managedNe = {
|
|||
proxyDone: "Proxy applied to {{n}} NE(s)",
|
||||
testDone: "Connect-test submitted for {{n}} NE(s)",
|
||||
loadingIds: "Loading…",
|
||||
noMatchingNe: "No NEs in the selected scope",
|
||||
scopeCount: "Applies to {{n}} NEs",
|
||||
cardFilterHint: "Click a card to filter the list below by tag",
|
||||
},
|
||||
col: {
|
||||
name: "Name",
|
||||
|
|
@ -106,6 +113,7 @@ const managedNe = {
|
|||
"[Bulk import]\n" +
|
||||
"· Required: device_type, ip, username, port, protocol, name, vendor (download template first)\n" +
|
||||
"· password may be empty for bastion-managed / later Batch add proxy; required for direct login\n" +
|
||||
"· Existing IPs are updated; a blank password keeps the saved one\n" +
|
||||
"· Flow: import → select rows → Batch add proxy\n\n" +
|
||||
"[Jump / bastion]\n" +
|
||||
"· Username template: {hop_user}@{target_user}@{target_ip} (bastion host filled separately)\n" +
|
||||
|
|
@ -115,6 +123,11 @@ const managedNe = {
|
|||
"· Storing passwords needs NETX_CREDENTIAL_SECRET_KEY\n" +
|
||||
"· Blank password on edit keeps current; use Details hop context after failed connect (no secrets)",
|
||||
importResult: {
|
||||
title: "Import result",
|
||||
failedTitle: "Failed rows ({{n}})",
|
||||
row: "Row",
|
||||
reason: "Reason",
|
||||
close: "Close",
|
||||
done: "Import done: {{inserted}} inserted, {{updated}} updated, {{failed}} failed row(s)",
|
||||
},
|
||||
form: {
|
||||
|
|
@ -130,6 +143,10 @@ const managedNe = {
|
|||
deleted: "Network element deleted",
|
||||
passwordRequired: "Password is required",
|
||||
passwordOptional: "leave blank to keep unchanged",
|
||||
ipRequired: "Management address is required",
|
||||
ipInvalid: "Invalid management address (expect an IPv4 / IPv6 address or hostname)",
|
||||
usernameRequired: "Username is required",
|
||||
portInvalid: "Port must be an integer from 1 to 65535",
|
||||
},
|
||||
hop: {
|
||||
sectionTitle: "Jump host / proxy",
|
||||
|
|
@ -196,6 +213,28 @@ const managedNe = {
|
|||
selectRequired: "Select network elements first",
|
||||
applying: "Applying…",
|
||||
apply: "Apply to selected",
|
||||
batchPasswordHint: "Leave the hop password blank to keep each NE's saved hop password; NEs that never had one are rejected.",
|
||||
},
|
||||
errors: {
|
||||
ip_address_exists: "This management address already exists",
|
||||
ip_address_required: "Management address is required",
|
||||
ip_required: "Management address is missing",
|
||||
invalid_ip_address: "Invalid management address (expect an IPv4 / IPv6 address or hostname)",
|
||||
invalid_port: "Port must be an integer from 1 to 65535",
|
||||
unsupported_device_type: "Unsupported device type",
|
||||
username_required: "Username is missing",
|
||||
password_required: "Manual mode requires the target NE password",
|
||||
hop_host_required: "Hop address is required",
|
||||
hop_username_required: "Hop username is required",
|
||||
hop_password_required: "Hop password is required (these NEs have none saved: {{detail}})",
|
||||
username_or_password_required: "Enter a username or a password",
|
||||
managed_ne_not_found: "NE not found or already deleted: {{detail}}",
|
||||
ids_required: "Select NEs first",
|
||||
credential_secret_key_not_configured: "Credential encryption key is not configured; passwords cannot be saved",
|
||||
import_missing_columns: "Import file is missing columns: {{detail}}",
|
||||
import_parse_failed: "Could not parse the import file: {{detail}}",
|
||||
empty_file: "Import file is empty",
|
||||
invalid_filter_field: "Unsupported filter column",
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,39 @@
|
|||
const workbench = {
|
||||
title: "Workbench",
|
||||
modules: "Modules",
|
||||
consoleTitle: "Operations console",
|
||||
consoleWelcome: "Welcome back, {{name}}. Monitor your network and get to work.",
|
||||
overview: "Operations overview",
|
||||
managedDevices: "Managed devices",
|
||||
connectedDevices: "{{count}} connected",
|
||||
topologyLinks: "{{count}} topology links",
|
||||
runningSchedulers: "Running schedulers",
|
||||
enabledSchedulers: "enabled",
|
||||
schedulerAuto: "Automatic collection and sync",
|
||||
moduleHint: "Choose a module to open its workspace tab",
|
||||
searchModules: "Search modules…",
|
||||
clearSearch: "Clear search",
|
||||
noModules: "No matching modules",
|
||||
fleetHint: "Connectivity, regions, and collection schedules",
|
||||
autoRefresh: "Auto refresh",
|
||||
refresh: "Refresh",
|
||||
awaitingData: "Waiting for an update",
|
||||
loadFailed: "Unable to load data",
|
||||
loadingTasks: "Loading tasks…",
|
||||
retry: "Retry",
|
||||
retryHint: "Try refreshing again shortly",
|
||||
taskRailEmptyHint: "Collection and sync tasks will appear here.",
|
||||
descriptions: {
|
||||
ume: "Sync devices and alarms",
|
||||
ne: "Inventory and connectivity tests",
|
||||
network: "Monitoring, collection, and cutover",
|
||||
topology: "Discover and edit network topology",
|
||||
webcrt: "Remote terminals and diagnostics",
|
||||
users: "Accounts and permissions",
|
||||
audit: "Task progress and activity logs",
|
||||
"api-keys": "Manage API access keys",
|
||||
sessions: "Review active login sessions",
|
||||
},
|
||||
sections: "Sections",
|
||||
moduleCount: "{{count}} modules",
|
||||
backToWorkbench: "Back to Workbench",
|
||||
|
|
@ -17,15 +50,15 @@ const workbench = {
|
|||
uptime: "API uptime",
|
||||
health: "System health",
|
||||
tasks: "Active tasks",
|
||||
healthOk: "OK",
|
||||
healthWarn: "CHECK",
|
||||
healthUnknown: "N/A",
|
||||
healthOk: "System healthy",
|
||||
healthWarn: "Needs attention",
|
||||
healthUnknown: "Status unknown",
|
||||
},
|
||||
statusTitle: "Runtime status",
|
||||
hostHealth: "HOST",
|
||||
hostHealth: "Host resources",
|
||||
platformCapacity: "Platform capacity",
|
||||
channels: "CHANNELS",
|
||||
fleet: "FLEET",
|
||||
channels: "Platform capacity",
|
||||
fleet: "Network & schedulers",
|
||||
fleetNe: "NE",
|
||||
fleetNeUnit: "units",
|
||||
fleetNeKnown: "Known",
|
||||
|
|
@ -36,7 +69,7 @@ const workbench = {
|
|||
fleetNeNoTag: "No tag",
|
||||
fleetNeTags: "Top tags",
|
||||
fleetTopo: "Topology",
|
||||
fleetTopoNodes: "nodes",
|
||||
fleetTopoNodes: "Nodes",
|
||||
fleetTopoEdges: "edges",
|
||||
fleetTopoOther: "Other regions",
|
||||
fleetTopoUnassigned: "Unassigned",
|
||||
|
|
@ -59,10 +92,10 @@ const workbench = {
|
|||
sidePanel: "Console side panel",
|
||||
consoleId: "OPS CONSOLE",
|
||||
refreshedAt: "Updated {{time}}",
|
||||
taskRail: "ACTIVE TASKS",
|
||||
taskRailAll: "ALL",
|
||||
taskRailEmpty: "No active tasks",
|
||||
taskTotal: "POOL {{count}}",
|
||||
taskRail: "Task activity",
|
||||
taskRailAll: "View all",
|
||||
taskRailEmpty: "No tasks running",
|
||||
taskTotal: "{{count}} tasks in total",
|
||||
announceTitle: "Announcements",
|
||||
recentTitle: "Recent operations",
|
||||
recentMore: "View all",
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ const managedNe = {
|
|||
batchDeleteDone: "已删除 {{n}} 台网元",
|
||||
batchDeleteSelectRequired: "请先勾选要删除的网元",
|
||||
keywordPh: "名称 / IP / 用户名 / 标签",
|
||||
emptyFiltered: "没有符合当前筛选条件的网元,请调整或清除筛选条件。",
|
||||
selectedCount: "已选 {{n}} 台",
|
||||
clearSelection: "清除选择",
|
||||
loadFailed: "网元列表加载失败:{{error}}",
|
||||
allVendors: "全部厂商",
|
||||
allConnectStatus: "全部连通状态",
|
||||
stats: {
|
||||
|
|
@ -37,6 +41,9 @@ const managedNe = {
|
|||
proxyDone: "已为 {{n}} 台网元提交代理配置",
|
||||
testDone: "已提交 {{n}} 台网元连通性测试",
|
||||
loadingIds: "加载中…",
|
||||
noMatchingNe: "所选范围内没有网元",
|
||||
scopeCount: "将作用于 {{n}} 台网元",
|
||||
cardFilterHint: "点击卡片可按标签筛选下方列表",
|
||||
},
|
||||
col: {
|
||||
name: "名称",
|
||||
|
|
@ -104,6 +111,7 @@ const managedNe = {
|
|||
"【批量导入】\n" +
|
||||
"· 必填列:device_type、ip、username、port、protocol、name、vendor(可先下载模板)\n" +
|
||||
"· password 可留空:直连需填;堡垒机托管或后续「批量添加代理」时可空\n" +
|
||||
"· 已存在的 IP 按更新处理;password 留空时保留已保存的密码\n" +
|
||||
"· 推荐:导入网元 → 勾选 →「批量添加代理」统一配置跳板\n\n" +
|
||||
"【跳板 / 堡垒机】\n" +
|
||||
"· 用户名模板:{hop_user}@{target_user}@{target_ip}(堡垒机地址另填跳板地址)\n" +
|
||||
|
|
@ -113,6 +121,11 @@ const managedNe = {
|
|||
"· 保存密码需配置 NETX_CREDENTIAL_SECRET_KEY\n" +
|
||||
"· 编辑时密码留空表示不改;失败请看「详情」中的 hop 上下文(不含密码)",
|
||||
importResult: {
|
||||
title: "导入结果",
|
||||
failedTitle: "失败明细(共 {{n}} 行)",
|
||||
row: "行号",
|
||||
reason: "原因",
|
||||
close: "关闭",
|
||||
done: "导入完成:新增 {{inserted}},更新 {{updated}},失败 {{failed}} 行",
|
||||
},
|
||||
form: {
|
||||
|
|
@ -128,6 +141,10 @@ const managedNe = {
|
|||
deleted: "网元已删除",
|
||||
passwordRequired: "请填写密码",
|
||||
passwordOptional: "留空则不修改",
|
||||
ipRequired: "请填写管理地址",
|
||||
ipInvalid: "管理地址格式不正确(应为 IPv4 / IPv6 地址或主机名)",
|
||||
usernameRequired: "请填写用户名",
|
||||
portInvalid: "端口须为 1–65535 的整数",
|
||||
},
|
||||
hop: {
|
||||
sectionTitle: "跳板 / 代理",
|
||||
|
|
@ -194,6 +211,28 @@ const managedNe = {
|
|||
selectRequired: "请先勾选要配置的网元",
|
||||
applying: "应用中…",
|
||||
apply: "应用到选中网元",
|
||||
batchPasswordHint: "跳板密码留空时沿用各网元已保存的跳板密码;从未保存过跳板密码的网元会被拒绝。",
|
||||
},
|
||||
errors: {
|
||||
ip_address_exists: "该管理地址已存在于网元管理中",
|
||||
ip_address_required: "请填写管理地址",
|
||||
ip_required: "缺少管理地址",
|
||||
invalid_ip_address: "管理地址格式不正确(应为 IPv4 / IPv6 地址或主机名)",
|
||||
invalid_port: "端口须为 1–65535 的整数",
|
||||
unsupported_device_type: "不支持的设备类型",
|
||||
username_required: "缺少用户名",
|
||||
password_required: "手动模式需填写目标网元密码",
|
||||
hop_host_required: "请填写跳板地址",
|
||||
hop_username_required: "请填写跳板用户名",
|
||||
hop_password_required: "跳板密码必填(以下网元未保存跳板密码:{{detail}})",
|
||||
username_or_password_required: "用户名和密码至少填写一项",
|
||||
managed_ne_not_found: "网元不存在或已被删除:{{detail}}",
|
||||
ids_required: "请先选择网元",
|
||||
credential_secret_key_not_configured: "未配置凭据加密密钥,无法保存密码",
|
||||
import_missing_columns: "导入文件缺少列:{{detail}}",
|
||||
import_parse_failed: "导入文件解析失败:{{detail}}",
|
||||
empty_file: "导入文件为空",
|
||||
invalid_filter_field: "不支持的筛选列",
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,39 @@
|
|||
const workbench = {
|
||||
title: "工作台",
|
||||
modules: "可用模块",
|
||||
modules: "功能入口",
|
||||
consoleTitle: "运维控制台",
|
||||
consoleWelcome: "欢迎回来,{{name}}。掌握网络状态,快速开始运维工作。",
|
||||
overview: "运行概览",
|
||||
managedDevices: "托管网元",
|
||||
connectedDevices: "{{count}} 台已连通",
|
||||
topologyLinks: "{{count}} 条拓扑连线",
|
||||
runningSchedulers: "运行中调度",
|
||||
enabledSchedulers: "启用",
|
||||
schedulerAuto: "自动采集与同步",
|
||||
moduleHint: "选择模块,打开独立工作页签",
|
||||
searchModules: "搜索功能…",
|
||||
clearSearch: "清除搜索",
|
||||
noModules: "未找到匹配的功能",
|
||||
fleetHint: "网元连通性、区域分布与采集调度",
|
||||
autoRefresh: "自动更新",
|
||||
refresh: "刷新",
|
||||
awaitingData: "等待数据更新",
|
||||
loadFailed: "数据加载失败",
|
||||
loadingTasks: "正在加载任务…",
|
||||
retry: "重试",
|
||||
retryHint: "请稍后刷新重试",
|
||||
taskRailEmptyHint: "采集、同步等任务将在这里显示。",
|
||||
descriptions: {
|
||||
ume: "同步网元与告警数据",
|
||||
ne: "设备纳管与连通性测试",
|
||||
network: "监控、采集与业务割接",
|
||||
topology: "发现连接与编辑网络拓扑",
|
||||
webcrt: "远程终端与设备调试",
|
||||
users: "账户与访问权限",
|
||||
audit: "任务进度与操作记录",
|
||||
"api-keys": "管理 API 访问密钥",
|
||||
sessions: "查看登录与会话状态",
|
||||
},
|
||||
sections: "功能分区",
|
||||
moduleCount: "{{count}} 个模块",
|
||||
backToWorkbench: "返回工作台",
|
||||
|
|
@ -17,15 +50,15 @@ const workbench = {
|
|||
uptime: "API 运行时长",
|
||||
health: "系统健康",
|
||||
tasks: "进行中任务",
|
||||
healthOk: "OK",
|
||||
healthWarn: "CHECK",
|
||||
healthUnknown: "N/A",
|
||||
healthOk: "运行正常",
|
||||
healthWarn: "需要关注",
|
||||
healthUnknown: "状态未知",
|
||||
},
|
||||
statusTitle: "运行状态",
|
||||
hostHealth: "HOST",
|
||||
hostHealth: "主机资源",
|
||||
platformCapacity: "平台容量",
|
||||
channels: "CHANNELS",
|
||||
fleet: "FLEET",
|
||||
channels: "平台容量",
|
||||
fleet: "网络与调度",
|
||||
fleetNe: "网元",
|
||||
fleetNeUnit: "台",
|
||||
fleetNeKnown: "已知",
|
||||
|
|
@ -36,8 +69,8 @@ const workbench = {
|
|||
fleetNeNoTag: "无标签",
|
||||
fleetNeTags: "热门标签",
|
||||
fleetTopo: "拓扑",
|
||||
fleetTopoNodes: "节点",
|
||||
fleetTopoEdges: "边",
|
||||
fleetTopoNodes: "拓扑节点",
|
||||
fleetTopoEdges: "连线",
|
||||
fleetTopoOther: "其他区域",
|
||||
fleetTopoUnassigned: "未分区",
|
||||
fleetTopoNoRegion: "暂无区域",
|
||||
|
|
@ -53,16 +86,16 @@ const workbench = {
|
|||
fleetSchedOff: "OFF",
|
||||
fleetSchedMode: "模式",
|
||||
fleetSchedHeartbeat: "心跳",
|
||||
fleetSchedFresh: "新鲜",
|
||||
fleetSchedFresh: "心跳正常",
|
||||
fleetSchedStale: "过期",
|
||||
|
||||
sidePanel: "控制台侧栏",
|
||||
consoleId: "OPS CONSOLE",
|
||||
refreshedAt: "更新于 {{time}}",
|
||||
taskRail: "ACTIVE TASKS",
|
||||
taskRailAll: "ALL",
|
||||
taskRailEmpty: "No active tasks",
|
||||
taskTotal: "POOL {{count}}",
|
||||
taskRail: "任务动态",
|
||||
taskRailAll: "查看全部",
|
||||
taskRailEmpty: "当前没有运行中的任务",
|
||||
taskTotal: "共 {{count}} 个任务",
|
||||
announceTitle: "系统公告",
|
||||
recentTitle: "最近操作",
|
||||
recentMore: "查看全部",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue