diff --git a/nezha-fronted/src/components/common/language/cn.js b/nezha-fronted/src/components/common/language/cn.js index 87bbca5dc..27238804d 100644 --- a/nezha-fronted/src/components/common/language/cn.js +++ b/nezha-fronted/src/components/common/language/cn.js @@ -99,7 +99,8 @@ const cn = { stackBack: '返回原始图' }, SyncSave: '保存同时更新 Assets', - copySuccess: '复制成功' + copySuccess: '复制成功', + moreOption: '更多选项' }, setup: { step0: '欢迎', @@ -591,7 +592,7 @@ const cn = { dc: '数据中心', type: '主机地址', state: '主机状态', - endpoint: 'Endpoint', + endpoint: 'Endpoint' }, tagTableTitle: { projectName: '系统名称', @@ -903,10 +904,10 @@ const cn = { lng: '经度', zoom: '缩放', lnglat: '坐标', - sysLogo:'系统Logo', - scrapeTimeout:"Scrape timeout", - snmpTrapPort:"SNMP trap端口", - logoTip:'Logo支持格式为jpg、jpeg、png且大小小于2M的图片' + sysLogo: '系统Logo', + scrapeTimeout: 'Scrape timeout', + snmpTrapPort: 'SNMP trap端口', + logoTip: 'Logo支持格式为jpg、jpeg、png且大小小于2M的图片' }, email: { email: '邮件', @@ -916,7 +917,7 @@ const cn = { smtpAccount: 'SMTP账号', smtpPwd: 'SMTP密码', sendAccount: '发送账号', - timeout:"超时时间", + timeout: '超时时间', testAccount: '测试账号', useSSL: 'SSL', useTLS: 'TLS', @@ -931,10 +932,10 @@ const cn = { terminal: { terminal: '终端', terminalNum: '最大终端数量', - timeout:"超时时间", - userTip:"Telnet user prompt", - pinTip:"Ternet password prompt", - localRetention:"本地存储", + timeout: '超时时间', + userTip: 'Telnet user prompt', + pinTip: 'Ternet password prompt', + localRetention: '本地存储' }, ldap: { ldap: 'LDAP', @@ -948,7 +949,7 @@ const cn = { map: '属性映射', mapTip: '属性映射代表怎样将NEZHA用户属性映射到jumpserver用户上;username,email是jumpserver的属性', active: '启用LDAP认证', - timeout:"超时时间" + timeout: '超时时间' }, link: { link: 'Link', diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js index 35f092238..51d9ec26f 100644 --- a/nezha-fronted/src/components/common/language/en.js +++ b/nezha-fronted/src/components/common/language/en.js @@ -104,7 +104,8 @@ const en = { stackBack: 'Back to original chart' }, SyncSave: 'Save&Sync', - copySuccess: 'Copy success' + copySuccess: 'Copy success', + moreOption: 'More options' }, pageSize: '/page', setup: { @@ -642,7 +643,7 @@ const en = { dc: 'DataCenter', type: 'typeIds', state: 'state', - endpoint: 'Endpoint', + endpoint: 'Endpoint' }, tagTableTitle: { projectName: 'Project name', // '系统名称' @@ -908,10 +909,10 @@ const en = { lng: 'longitude', zoom: 'zoom', lnglat: 'coordinate', - sysLogo:'System logo', - scrapeTimeout:"Scrape timeout", - snmpTrapPort:"SNMP trap port", - logoTip:'Logo format only can be jpg、jpeg、png,and less than 2M' + sysLogo: 'System logo', + scrapeTimeout: 'Scrape timeout', + snmpTrapPort: 'SNMP trap port', + logoTip: 'Logo format only can be jpg、jpeg、png,and less than 2M' }, email: { email: 'Email', @@ -921,7 +922,7 @@ const en = { smtpAccount: 'SMTP account', smtpPwd: 'SMTP password', sendAccount: 'Send account', - timeout:"Timeout", + timeout: 'Timeout', testAccount: 'Test account', useSSL: 'SSL', useTLS: 'TLS', @@ -936,10 +937,10 @@ const en = { terminal: { terminal: 'Terminal', terminalNum: 'Max terminal number', - timeout:"Timeout", - userTip:"Telnet user prompt", - pinTip:"Ternet password prompt", - localRetention:"Local retention", + timeout: 'Timeout', + userTip: 'Telnet user prompt', + pinTip: 'Ternet password prompt', + localRetention: 'Local retention' }, ldap: { ldap: 'LDAP', @@ -953,7 +954,7 @@ const en = { map: 'Attribute mapping', mapTip: 'Attribute mapping represents how to map LDAP user attributes to NEZHA users; username,email are the attributes of NEZHA', active: 'LDAP authentication', - timeout:"Timeout" + timeout: 'Timeout' }, link: { link: 'Link', @@ -1003,7 +1004,7 @@ const en = { create: 'Creator', creatAt: 'Create at', expireAt: 'Expire at', - noExpire: 'No expiration date', + noExpire: 'No expiration date' } }, assetType: { diff --git a/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue b/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue index 41da6ca77..f7352db24 100644 --- a/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue +++ b/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue @@ -152,7 +152,12 @@ -
+
+ + {{$t('overall.moreOption')}} + + +
@@ -171,6 +176,7 @@ placeholder="value" size="mini" default-first-option popper-class="config-dropdown hide-element" + @change="(val)=>{paramObjchange(val,index)}" > @@ -630,6 +636,9 @@ export default { return '' + match + '' } ) + }, + paramObjchange (val, index) { + this.editModule.paramObj[index].value = val.filter(item => item.trim()) } }, mounted () { @@ -682,7 +691,7 @@ export default { deep: true, immediate: true, handler (n) { - console.log(n); + console.log(n) if (n && n.configs) { const params = Object.assign({}, n.configs) params.params = this.paramToJson(this.editEndpoint.paramObj) @@ -793,11 +802,11 @@ export default { /deep/ .el-tabs__content{ padding-left: 18px; } - .need-rotate.nz-icon-drop-down{ + .need-rotate.nz-icon-arrow-down{ display: inline-block; transition: transform .3s; } - .need-rotate.nz-icon-drop-down.is-active{ + .need-rotate.nz-icon-arrow-down.is-active{ transform: rotate( -180deg ); diff --git a/nezha-fronted/src/components/common/rightBox/moduleBox.vue b/nezha-fronted/src/components/common/rightBox/moduleBox.vue index d7517fde9..1804db3bc 100644 --- a/nezha-fronted/src/components/common/rightBox/moduleBox.vue +++ b/nezha-fronted/src/components/common/rightBox/moduleBox.vue @@ -144,7 +144,12 @@
-
+
+ + {{$t('overall.moreOption')}} + + +
@@ -163,6 +168,7 @@ placeholder="value" size="mini" default-first-option popper-class="config-dropdown hide-element" + @change="(val)=>{paramObjchange(val,index)}" > @@ -441,6 +447,7 @@ export default { } else { this.authType = 0 } + console.log(params) this.$refs.moduleForm.validate((valid) => { if (valid) { this.prevent_opt.save = true @@ -608,6 +615,9 @@ export default { return '' + match + '' } ) + }, + paramObjchange (val, index) { + this.editModule.paramObj[index].value = val.filter(item => item.trim()) } }, mounted () { @@ -770,11 +780,11 @@ export default { /deep/ .el-tabs__content{ padding-left: 18px; } - .need-rotate.nz-icon-drop-down{ + .need-rotate.nz-icon-arrow-down{ display: inline-block; transition: transform .3s; } - .need-rotate.nz-icon-drop-down.is-active{ + .need-rotate.nz-icon-arrow-down.is-active{ transform: rotate( -180deg );