feat:全局替换 key为password以及pwd的属性 换为 pin
This commit is contained in:
@@ -127,7 +127,7 @@
|
||||
<div style="height: 1px; width: 100%; background-color: #cccccc;"></div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="101-3">
|
||||
<div @click="showPwdDialog" id="header-to-changepwd">{{$t('overall.changePwd')}}</div>
|
||||
<div @click="showPinDialog" id="header-to-changepin">{{$t('overall.changePin')}}</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="101-4">
|
||||
<div @click="logout" id="header-to-logout">{{$t('overall.signOut')}}</div>
|
||||
@@ -154,7 +154,7 @@
|
||||
<transition name="right-box">
|
||||
<dc-box @close="closeDcBox" :dc="dc" :user-data="userData" @reload="getAssetData" v-if="rightBox.dc.show"></dc-box>
|
||||
</transition>
|
||||
<change-password :cur-user="username" :show-dialog="showChangePwd" @click="showPwdDialog" @dialogClosed="dialogClosed"></change-password>
|
||||
<change-password :cur-user="username" :show-dialog="showChangePin" @click="showPinDialog" @dialogClosed="dialogClosed"></change-password>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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: '否'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -265,7 +265,7 @@ export default {
|
||||
labelModule: [],
|
||||
basic_auth: {
|
||||
username: '',
|
||||
password: ''
|
||||
pin: ''
|
||||
},
|
||||
bearer_token: ''
|
||||
},
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
<!--password-->
|
||||
<el-form-item :label="$t('config.user.pin')" prop="pin">
|
||||
<el-input id="account-input-password" v-model="editUser.pin" maxlength="16" placeholder=""
|
||||
show-word-limit size="small" type="password" @blur="passwordBlur"></el-input>
|
||||
show-word-limit size="small" type="password" @blur="pinBlur"></el-input>
|
||||
</el-form-item>
|
||||
<!--passwordChange-->
|
||||
<el-form-item :label="$t('config.user.confirmPwd')" label-width="200px" prop="pinChange">
|
||||
<el-input id="account-input-passwordChange" v-model="editUser.pinChange" maxlength="16" placeholder=""
|
||||
<!--pinChange-->
|
||||
<el-form-item :label="$t('config.user.confirmPin')" label-width="200px" prop="pinChange">
|
||||
<el-input id="account-input-pinChange" v-model="editUser.pinChange" maxlength="16" placeholder=""
|
||||
show-word-limit size="small" type="password"></el-input>
|
||||
</el-form-item>
|
||||
<!--email-->
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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' }
|
||||
|
||||
@@ -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: ''
|
||||
|
||||
@@ -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: ''
|
||||
|
||||
@@ -178,7 +178,7 @@ export default {
|
||||
labelModule: [],
|
||||
basic_auth: {
|
||||
username: '',
|
||||
password: ''
|
||||
pin: ''
|
||||
},
|
||||
bearer_token: ''
|
||||
},
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
</el-form-item>
|
||||
<!--host-->
|
||||
<el-form-item :label='$t("project.endpoint.host")' prop="host">
|
||||
<el-input placeholder="" v-model.number="editEndpoint.configs.host" size="small" id="module-box-input-host"></el-input>
|
||||
<el-input placeholder="" v-model="editEndpoint.configs.host" size="small" id="module-box-input-host"></el-input>
|
||||
</el-form-item>
|
||||
<transition name="el-zoom-in-top">
|
||||
<div v-show="showAllBasicOption" >
|
||||
@@ -226,7 +226,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label='$t("project.endpoint.pin")' prop="authtype" v-if="authType === 1" class="half-form-item">
|
||||
<el-input placeholder='' v-model.number="editEndpoint.configs.basic_auth.password" size="small" id="module-box-input-password"></el-input>
|
||||
<el-input placeholder='' v-model.number="editEndpoint.configs.basic_auth.pin" size="small" id="module-box-input-password"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!--authtype 2-->
|
||||
@@ -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) {
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
</el-form-item>
|
||||
<!--host-->
|
||||
<el-form-item :label='$t("project.endpoint.host")' prop="host">
|
||||
<el-input placeholder="" v-model.number="editModule.configs.host" size="small" id="module-box-input-host"></el-input>
|
||||
<el-input placeholder="" v-model="editModule.configs.host" size="small" id="module-box-input-host"></el-input>
|
||||
</el-form-item>
|
||||
<transition name="el-zoom-in-top">
|
||||
<div v-show="showAllBasicOption" >
|
||||
@@ -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) {
|
||||
|
||||
@@ -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: [
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="mib-browser-ad-search-label">{{$t('login.pin')}}</div>
|
||||
</el-col>
|
||||
<el-col :span="17">
|
||||
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.password" id="traffic-setting-password"></el-input>
|
||||
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.pin" id="traffic-setting-password"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -101,10 +101,10 @@
|
||||
|
||||
<el-row class="mib-browser-ad-search-item" v-if="assetSetting.auth.securityLevel == 'authPriv'">
|
||||
<el-col :span="6">
|
||||
<div class="mib-browser-ad-search-label">{{$t('project.module.privPassword')}}</div>
|
||||
<div class="mib-browser-ad-search-label">{{$t('project.module.privPin')}}</div>
|
||||
</el-col>
|
||||
<el-col :span="17">
|
||||
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.privPassword" id="traffic-setting-privPassword"></el-input>
|
||||
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.privPin" id="traffic-setting-privPassword"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
<!--password-->
|
||||
<el-form-item :label="$t('config.account.pin')" prop="pin">
|
||||
<el-input id="account-input-password" v-model="editUser.pin" autocomplete="new-password" maxlength="16" placeholder=""
|
||||
show-word-limit size="small" type="password" @blur="passwordBlur"></el-input>
|
||||
show-word-limit size="small" type="password" @blur="pinBlur"></el-input>
|
||||
</el-form-item>
|
||||
<!--passwordChange-->
|
||||
<el-form-item :label="$t('config.account.confirmPwd')" label-width="200px" prop="passwordChange">
|
||||
<el-input id="account-input-passwordChange" v-model="editUser.pinChange" autocomplete="new-password" maxlength="16" placeholder=""
|
||||
<!--pinChange-->
|
||||
<el-form-item :label="$t('config.account.confirmPin')" label-width="200px" prop="pinChange">
|
||||
<el-input id="account-input-pinChange" v-model="editUser.pinChange" autocomplete="new-password" maxlength="16" placeholder=""
|
||||
show-word-limit size="small" type="password"></el-input>
|
||||
</el-form-item>
|
||||
<!--email-->
|
||||
@@ -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 () {
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'authType'">
|
||||
<span v-if="scope.row.authType == 1">{{$t('config.terminallog.password')}}</span>
|
||||
<span v-if="scope.row.authType == 1">{{$t('config.terminallog.pin')}}</span>
|
||||
<span v-else-if="scope.row.authType == 2">{{$t('config.terminallog.key')}}</span>
|
||||
</template>
|
||||
<span v-else>{{scope.row[item.prop]}}</span>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<div class='login-user header-menu--item'>{{username}} <i class="nz-icon nz-icon-arrow-down"></i></div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item>
|
||||
<div id="header-to-changepwd" @click="showPwdDialog">{{$t('overall.changePwd')}}</div>
|
||||
<div id="header-to-changepin" @click="showPinDialog">{{$t('overall.changePin')}}</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<div id="header-to-logout" @click="logout">{{$t('overall.signOut')}}</div>
|
||||
@@ -75,7 +75,7 @@
|
||||
<transition name="right-box">
|
||||
<dc-box v-if="rightBox.dc.show" :dc="dc" :user-data="userData" @close="closeDcBox" @reload="getAssetData"></dc-box>
|
||||
</transition>
|
||||
<change-password :cur-user="username" :show-dialog="showChangePwd" @click="showPwdDialog" @dialogClosed="dialogClosed"></change-password>
|
||||
<change-password :cur-user="username" :show-dialog="showChangePin" @click="showPinDialog" @dialogClosed="dialogClosed"></change-password>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.pin')" v-if="account.params.method == 'password'">
|
||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.password" id="ssh-account-password"/>
|
||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.pin" id="ssh-account-password"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.ssh')" v-if="account.params.method == 'key'" prop="file">
|
||||
<el-input rows="4" type="textarea" placeholder="" v-model="account.params.key" size="small" id="ssh-account-key"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.pin')" v-if="account.params.method == 'key'">
|
||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.keyPassword" id="ssh-account-keyPassword"/>
|
||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.keyPin" id="ssh-account-keyPin"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.port')" prop="port" style="display: inline-block">
|
||||
<el-input size="small" v-model.number="account.port" id="ssh-account-port"/>
|
||||
@@ -31,12 +31,12 @@
|
||||
<el-input autocomplete="new-password" size="small" v-model="account.params.userTip" id="telnet-account-userTip"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.pin')">
|
||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.password" id="telnet-account-password"/>
|
||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.pin" id="telnet-account-pin"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('asset.pinTip')">
|
||||
<el-input size="small" v-model="account.params.passwordTip" id="telnet-account-passwordTip"/>
|
||||
<el-input size="small" v-model="account.params.pinTip" id="telnet-account-pinTip"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.reloginpinTip')" prop="reloginTip">
|
||||
<el-form-item :label="$t('asset.reloginPinTip')" prop="reloginTip">
|
||||
<el-input size="small" v-model="account.params.reloginTip" id="telnet-account-reloginTip"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.port')" prop="port" style="display: inline-block">
|
||||
@@ -71,8 +71,8 @@
|
||||
<el-radio-button label="authPriv"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('login.pin')" prop="params.password" v-if="account.params.securityLevel == 'authNoPriv' || account.params.securityLevel == 'authPriv'">
|
||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.password" id="snmp-account-password"/>
|
||||
<el-form-item :label="$t('login.pin')" prop="params.pin" v-if="account.params.securityLevel == 'authNoPriv' || account.params.securityLevel == 'authPriv'">
|
||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.pin" id="snmp-account-password"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('project.module.authProtocol')" prop="params.authProtocol" v-if="account.params.securityLevel == 'authNoPriv' || account.params.securityLevel == 'authPriv'">
|
||||
<el-radio-group v-model="account.params.authProtocol" size="small" id="snmp-account-authProtocol">
|
||||
@@ -86,8 +86,8 @@
|
||||
<el-radio-button label="AES"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('project.module.privpin')" prop="params.privPassword" v-if="account.params.securityLevel == 'authPriv'">
|
||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.privPassword" id="snmp-account-privPassword"/>
|
||||
<el-form-item :label="$t('project.module.privPin')" prop="params.privPin" v-if="account.params.securityLevel == 'authPriv'">
|
||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.privPin" id="snmp-account-privPin"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</template>
|
||||
@@ -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
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog class="nz-dialog" :title="$t('overall.changePwd')" :visible.sync="visible" @open="dialogOpened" :modal-append-to-body='false' @closed="dialogClosed" width="600px" :show-close="false" >
|
||||
<el-form :model="user" label-position = "top" label-width="150px" :rules="rules" ref="changePwdForm" size="mini">
|
||||
<el-dialog class="nz-dialog" :title="$t('overall.changePin')" :visible.sync="visible" @open="dialogOpened" :modal-append-to-body='false' @closed="dialogClosed" width="600px" :show-close="false" >
|
||||
<el-form :model="user" label-position = "top" label-width="150px" :rules="rules" ref="changePinForm" size="mini">
|
||||
<el-form-item :label="$t('config.user.account')" prop="username" v-show="curUser != sysUser">
|
||||
<el-input type="text" autocomplete="false" v-model="user.username" disabled id="change-pwd-username"></el-input>
|
||||
<el-input type="text" autocomplete="false" v-model="user.username" disabled id="change-pin-username"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.user.oldPwd')" prop="pwd">
|
||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.pwd" maxlength="20" :placeholder="$t('config.user.inputOldPwd')" id="change-pwd-pwd"></el-input>
|
||||
<el-form-item :label="$t('config.user.oldPin')" prop="pin">
|
||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.pin" maxlength="20" :placeholder="$t('config.user.inputOldPin')" id="change-pin-pin"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.user.newPwd')" prop="newPwd">
|
||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.newPwd" maxlength="20" :placeholder="$t('config.user.inputNewPwd')" id="change-pwd-newPwd"></el-input>
|
||||
<el-form-item :label="$t('config.user.newPin')" prop="newPin">
|
||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.newPin" maxlength="20" :placeholder="$t('config.user.inputNewPin')" id="change-pin-newPin"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.user.confirmPwd')" prop="confirmPwd">
|
||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.confirmPwd" maxlength="20" :placeholder="$t('config.user.inputConfirmPwd')" id="change-pwd-confirmPwd"></el-input>
|
||||
<el-form-item :label="$t('config.user.confirmPin')" prop="confirmPin">
|
||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.confirmPin" maxlength="20" :placeholder="$t('config.user.inputConfirmPin')" id="change-pin-confirmPin"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!--底部按钮-->
|
||||
<template slot="footer">
|
||||
<div class="right-box-bottom-btns" >
|
||||
<button @click="close" id="change-pwd-esc"
|
||||
<button @click="close" id="change-pin-esc"
|
||||
class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
|
||||
<span>{{$t('overall.cancel')}}</span>
|
||||
</button>
|
||||
<button @click="changePwd" id="change-pwd-save"
|
||||
<button @click="changePin" id="change-pin-save"
|
||||
class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new">
|
||||
<span>{{$t('overall.save')}}</span>
|
||||
</button>
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'changePwd',
|
||||
name: 'changePin',
|
||||
props: {
|
||||
curUser: { type: String },
|
||||
showDialog: { type: Boolean, default: false }
|
||||
@@ -46,28 +46,28 @@ export default {
|
||||
if (value && value != '') {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error(temp.$t('config.user.invalidPwd')))
|
||||
callback(new Error(temp.$t('config.user.invalidPin')))
|
||||
}
|
||||
}
|
||||
const validateConfirmPass = (rule, value, callback) => {
|
||||
if (value && value != '' && value == temp.user.newPwd) {
|
||||
if (value && value != '' && value == temp.user.newPin) {
|
||||
callback()
|
||||
} else {
|
||||
callback(new Error(temp.$t('config.user.confirmPwdErr')))
|
||||
callback(new Error(temp.$t('config.user.confirmPinErr')))
|
||||
}
|
||||
}
|
||||
return {
|
||||
user: {
|
||||
username: '',
|
||||
pwd: '',
|
||||
newPwd: '',
|
||||
confirmPwd: ''
|
||||
pin: '',
|
||||
newPin: '',
|
||||
confirmPin: ''
|
||||
},
|
||||
sysUser: sessionStorage.getItem('nz-username'),
|
||||
rules: {
|
||||
pwd: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||
newPwd: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: validatePass, trigger: 'blur' }],
|
||||
confirmPwd: [{ required: true, message: this.$t('config.user.reinputPwd'), trigger: 'blur' }, { validator: validateConfirmPass, trigger: 'blur' }]
|
||||
pin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||
newPin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: validatePass, trigger: 'blur' }],
|
||||
confirmPin: [{ required: true, message: this.$t('config.user.reinputPin'), trigger: 'blur' }, { validator: validateConfirmPass, trigger: 'blur' }]
|
||||
},
|
||||
visible: false
|
||||
}
|
||||
@@ -77,8 +77,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
dialogOpened: function () {
|
||||
if (this.$refs.changePwdForm) {
|
||||
this.$refs.changePwdForm.resetFields()
|
||||
if (this.$refs.changePinForm) {
|
||||
this.$refs.changePinForm.resetFields()
|
||||
}
|
||||
},
|
||||
dialogClosed: function () {
|
||||
@@ -87,12 +87,12 @@ export default {
|
||||
close: function () {
|
||||
this.visible = false
|
||||
},
|
||||
changePwd: function () {
|
||||
this.$refs.changePwdForm.validate((valid) => {
|
||||
changePin: function () {
|
||||
this.$refs.changePinForm.validate((valid) => {
|
||||
if (valid) {
|
||||
const paramObj = {
|
||||
pin: this.user.pwd,
|
||||
newPin: this.user.newPwd
|
||||
pin: this.user.pin,
|
||||
newPin: this.user.newPin
|
||||
}
|
||||
this.$get('/sys/user/pin?oldPin=' + paramObj.pin + '&newPin=' + paramObj.newPin).then(response => {
|
||||
if (response && response.code == 200) {
|
||||
@@ -88,7 +88,7 @@
|
||||
<div class="mib-browser-ad-search-label">{{$t('login.pin')}}</div>
|
||||
</el-col>
|
||||
<el-col :span="17">
|
||||
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.password" id="mib-browser-password"></el-input>
|
||||
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.pin" id="mib-browser-pin"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -118,10 +118,10 @@
|
||||
|
||||
<el-row class="mib-browser-ad-search-item" v-if="searchParamPop.auth.securityLevel == 'authPriv'">
|
||||
<el-col :span="6">
|
||||
<div class="mib-browser-ad-search-label">{{$t('project.module.privpin')}}</div>
|
||||
<div class="mib-browser-ad-search-label">{{$t('project.module.privPin')}}</div>
|
||||
</el-col>
|
||||
<el-col :span="17">
|
||||
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.privPassword" id="mib-browser-privPassword"></el-input>
|
||||
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.privPin" id="mib-browser-privPassword"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -285,11 +285,11 @@ export default {
|
||||
community: 'public',
|
||||
auth: {
|
||||
username: '',
|
||||
password: '',
|
||||
pin: '',
|
||||
securityLevel: '',
|
||||
authProtocol: '',
|
||||
privProtocol: '',
|
||||
privPassword: ''
|
||||
privPin: ''
|
||||
},
|
||||
type: '',
|
||||
value: ''
|
||||
@@ -303,11 +303,11 @@ export default {
|
||||
community: 'public',
|
||||
auth: {
|
||||
username: '',
|
||||
password: '',
|
||||
pin: '',
|
||||
securityLevel: '',
|
||||
authProtocol: '',
|
||||
privProtocol: '',
|
||||
privPassword: ''
|
||||
privPin: ''
|
||||
}
|
||||
},
|
||||
operationData: ['get', 'walk', 'getnext', 'set'],
|
||||
@@ -453,11 +453,11 @@ export default {
|
||||
community: 'public',
|
||||
auth: {
|
||||
username: '',
|
||||
password: '',
|
||||
pin: '',
|
||||
securityLevel: '',
|
||||
authProtocol: '',
|
||||
privProtocol: '',
|
||||
privPassword: ''
|
||||
privPin: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -481,10 +481,10 @@ export default {
|
||||
if (this.searchParamPop.version == 3) {
|
||||
this.searchParamPop.auth.username = snmpAccount.params.username
|
||||
this.searchParamPop.auth.securityLevel = snmpAccount.params.securityLevel
|
||||
this.searchParamPop.auth.password = snmpAccount.params.password
|
||||
this.searchParamPop.auth.pin = snmpAccount.params.pin
|
||||
this.searchParamPop.auth.authProtocol = snmpAccount.params.authProtocol
|
||||
if (this.searchParamPop.auth.securityLevel == 'authPriv') { this.searchParamPop.auth.privProtocol = snmpAccount.params.privProtocol }
|
||||
this.searchParamPop.auth.privPassword = snmpAccount.params.privPassword
|
||||
this.searchParamPop.auth.privPin = snmpAccount.params.privPin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,9 +312,9 @@ export default {
|
||||
this.activeStep = 2
|
||||
this.step = 2
|
||||
if (response.code == 574004) { // 密码无效
|
||||
this.$alert(this.$t('setup.invalidpin'), { type: 'warning' })
|
||||
this.$alert(this.$t('setup.invalidPin'), { type: 'warning' })
|
||||
} else if (response.code == 574005) {
|
||||
this.$alert(this.$t('setup.requirepin'), { type: 'warning' })
|
||||
this.$alert(this.$t('setup.requirePin'), { type: 'warning' })
|
||||
} else if (response.code == 574002) {
|
||||
this.$alert(this.$t('setup.invalidCode', { page: this.$t('setup.welcomePage') }), { type: 'warning' })
|
||||
} else {
|
||||
|
||||
@@ -106,9 +106,9 @@
|
||||
<el-form-item :label="$t('config.system.email.smtpAccount')" prop="email_auth_account">
|
||||
<el-input v-model="email.email_auth_account" :disabled="email.email_enable == 'off'" id="system-email-email_smtp_account"> autocomplete="off"</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.system.email.smtpPwd')" class="has-tip" prop="email_auth_password">
|
||||
<el-input v-model="email.email_auth_password" type="password" :show-password="false" :disabled="email.email_enable == 'off'" autocomplete="off" id="system-email-email_smtp_password"></el-input>
|
||||
<div class="el-form-item__tip">{{$t("config.system.email.pwdTip")}}</div>
|
||||
<el-form-item :label="$t('config.system.email.smtpPin')" class="has-tip" prop="email_auth_pin">
|
||||
<el-input v-model="email.email_auth_pin" type="password" :show-password="false" :disabled="email.email_enable == 'off'" autocomplete="off" id="system-email-email_smtp_password"></el-input>
|
||||
<div class="el-form-item__tip">{{$t("config.system.email.pinTip")}}</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.system.email.sendAccount')" class="has-tip" prop="email_send_account">
|
||||
<el-input v-model="email.email_send_account" :disabled="email.email_enable == 'off'" id="system-email-email_send_account"></el-input>
|
||||
@@ -170,8 +170,8 @@
|
||||
<el-form-item :label="$t('config.system.ldap.dn')" prop="ldap_dn">
|
||||
<el-input v-model="ldap.ldap_dn" id="system-ldap-ldap_dn"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.system.ldap.pwd')" prop="ldap_password">
|
||||
<el-input v-model="ldap.ldap_password" type="password" id="system-ldap-ldap_password"></el-input>
|
||||
<el-form-item :label="$t('config.system.ldap.pin')" prop="ldap_pin">
|
||||
<el-input v-model="ldap.ldap_pin" type="password" id="system-ldap-ldap_pin"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.system.ldap.ou')" class="has-tip" prop="ldap_ou">
|
||||
<el-input v-model="ldap.ldap_ou" id="system-ldap-ldap_ou"></el-input>
|
||||
@@ -229,8 +229,8 @@
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.system.reset.pwd')" prop="password">
|
||||
<el-input id="system-reset-password" v-model="reset.password" type="password"></el-input>
|
||||
<el-form-item :label="$t('config.system.reset.pin')" prop="pin">
|
||||
<el-input id="system-reset-pin" v-model="reset.pin" type="password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<button @click="resetSys()" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_reset_reset'" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('overall.reset')}}</button>
|
||||
@@ -294,7 +294,7 @@ export default {
|
||||
email_port: 25,
|
||||
email_timeout: 10,
|
||||
email_auth_account: '',
|
||||
email_auth_password: '',
|
||||
email_auth_pin: '',
|
||||
email_send_account: '',
|
||||
email_test_account: '',
|
||||
email_security_type: 'NONE'
|
||||
@@ -330,7 +330,7 @@ export default {
|
||||
ldap: {
|
||||
ldap_address: '',
|
||||
ldap_dn: '',
|
||||
ldap_password: '',
|
||||
ldap_pin: '',
|
||||
ldap_ou: '',
|
||||
ldap_user_filter: '',
|
||||
ldap_mapping: '',
|
||||
@@ -346,7 +346,7 @@ export default {
|
||||
},
|
||||
reset: {
|
||||
type: [],
|
||||
password: ''
|
||||
pin: ''
|
||||
},
|
||||
linkTemp: {
|
||||
name: '', url: ''
|
||||
@@ -376,7 +376,7 @@ export default {
|
||||
},
|
||||
resetRules: {
|
||||
type: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||
password: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
||||
pin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
||||
},
|
||||
resetOptions: [
|
||||
{
|
||||
|
||||
@@ -99,7 +99,7 @@ export default {
|
||||
labels: '',
|
||||
basic_auth: {
|
||||
username: '',
|
||||
password: ''
|
||||
pin: ''
|
||||
},
|
||||
bearer_token: ''
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user