diff --git a/nezha-fronted/src/components/common/header.vue b/nezha-fronted/src/components/common/header.vue index 7891e0b86..f33a5ab4f 100644 --- a/nezha-fronted/src/components/common/header.vue +++ b/nezha-fronted/src/components/common/header.vue @@ -127,7 +127,7 @@
-
{{$t('overall.changePwd')}}
+
{{$t('overall.changePin')}}
{{$t('overall.signOut')}}
@@ -154,7 +154,7 @@ - + @@ -162,11 +162,11 @@ import bus from '../../libs/bus' import dcBox from './rightBox/dcBox' // dc弹框 import { mapActions } from 'vuex' -import changePwd from '../page/config/changePwd' +import changePin from '../page/config/changePin' export default { name: 'Header', components: { - 'change-password': changePwd, + 'change-password': changePin, 'dc-box': dcBox }, data () { @@ -283,7 +283,7 @@ export default { permission: 'header_add_rule' } ], - showChangePwd: false + showChangePin: false } }, methods: { @@ -338,10 +338,10 @@ export default { community: 'public', username: '', security_level: 'noAuthNoPriv', // noAuthNoPriv/authNoPriv/authPriv - password: '', + pinrd: '', auth_protocol: 'MD5', // MD5/SHA priv_protocol: 'DES', // DES/AES - priv_password: '', + priv_pin: '', context_name: '' } } else if (item.type == 3) { @@ -483,11 +483,11 @@ export default { window.location.reload() }) }, - showPwdDialog () { - this.showChangePwd = true + showPinDialog () { + this.showChangePin = true }, dialogClosed () { - this.showChangePwd = false + this.showChangePin = false }, cancel () { this.jumpTo(this.$route.path.slice(1, this.$route.path.length)) diff --git a/nezha-fronted/src/components/common/language/cn.js b/nezha-fronted/src/components/common/language/cn.js index 59c8860d7..fb8c1aa39 100644 --- a/nezha-fronted/src/components/common/language/cn.js +++ b/nezha-fronted/src/components/common/language/cn.js @@ -59,7 +59,7 @@ const cn = { active: '活跃', type: '类别', detail: '详细信息', - changePwd: '修改密码', + changePin: '修改密码', createCabinet: '创建机柜', createModel: '创建型号', createModule: '创建模块', @@ -145,8 +145,8 @@ const cn = { finish: '完成', invalidDb: '数据库配置可能存在一些错误', invalidRedis: 'Redis的配置可能有一些错误', - invalidpin: 'Redis的密码可能错误', - requirepin: 'Redis可能需要密码', + invalidPin: 'Redis的密码可能错误', + requirePin: 'Redis可能需要密码', wait: '配置已保存,请耐心等待生效', reloadTimeout: '重新启动服务器花了太多时间,安装可能有一些问题', hadConfig: '已经有人开始配置系统', @@ -538,8 +538,8 @@ const cn = { userTip: '用户名提示', pinTip: '密码提示', reloginpinTip: 'RELOGIN提示', - userPwdIntroduce: '请指定用户名和密码提示以便TELNET登录过程可自动运行', - reLoginPwdIntroduce: '请指定密码提示以便RELOGIN登录过程可自动运行', + userPinIntroduce: '请指定用户名和密码提示以便TELNET登录过程可自动运行', + reLoginPinIntroduce: '请指定密码提示以便RELOGIN登录过程可自动运行', username: '用户名', port: '端口', upload: '上传', @@ -616,15 +616,15 @@ const cn = { editUser: '编辑用户', notCurrentlySupport: '暂不支持', pin: '密码', - oldPwd: '旧密码', - inputOldPwd: '请输入旧密码', - newPwd: '新密码', - inputNewPwd: '请输入新密码', - confirmPwd: '确认密码', - inputConfirmPwd: '请再次输入密码', - invalidPwd: '无效的密码,最少6个字符', - confirmPwdErr: '两次密码输入不一致', - reinputPwd: '请再次输入密码', + oldPin: '旧密码', + inputOldPin: '请输入旧密码', + newPin: '新密码', + inputNewPin: '请输入新密码', + confirmPin: '确认密码', + inputConfirmPin: '请再次输入密码', + invalidPin: '无效的密码,最少6个字符', + confirmPinErr: '两次密码输入不一致', + reinputPin: '请再次输入密码', notification: '通知', mobile: '电话' }, @@ -866,14 +866,14 @@ const cn = { smtpHost: 'SMTP主机', smtpPort: 'SMTP端口', smtpAccount: 'SMTP账号', - smtpPwd: 'SMTP密码', + smtpPin: 'SMTP密码', sendAccount: '发送账号', timeout: '超时时间', testAccount: '测试账号', useSSL: 'SSL', useTLS: 'TLS', testConnection: '测试连接', - pwdTip: '提示:一些邮件提供商需要输入的是Token', + pinTip: '提示:一些邮件提供商需要输入的是Token', sendAccountTip: '提示:发送邮件账号,默认使用SMTP账号作为发送账号', testAccountTip: '提示:仅用来作为测试邮件收件人', sslTip: '如果SMTP端口是465,通常需要启用SSL', @@ -892,7 +892,7 @@ const cn = { ldap: 'LDAP', address: 'LDAP地址', dn: 'Bind DN', - pwd: '密码', + pin: '密码', ou: '用户OU', ouTip: '使用符号 "|" 分隔OU', filter: '用户过滤器', @@ -932,11 +932,11 @@ const cn = { reset: { reset: '重置', type: '类型', - pwd: '密码', + pin: '密码', metric: '指标', alert: '告警', sysConfig: '系统设置', - pwdTip: '请输入密码', + pinTip: '请输入密码', promptTitle: '确认密码', yes: '是', no: '否' diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js index 8cc4427ca..f1cebe19d 100644 --- a/nezha-fronted/src/components/common/language/en.js +++ b/nezha-fronted/src/components/common/language/en.js @@ -51,7 +51,7 @@ const en = { back: 'Back', // 返回 unavailable: 'Unavailable', available: 'Available', - changePwd: 'Change password', // 修改密码 + changePin: 'Change password', // 修改密码 createChart: 'Create chart', createProject: 'Create project', createEndpoint: 'Create endpoint', @@ -153,8 +153,8 @@ const en = { finish: 'Finish', invalidDb: 'There may be some errors in the configuration of the database', invalidRedis: 'There may be some errors in the configuration of the Redis', - invalidpin: "Redis's password may be wrong", - requirepin: 'The password may be required by the Redis', + invalidPin: "Redis's password may be wrong", + requirePin: 'The password may be required by the Redis', wait: 'The configuration has been saved, please wait patiently for it to take effect', reloadTimeout: 'It took too much time to restart the server, there may be some problems when you install', hadConfig: 'Someone has started to configure the system', @@ -542,9 +542,9 @@ const en = { telnetProtocol: 'Telnet', userTip: 'User tip', // 用户名提示 pinTip: 'Password tip', // 密码提示 - reloginpinTip: 'Relogin tip', // 密码提示 - userPwdIntroduce: 'Please specify a user name and password so that the telenet login process can automatically log in', - reLoginPwdIntroduce: 'Please specify the password prompt so that the login process can run automatically', + reloginPinTip: 'Relogin tip', // 密码提示 + userPinIntroduce: 'Please specify a user name and password so that the telenet login process can automatically log in', + reLoginPinIntroduce: 'Please specify the password prompt so that the login process can run automatically', username: 'Username', // '用户名' port: 'Port', // '端口' upload: 'Upload', // '上传' @@ -625,15 +625,15 @@ const en = { editUser: 'Edit user', // "编辑用户" notCurrentlySupport: 'Not available', // '暂不支持' pin: 'Password', // '密码' - oldPwd: 'Old password', - inputOldPwd: 'Please input old password', - newPwd: 'New password', - inputNewPwd: 'Please input new password', - confirmPwd: 'Confirm password', - inputConfirmPwd: 'Please input confirm password', - invalidPwd: 'invalide password,the length at least 6', - confirmPwdErr: 'The two passwords are inconsistent', - reinputPwd: 'Enter password again', + oldPin: 'Old password', + inputOldPin: 'Please input old password', + newPin: 'New password', + inputNewPin: 'Please input new password', + confirmPin: 'Confirm password', + inputConfirmPin: 'Please input confirm password', + invalidPin: 'invalide password,the length at least 6', + confirmPinErr: 'The two passwords are inconsistent', + reinputPin: 'Enter password again', notification: 'Notification', mobile: 'Mobile' }, @@ -883,14 +883,14 @@ const en = { smtpHost: 'SMTP host', smtpPort: 'SMTP port', smtpAccount: 'SMTP account', - smtpPwd: 'SMTP password', + smtpPin: 'SMTP password', sendAccount: 'Send account', timeout: 'Timeout', testAccount: 'Test account', useSSL: 'SSL', useTLS: 'TLS', testConnection: 'Test connection', - pwdTip: 'Tip:Some email providers need to enter token', + pinTip: 'Tip:Some email providers need to enter token', sendAccountTip: 'Tip:The SMTP account is used as the sending account by default', testAccountTip: 'Tip:Used only as test mail recipient', sslTip: 'If the SMTP port is 465, you usually need to enable SSL', @@ -909,7 +909,7 @@ const en = { ldap: 'LDAP', address: 'LDAP address', dn: 'Bind DN', - pwd: 'Password', + pin: 'Password', ou: 'User OU', ouTip: 'Use the "|" symbol to separate OU', filter: 'User filter', @@ -952,11 +952,11 @@ const en = { reset: { reset: 'Reset', type: 'Type', - pwd: 'Password', + pin: 'Password', metric: 'Metric', alert: 'Alert', sysConfig: 'System config', - pwdTip: 'Please input your password', + pinTip: 'Please input your password', promptTitle: 'Confirm', yes: 'Yes', no: 'No' diff --git a/nezha-fronted/src/components/common/login.vue b/nezha-fronted/src/components/common/login.vue index 5d735ffc1..17c5ad550 100644 --- a/nezha-fronted/src/components/common/login.vue +++ b/nezha-fronted/src/components/common/login.vue @@ -85,6 +85,7 @@ export default { // 登录成功,记录用户名、token和lang sessionStorage.setItem('nz-username', this.loginData.username) localStorage.setItem('nz-username', this.loginData.username) + localStorage.setItem('nz-prometheus-federation-enabled', res.data.prometheusFederationEnabled) localStorage.setItem('nz-language', this.lang) this.$i18n.locale = this.lang this.loginSuccess(res) diff --git a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue index 791104166..d3e9d5c74 100644 --- a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue @@ -265,7 +265,7 @@ export default { labelModule: [], basic_auth: { username: '', - password: '' + pin: '' }, bearer_token: '' }, diff --git a/nezha-fronted/src/components/common/rightBox/administration/userBox.vue b/nezha-fronted/src/components/common/rightBox/administration/userBox.vue index cda66c7b5..fe5a570de 100644 --- a/nezha-fronted/src/components/common/rightBox/administration/userBox.vue +++ b/nezha-fronted/src/components/common/rightBox/administration/userBox.vue @@ -22,11 +22,11 @@ + show-word-limit size="small" type="password" @blur="pinBlur"> - - - + + @@ -90,11 +90,11 @@ export default { }, data () { const vm = this - const validatePassword = (rule, value, callback) => { // 确认密码的二次校验 + const validatePin = (rule, value, callback) => { // 确认密码的二次校验 if (value === '' && this.editUser.pin) { - callback(new Error(this.$t('config.user.inputConfirmPwd'))) + callback(new Error(this.$t('config.user.inputConfirmPin'))) } else if (value !== this.editUser.pin) { - callback(new Error(this.$t('config.user.confirmPwdErr'))) + callback(new Error(this.$t('config.user.confirmPinErr'))) } else { callback() } @@ -114,7 +114,7 @@ export default { { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], pinChange: [ - { validator: validatePassword, trigger: 'blur' }, + { validator: validatePin, trigger: 'blur' }, { required: true, message: '', trigger: 'blur' } ], roleIds: [ @@ -129,7 +129,7 @@ export default { { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], pinChange: [ - { validator: validatePassword, trigger: 'blur' } + { validator: validatePin, trigger: 'blur' } ], roleIds: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } @@ -166,9 +166,9 @@ export default { this.$emit('close', refresh) }, /* 密码失去焦点 检验确认密码 */ - passwordBlur () { + pinBlur () { if (this.editUser.pin && this.editUser.pinChange) { - this.$refs.accountForm.validateField('passwordChange') + this.$refs.accountForm.validateField('pinChange') } }, getRoles () { diff --git a/nezha-fronted/src/components/common/rightBox/agentBox.vue b/nezha-fronted/src/components/common/rightBox/agentBox.vue index 67b7f0ef9..5b9d08361 100644 --- a/nezha-fronted/src/components/common/rightBox/agentBox.vue +++ b/nezha-fronted/src/components/common/rightBox/agentBox.vue @@ -86,6 +86,7 @@ export default { data () { return { agent2: agent2, + agentPrometheusEnabled: localStorage.getItem('nz-prometheus-federation-enabled'), rules: { 'dc.name': [ { required: true, message: this.$t('validate.required'), trigger: 'change' } diff --git a/nezha-fronted/src/components/common/rightBox/assetBox.vue b/nezha-fronted/src/components/common/rightBox/assetBox.vue index 7e10d3ce1..9696a9f79 100644 --- a/nezha-fronted/src/components/common/rightBox/assetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/assetBox.vue @@ -395,10 +395,10 @@ export default { port: 22, params: { user: '', - method: 'password', - password: '', + method: 'pin', + pin: '', key: '', - keyPassword: '' + keyPin: '' } }) } else if (type == 'TELNET') { @@ -407,9 +407,9 @@ export default { port: 23, params: { user: '', - password: '', + pin: '', userTip: '', - passwordTip: '', + pinTip: '', reloginTip: '' } }) @@ -422,8 +422,8 @@ export default { community: 'public', securityName: '', securityLevel: '', - password: '', - privPassword: '', + pin: '', + privPin: '', authProtocol: '', privProtocol: '', contextName: '' diff --git a/nezha-fronted/src/components/common/rightBox/batchEditAsset.vue b/nezha-fronted/src/components/common/rightBox/batchEditAsset.vue index 09047fe45..105f5519a 100644 --- a/nezha-fronted/src/components/common/rightBox/batchEditAsset.vue +++ b/nezha-fronted/src/components/common/rightBox/batchEditAsset.vue @@ -544,10 +544,10 @@ export default { port: 22, params: { user: '', - method: 'password', - password: '', + method: 'pin', + pin: '', key: '', - passwordKey: '' + pinKey: '' } }) } else if (type == 'TELNET') { @@ -556,9 +556,9 @@ export default { port: 23, params: { user: '', - password: '', + pin: '', userTip: '', - passwordTip: '', + pinTip: '', reloginTip: '' } }) @@ -571,8 +571,8 @@ export default { community: 'public', securityName: '', securityLevel: '', - password: '', - privPassword: '', + pin: '', + privPin: '', authProtocol: '', privProtocol: '', contextName: '' diff --git a/nezha-fronted/src/components/common/rightBox/batchModifyEndpoint.vue b/nezha-fronted/src/components/common/rightBox/batchModifyEndpoint.vue index 7c2aa58f6..55bf823c4 100644 --- a/nezha-fronted/src/components/common/rightBox/batchModifyEndpoint.vue +++ b/nezha-fronted/src/components/common/rightBox/batchModifyEndpoint.vue @@ -178,7 +178,7 @@ export default { labelModule: [], basic_auth: { username: '', - password: '' + pin: '' }, bearer_token: '' }, diff --git a/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue b/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue index 3405503f5..465c57692 100644 --- a/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue +++ b/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue @@ -117,7 +117,7 @@ - +
@@ -226,7 +226,7 @@ - + @@ -454,7 +454,7 @@ export default { params.configs = JSON.stringify(params.configs) if (this.authType === 2 && !this.editEndpoint.configs.bearer_token) { this.$message.error("'token' is required") - } else if (this.authType === 1 && !(this.editEndpoint.configs.basic_auth.username && this.editEndpoint.configs.basic_auth.password)) { + } else if (this.authType === 1 && !(this.editEndpoint.configs.basic_auth.username && this.editEndpoint.configs.basic_auth.pin)) { this.$message.error("'username' and 'password' is required") } else { this.authType = 0 @@ -608,7 +608,7 @@ export default { this.editEndpoint.configs.bearer_token = '' this.editEndpoint.configs.basic_auth = { username: '', - password: '' + pin: '' } }, copyValue () { @@ -717,7 +717,7 @@ export default { if (params.basic_auth && !params.basic_auth.username) { delete params.basic_auth } - if (params.basic_auth && !params.basic_auth.password) { + if (params.basic_auth && !params.basic_auth.pin) { delete params.basic_auth } if (params.param && !Object.keys(params.param).length) { diff --git a/nezha-fronted/src/components/common/rightBox/moduleBox.vue b/nezha-fronted/src/components/common/rightBox/moduleBox.vue index c3d10a74e..049535ef2 100644 --- a/nezha-fronted/src/components/common/rightBox/moduleBox.vue +++ b/nezha-fronted/src/components/common/rightBox/moduleBox.vue @@ -109,7 +109,7 @@ - +
@@ -292,10 +292,10 @@ export default { username: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], - password: [ + pin: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], - priv_password: [ + priv_pin: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], max_repetitions: [ @@ -448,7 +448,7 @@ export default { params.configs = JSON.stringify(params.configs) if (this.authType === 2 && !this.editModule.configs.bearer_token) { this.$message.error("'token' is required") - } else if (this.authType === 1 && !(this.editModule.configs.basic_auth.username && this.editModule.configs.basic_auth.password)) { + } else if (this.authType === 1 && !(this.editModule.configs.basic_auth.username && this.editModule.configs.basic_auth.pin)) { this.$message.error("'username' and 'password' is required") } else { this.authType = 0 @@ -588,7 +588,7 @@ export default { this.editModule.configs.bearer_token = '' this.editModule.configs.basic_auth = { username: '', - password: '' + pin: '' } }, copyValue () { @@ -696,7 +696,7 @@ export default { if (params.basic_auth && !params.basic_auth.username) { delete params.basic_auth } - if (params.basic_auth && !params.basic_auth.password) { + if (params.basic_auth && !params.basic_auth.pin) { delete params.basic_auth } if (params.param && !Object.keys(params.param).length) { diff --git a/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingBox.vue b/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingBox.vue index 9e63fc8a5..d33ce182b 100644 --- a/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingBox.vue +++ b/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingBox.vue @@ -61,7 +61,7 @@ export default { securityLevel: '', authProtocol: '', privProtocol: '', - privPassword: '' + privPin: '' }, configs: [ { @@ -92,7 +92,7 @@ export default { securityLevel: '', authProtocol: '', privProtocol: '', - privPassword: '' + privPin: '' }, configs: [ { @@ -117,7 +117,7 @@ export default { securityLevel: '', authProtocol: '', privProtocol: '', - privPassword: '' + privPin: '' }, configs: [ { @@ -240,7 +240,7 @@ export default { securityLevel: '', authProtocol: '', privProtocol: '', - privPassword: '' + privPin: '' } } configs.forEach(item => { @@ -269,7 +269,7 @@ export default { securityLevel: '', authProtocol: '', privProtocol: '', - privPassword: '' + privPin: '' }, configs: [ { diff --git a/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingTab.vue b/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingTab.vue index f120f3439..83314b802 100644 --- a/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingTab.vue +++ b/nezha-fronted/src/components/common/rightBox/trafficSetting/trafficSettingTab.vue @@ -71,7 +71,7 @@
{{$t('login.pin')}}
- + @@ -101,10 +101,10 @@ -
{{$t('project.module.privPassword')}}
+
{{$t('project.module.privPin')}}
- +
diff --git a/nezha-fronted/src/components/common/rightBox/userBox.vue b/nezha-fronted/src/components/common/rightBox/userBox.vue index b63e4ee23..289a5b5e3 100644 --- a/nezha-fronted/src/components/common/rightBox/userBox.vue +++ b/nezha-fronted/src/components/common/rightBox/userBox.vue @@ -26,11 +26,11 @@ + show-word-limit size="small" type="password" @blur="pinBlur"> - - - + + @@ -109,11 +109,11 @@ export default { } }, data () { - const validatePassword = (rule, value, callback) => { // 确认密码的二次校验 + const validatepin = (rule, value, callback) => { // 确认密码的二次校验 if (value === '' && this.editUser.pin) { - callback(new Error(this.$t('config.account.inputConfirmPwd'))) + callback(new Error(this.$t('config.account.inputConfirmPin'))) } else if (value !== this.editUser.pin) { - callback(new Error(this.$t('config.account.confirmPwdErr'))) + callback(new Error(this.$t('config.account.confirmPinErr'))) } else { callback() } @@ -128,7 +128,7 @@ export default { { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], pinChange: [ - { validator: validatePassword, trigger: 'blur' }, + { validator: validatepin, trigger: 'blur' }, { required: true, message: '', trigger: 'blur' } ], roleIds: [ @@ -143,7 +143,7 @@ export default { { required: true, message: this.$t('validate.required'), trigger: 'blur' } ], pinChange: [ - { validator: validatePassword, trigger: 'blur' } + { validator: validatepin, trigger: 'blur' } ], roleIds: [ { required: true, message: this.$t('validate.required'), trigger: 'blur' } @@ -228,9 +228,9 @@ export default { }) }, /* 密码失去焦点 检验确认密码 */ - passwordBlur () { + pinBlur () { if (this.editUser.pin && this.editUser.pinChange) { - this.$refs.accountForm.validateField('passwordChange') + this.$refs.accountForm.validateField('pinChange') } }, getScripts () { diff --git a/nezha-fronted/src/components/common/table/settings/terminalLogTable.vue b/nezha-fronted/src/components/common/table/settings/terminalLogTable.vue index 858b2a7f9..da5de2fb2 100644 --- a/nezha-fronted/src/components/common/table/settings/terminalLogTable.vue +++ b/nezha-fronted/src/components/common/table/settings/terminalLogTable.vue @@ -53,7 +53,7 @@ {{scope.row[item.prop]}} diff --git a/nezha-fronted/src/components/layout/header.vue b/nezha-fronted/src/components/layout/header.vue index 04d254184..7cf111205 100644 --- a/nezha-fronted/src/components/layout/header.vue +++ b/nezha-fronted/src/components/layout/header.vue @@ -49,7 +49,7 @@ -
{{$t('overall.changePwd')}}
+
{{$t('overall.changePin')}}
{{$t('overall.signOut')}}
@@ -75,7 +75,7 @@ - +
@@ -83,11 +83,11 @@ import bus from '../../libs/bus' import dcBox from '../common/rightBox/dcBox' // dc弹框 import { mapActions } from 'vuex' -import changePwd from '../page/config/changePwd' +import changePin from '../page/config/changePin' export default { name: 'Header', components: { - 'change-password': changePwd, + 'change-password': changePin, 'dc-box': dcBox }, data () { @@ -203,7 +203,7 @@ export default { permission: 'header_add_rule' } ], - showChangePwd: false + showChangePin: false } }, methods: { @@ -258,10 +258,10 @@ export default { community: 'public', username: '', security_level: 'noAuthNoPriv', // noAuthNoPriv/authNoPriv/authPriv - password: '', + pin: '', auth_protocol: 'MD5', // MD5/SHA priv_protocol: 'DES', // DES/AES - priv_password: '', + priv_pin: '', context_name: '' } } else if (item.type == 3) { @@ -403,11 +403,11 @@ export default { window.location.reload() }) }, - showPwdDialog () { - this.showChangePwd = true + showPinDialog () { + this.showChangePin = true }, dialogClosed () { - this.showChangePwd = false + this.showChangePin = false }, cancel () { this.jumpTo(this.$route.path.slice(1, this.$route.path.length)) diff --git a/nezha-fronted/src/components/page/asset/accountConfig.vue b/nezha-fronted/src/components/page/asset/accountConfig.vue index 24ed820e4..2af5d7de7 100644 --- a/nezha-fronted/src/components/page/asset/accountConfig.vue +++ b/nezha-fronted/src/components/page/asset/accountConfig.vue @@ -11,13 +11,13 @@ - + - + @@ -31,12 +31,12 @@ - + - + - + @@ -71,8 +71,8 @@ - - + + @@ -86,8 +86,8 @@ - - + + @@ -123,24 +123,24 @@ export default { user: '', authType: 1, protocol: 'SSH', - pwd: '', + pin: '', port: null, privateKey: null, userTip: '', - passwordTip: '', - reloginPasswordTip: '' + pinTip: '', + reloginPinTip: '' } }, isShowTelnetOption () { this.showTelnetOption = !this.showTelnetOption if (!this.showTelnetOption) { this.account.userTip = '' - this.account.passwordTip = '' - this.account.reloginPasswordTip = '' + this.account.pinTip = '' + this.account.reloginPinTip = '' } }, telnetOptionState () { - if (this.account.userTip != '' || this.account.passwordTip != '' || this.account.reloginPasswordTip != '') { + if (this.account.userTip != '' || this.account.pinTip != '' || this.account.reloginPinTip != '') { this.showTelnetOption = true } }, @@ -155,8 +155,8 @@ export default { }, clearTelnetOptions () { this.account.userTip = '' - this.account.passwordTip = '' - this.account.reloginPasswordTip = '' + this.account.pinTip = '' + this.account.reloginPinTip = '' }, handleChange (file, fileList) { if (fileList.length > 0) { @@ -182,7 +182,7 @@ export default { this.clearPrivateKey() } if (n.authType == 2) { // 公钥登录 - this.account.pwd = '' + this.account.pin = '' } if (n.protocol == 'SSH') { this.showTelnetOption = false diff --git a/nezha-fronted/src/components/page/config/changePwd.vue b/nezha-fronted/src/components/page/config/changePin.vue similarity index 63% rename from nezha-fronted/src/components/page/config/changePwd.vue rename to nezha-fronted/src/components/page/config/changePin.vue index ed661ebe7..ea8530fb6 100644 --- a/nezha-fronted/src/components/page/config/changePwd.vue +++ b/nezha-fronted/src/components/page/config/changePin.vue @@ -1,28 +1,28 @@