From 262fd12a4005989f62d7fa1c875dc138e21f2335 Mon Sep 17 00:00:00 2001 From: wangzhengkun Date: Wed, 15 Jun 2022 18:27:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0LDAP=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/api/v1/v1.go | 16 ++++++++++++++++ web/kubepi/src/i18n/lang/zh-CN.js | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/internal/api/v1/v1.go b/internal/api/v1/v1.go index 3a743efc5..6affe9ec4 100644 --- a/internal/api/v1/v1.go +++ b/internal/api/v1/v1.go @@ -141,6 +141,22 @@ func logHandler() iris.Handler { log.Operator = profile.Name log.Operation = method + //handle ldap operate + if strings.Contains(path,"ldap") { + if strings.Contains(path,"import") { + log.Operation = "import" + } + if strings.Contains(path,"sync") { + log.Operation = "sync" + } + if strings.Contains(path,"connect") { + log.Operation = "testConnect" + } + if strings.Contains(path,"login") { + log.Operation = "testLogin" + } + } + pathResource := strings.Split(path, "/") if strings.HasPrefix(currentPath, "clusters/:name") { if len(pathResource) < 3 { diff --git a/web/kubepi/src/i18n/lang/zh-CN.js b/web/kubepi/src/i18n/lang/zh-CN.js index a67f6536f..69580c885 100644 --- a/web/kubepi/src/i18n/lang/zh-CN.js +++ b/web/kubepi/src/i18n/lang/zh-CN.js @@ -269,6 +269,10 @@ const system_logs = { clusters_repos: "集群仓库", imagerepos: "镜像仓库", ldap: "LDAP", + sync: "同步", + import: "导入", + testConnect: "测试", + testLogin: "测试", }