From 76bfda8627a0cff9d4bd8597b18e31689ad64359 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 23 Oct 2026 16:17:43 +0800 Subject: [PATCH] docs+feat: record backlog tip and move custom protocols to More Document delivered IA and backlog four items; put custom plugins under the wizard More group per design. --- backend/internal/api/logapi.go | 3 +++ docs/BACKLOG.md | 14 ++++++++++++++ frontend/src/locales/en-US.json | 3 ++- frontend/src/locales/zh-CN.json | 3 ++- frontend/src/views/Logs.vue | 2 +- frontend/src/views/Sessions.vue | 11 ++++++++--- frontend/src/views/TunnelWizard.vue | 5 +++-- frontend/src/views/Tunnels.vue | 19 +++++++++++++++++-- 8 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 docs/BACKLOG.md diff --git a/backend/internal/api/logapi.go b/backend/internal/api/logapi.go index d2798f1..7167c39 100644 --- a/backend/internal/api/logapi.go +++ b/backend/internal/api/logapi.go @@ -182,6 +182,9 @@ func (s *Server) exportConnectionLogs(c *gin.Context) { q = q.Where("tunnel_id = ?", tid) } } + if v := c.Query("keyword"); v != "" { + q = q.Where("(detail LIKE ? OR ip_address LIKE ?)", "%"+v+"%", "%"+v+"%") + } if v := c.Query("start"); v != "" { if t, err := time.Parse("2006-01-02", v); err == nil { q = q.Where("created_at >= ?", t) diff --git a/docs/BACKLOG.md b/docs/BACKLOG.md new file mode 100644 index 0000000..695de41 --- /dev/null +++ b/docs/BACKLOG.md @@ -0,0 +1,14 @@ +# BACKLOG + +## 已收 + +- **控制台 IA**(tip `f01d3dc`):对接与扩展分组(IPSec → 飞书/OIDC → Plugins → Nodes);Logs 去掉连接审计入口;Sessions `?tab=` 深链;资源侧仅拨号/设备/管理员。 +- **本轮四项**(tip `9984e21`): + 1. Logs 保留策略去掉 connection 条数统计。 + 2. 总览三卡深链:异常专线 → `/tunnels?filter=unhealthy`;在线会话 → `/sessions?tab=online`;待处理告警 → `/logs?tab=alert`。 + 3. Sessions 连接审计:`/connection-logs` 分页/筛选 + CSV 导出。 + 4. 创建专线向导:协议按场景分组(员工接入 / 站点对接 / 穿透)。 + +## 明确不做 / 另立 + +- **客户端系统直连 VPN**(本批与近期均不做)。 diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json index c013a91..b87b414 100644 --- a/frontend/src/locales/en-US.json +++ b/frontend/src/locales/en-US.json @@ -365,7 +365,8 @@ "installFailed": "Failed to install {protocol}", "groupEmployee": "Employee access", "groupSite": "Site interconnect", - "groupPenetrate": "Intranet penetration" + "groupPenetrate": "Intranet penetration", + "groupMore": "More" }, "users": { "title": "Admins", diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json index e58fef3..438ebb4 100644 --- a/frontend/src/locales/zh-CN.json +++ b/frontend/src/locales/zh-CN.json @@ -365,7 +365,8 @@ "installFailed": "{protocol} 安装失败", "groupEmployee": "员工接入", "groupSite": "站点对接", - "groupPenetrate": "内网穿透" + "groupPenetrate": "内网穿透", + "groupMore": "更多" }, "users": { "title": "管理员", diff --git a/frontend/src/views/Logs.vue b/frontend/src/views/Logs.vue index bf5b3e7..4374242 100644 --- a/frontend/src/views/Logs.vue +++ b/frontend/src/views/Logs.vue @@ -123,7 +123,7 @@ watch(() => route.query.tab, (name) => { router.replace({ path: '/sessions', query: { tab: 'audit' } }) return } - const next = TAB_NAMES.includes(name) ? name : 'audit' + const next = normalizeLogTab(name) if (activeTab.value !== next) activeTab.value = next }, { immediate: true }) diff --git a/frontend/src/views/Sessions.vue b/frontend/src/views/Sessions.vue index bcdb222..634f7eb 100644 --- a/frontend/src/views/Sessions.vue +++ b/frontend/src/views/Sessions.vue @@ -67,6 +67,7 @@
+ @@ -146,7 +147,7 @@ const auditExporting = ref(false) const auditPage = ref(1) const auditPageSize = ref(20) const auditTotal = ref(0) -const auditFilters = reactive({ username: '', event: [] }) +const auditFilters = reactive({ username: '', keyword: '', event: [] }) const auditDateRange = ref(null) watch(() => route.query.tab, (name) => { @@ -209,7 +210,8 @@ async function loadAudit() { const params = { page: auditPage.value, page_size: auditPageSize.value, - username: auditFilters.username, + username: auditFilters.username || undefined, + keyword: auditFilters.keyword || undefined, } if (auditFilters.event?.length) params.event = auditFilters.event.join(',') if (auditDateRange.value) { @@ -227,7 +229,10 @@ async function loadAudit() { async function exportAudit() { auditExporting.value = true - const params = { username: auditFilters.username } + const params = { + username: auditFilters.username || undefined, + keyword: auditFilters.keyword || undefined, + } if (auditFilters.event?.length) params.event = auditFilters.event.join(',') if (auditDateRange.value) { params.start = auditDateRange.value[0] diff --git a/frontend/src/views/TunnelWizard.vue b/frontend/src/views/TunnelWizard.vue index df4ce48..f66b165 100644 --- a/frontend/src/views/TunnelWizard.vue +++ b/frontend/src/views/TunnelWizard.vue @@ -9,7 +9,7 @@
-
+
{{ $t(group.titleKey) }}
-