From 07064c1f3e54261f351ebd53890bcfdef485109d Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Mon, 1 Mar 2021 16:10:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20system-ldap=E5=A2=9E=E5=8A=A0=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/language/cn.js | 5 +++- .../src/components/common/language/en.js | 5 +++- .../src/components/page/config/system.vue | 28 +++++++++++++++++-- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/nezha-fronted/src/components/common/language/cn.js b/nezha-fronted/src/components/common/language/cn.js index d65d0c93f..b995d9a83 100644 --- a/nezha-fronted/src/components/common/language/cn.js +++ b/nezha-fronted/src/components/common/language/cn.js @@ -809,8 +809,11 @@ const cn = { dn: "Bind DN", pwd: "密码", ou: "用户OU", + ouTip: '使用符号 "|" 分隔OU', filter: "用户过滤器", - map: "LDAP属性映射", + filterTip: '可能的选项是(cn或uid或sAMAccountName=%(user)s)', + map: "属性映射", + mapTip: '属性映射代表怎样将NEZHA用户属性映射到jumpserver用户上;username,email是jumpserver的属性', active: "启用LDAP认证" }, link: { diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js index 37fe22f5f..58f0f3766 100644 --- a/nezha-fronted/src/components/common/language/en.js +++ b/nezha-fronted/src/components/common/language/en.js @@ -812,8 +812,11 @@ const en = { dn:'Bind DN', pwd:'Password', ou:'User OU', + ouTip: 'Use the "|" symbol to separate OU', filter:'User filter', - map:'LDAP field mapping', + filterTip: 'The possible options are: (cn or uid or sAMAccountName=%(user)s)', + map:'Attribute mapping', + mapTip: 'Attribute mapping represents how to map NEZHA user attributes to jumpserver users; username,email are the attributes of jumpserver', active:'LDAP authentication' }, link: { diff --git a/nezha-fronted/src/components/page/config/system.vue b/nezha-fronted/src/components/page/config/system.vue index e13f5c7e5..a449b8968 100644 --- a/nezha-fronted/src/components/page/config/system.vue +++ b/nezha-fronted/src/components/page/config/system.vue @@ -130,14 +130,18 @@ - + +
{{$t("config.system.ldap.ouTip")}}
- + +
{{$t("config.system.ldap.filterTip")}}
- + + +
{{$t("config.system.ldap.mapTip")}}
@@ -1118,5 +1122,23 @@ .linkBox .el-form--inline{ padding: 0; } + .el-form-item__tip { + color: #aaa !important; + position: absolute; + font-size: 12px; + line-height: 12px; + } + .el-form-item__tip + .el-form-item__error { + margin-top: 16px; + } + .el-form-item__tip.el-form-item__tip--two-row + .el-form-item__error { + margin-top: 28px; + } + .el-form-item.has-tip { + margin-bottom: 34px; + } + .el-form-item.has-tip--two-row { + margin-bottom: 46px; + }