mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 02:00:46 +08:00
Drop workbench card blurbs and let API key secrets dismiss after copy.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
52cd4d1298
commit
99d180c501
4 changed files with 6 additions and 33 deletions
|
|
@ -20,7 +20,6 @@ export type ModuleDefinition = {
|
|||
path: string;
|
||||
section: WorkbenchSection;
|
||||
labelKey: string;
|
||||
descKey?: string;
|
||||
iconTone: ModuleIconTone;
|
||||
iconKind: ModuleIconKind;
|
||||
titleKey: string;
|
||||
|
|
@ -37,7 +36,6 @@ export const MODULES: readonly ModuleDefinition[] = [
|
|||
path: "/ume",
|
||||
section: "monitoring",
|
||||
labelKey: "workbench.cards.umeSync",
|
||||
descKey: "workbench.cards.umeSyncDesc",
|
||||
iconTone: "blue",
|
||||
iconKind: "sync",
|
||||
titleKey: "layout.titleUme",
|
||||
|
|
@ -48,7 +46,6 @@ export const MODULES: readonly ModuleDefinition[] = [
|
|||
path: "/ne",
|
||||
section: "operations",
|
||||
labelKey: "workbench.cards.managedNe",
|
||||
descKey: "workbench.cards.managedNeDesc",
|
||||
iconTone: "green",
|
||||
iconKind: "server",
|
||||
titleKey: "layout.titleManagedNe",
|
||||
|
|
@ -59,7 +56,6 @@ export const MODULES: readonly ModuleDefinition[] = [
|
|||
path: "/network",
|
||||
section: "operations",
|
||||
labelKey: "workbench.cards.network",
|
||||
descKey: "workbench.cards.networkDesc",
|
||||
iconTone: "slate",
|
||||
iconKind: "network",
|
||||
titleKey: "layout.titleNetwork",
|
||||
|
|
@ -70,7 +66,6 @@ export const MODULES: readonly ModuleDefinition[] = [
|
|||
path: "/topology",
|
||||
section: "operations",
|
||||
labelKey: "workbench.cards.topology",
|
||||
descKey: "workbench.cards.topologyDesc",
|
||||
iconTone: "amber",
|
||||
iconKind: "topology",
|
||||
titleKey: "layout.titleTopology",
|
||||
|
|
@ -81,7 +76,6 @@ export const MODULES: readonly ModuleDefinition[] = [
|
|||
path: "/webcrt",
|
||||
section: "operations",
|
||||
labelKey: "workbench.cards.webcrt",
|
||||
descKey: "workbench.cards.webcrtDesc",
|
||||
iconTone: "slate",
|
||||
iconKind: "terminal",
|
||||
titleKey: "layout.titleWebcrt",
|
||||
|
|
@ -92,7 +86,6 @@ export const MODULES: readonly ModuleDefinition[] = [
|
|||
path: "/port-traffic/wall",
|
||||
section: "operations",
|
||||
labelKey: "workbench.cards.portTrafficWall",
|
||||
descKey: "workbench.cards.portTrafficWallDesc",
|
||||
iconTone: "amber",
|
||||
iconKind: "wall",
|
||||
titleKey: "layout.titlePortTrafficWall",
|
||||
|
|
@ -104,7 +97,6 @@ export const MODULES: readonly ModuleDefinition[] = [
|
|||
path: "/users",
|
||||
section: "system",
|
||||
labelKey: "workbench.cards.users",
|
||||
descKey: "workbench.cards.usersDesc",
|
||||
iconTone: "slate",
|
||||
iconKind: "users",
|
||||
titleKey: "layout.titleUsers",
|
||||
|
|
@ -115,7 +107,6 @@ export const MODULES: readonly ModuleDefinition[] = [
|
|||
path: "/audit",
|
||||
section: "system",
|
||||
labelKey: "workbench.cards.audit",
|
||||
descKey: "workbench.cards.auditDesc",
|
||||
iconTone: "amber",
|
||||
iconKind: "audit",
|
||||
titleKey: "layout.titleAudit",
|
||||
|
|
@ -125,7 +116,6 @@ export const MODULES: readonly ModuleDefinition[] = [
|
|||
path: "/api-keys",
|
||||
section: "system",
|
||||
labelKey: "workbench.cards.apiKeys",
|
||||
descKey: "workbench.cards.apiKeysDesc",
|
||||
iconTone: "green",
|
||||
iconKind: "key",
|
||||
titleKey: "layout.titleApiKeys",
|
||||
|
|
@ -135,7 +125,6 @@ export const MODULES: readonly ModuleDefinition[] = [
|
|||
path: "/sessions",
|
||||
section: "system",
|
||||
labelKey: "workbench.cards.sessions",
|
||||
descKey: "workbench.cards.sessionsDesc",
|
||||
iconTone: "slate",
|
||||
iconKind: "key",
|
||||
titleKey: "layout.titleSessions",
|
||||
|
|
|
|||
|
|
@ -79,27 +79,16 @@ const en = {
|
|||
},
|
||||
cards: {
|
||||
umeSync: "UME Sync",
|
||||
umeSyncDesc: "UME alarms, subscription & inventory",
|
||||
network: "Network Management",
|
||||
networkDesc: "NE inventory, alarms, config sync, and monitoring tasks",
|
||||
managedNe: "NE Management",
|
||||
managedNeDesc: "Multi-vendor SSH/Telnet NEs & connectivity test",
|
||||
collect: "Batch Collect",
|
||||
collectDesc: "Run custom CLI commands on connected NEs and save logs",
|
||||
webcrt: "WebCRT",
|
||||
webcrtDesc: "Interactive browser login to connected NEs (SSH/Telnet)",
|
||||
topology: "Topology",
|
||||
topologyDesc: "Fabric topology views; LLDP physical discovery; MCP paged graph query",
|
||||
portTrafficWall: "Traffic wall",
|
||||
portTrafficWallDesc: "Named traffic boards in dedicated tabs",
|
||||
users: "Users",
|
||||
usersDesc: "Admin: create, disable users and reset passwords",
|
||||
audit: "Audit",
|
||||
auditDesc: "Live task overview and operation logs",
|
||||
apiKeys: "API Keys",
|
||||
apiKeysDesc: "Issue MCP/script tokens per user with expiry",
|
||||
sessions: "Login sessions",
|
||||
sessionsDesc: "Review and revoke logins on other devices",
|
||||
},
|
||||
},
|
||||
network: {
|
||||
|
|
|
|||
|
|
@ -79,27 +79,16 @@ const zh = {
|
|||
},
|
||||
cards: {
|
||||
umeSync: "UME同步",
|
||||
umeSyncDesc: "UME 告警同步、订阅与清单",
|
||||
network: "网络管理",
|
||||
networkDesc: "网元清单、告警、配置同步与监控任务",
|
||||
managedNe: "网元管理",
|
||||
managedNeDesc: "多厂商 SSH/Telnet 网元与连通性测试",
|
||||
collect: "批量采集",
|
||||
collectDesc: "对已连通网元执行定制 CLI 命令并保存日志",
|
||||
webcrt: "WebCRT",
|
||||
webcrtDesc: "浏览器内交互登录已连通网元(SSH/Telnet)",
|
||||
topology: "拓扑管理",
|
||||
topologyDesc: "Fabric 拓扑视图;LLDP 发现物理链路,MCP 可分页拉图",
|
||||
portTrafficWall: "流量大屏",
|
||||
portTrafficWallDesc: "独立页签打开命名流量大屏",
|
||||
users: "用户管理",
|
||||
usersDesc: "管理员添加、禁用用户并重置密码",
|
||||
audit: "操作审计",
|
||||
auditDesc: "任务概览与操作日志",
|
||||
apiKeys: "API Key",
|
||||
apiKeysDesc: "为用户生成 MCP/脚本用 Token,可设有效期",
|
||||
sessions: "登录会话",
|
||||
sessionsDesc: "查看并踢掉其他设备上的登录",
|
||||
},
|
||||
},
|
||||
network: {
|
||||
|
|
|
|||
|
|
@ -164,10 +164,13 @@ export function ApiTokensPage() {
|
|||
createMut.mutate();
|
||||
};
|
||||
|
||||
const dismissCreatedPlain = () => setCreatedPlain("");
|
||||
|
||||
const copyToken = async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(createdPlain);
|
||||
showOk(t("auth.tokenCopied"));
|
||||
dismissCreatedPlain();
|
||||
} catch {
|
||||
showError(t("auth.tokenCopyFailed"));
|
||||
}
|
||||
|
|
@ -260,6 +263,9 @@ export function ApiTokensPage() {
|
|||
<button type="button" onClick={() => void copyToken()}>
|
||||
{t("auth.copyToken")}
|
||||
</button>
|
||||
<button type="button" onClick={dismissCreatedPlain}>
|
||||
{t("common.close")}
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue