Merge branch 'codeCheck' of https://git.mesalab.cn/nezha/nezha-fronted into codeCheck
This commit is contained in:
@@ -1077,7 +1077,7 @@
|
|||||||
let dpsArr = [];
|
let dpsArr = [];
|
||||||
let timeStamp = Math.floor(new Date().getTime() / 1000);
|
let timeStamp = Math.floor(new Date().getTime() / 1000);
|
||||||
for (let i = 0; i < 20; i++) {
|
for (let i = 0; i < 20; i++) {
|
||||||
tempArr.push([timeStamp - (20 - i) * 15, Math.floor(Math.random() * 10) + ""]);
|
tempArr.push([timeStamp - (20 - i) * 15, Math.floor(window.crypto.getRandomValues() * 10) + ""]);
|
||||||
queryItem.values.push(tempArr[i])
|
queryItem.values.push(tempArr[i])
|
||||||
dpsArr.push([i + "", tempArr[i]]);
|
dpsArr.push([i + "", tempArr[i]]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
},
|
},
|
||||||
guid() {
|
guid() {
|
||||||
function S4() {
|
function S4() {
|
||||||
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
return (((1 + window.crypto.getRandomValues()) * 0x10000) | 0).toString(16).substring(1);
|
||||||
}
|
}
|
||||||
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-for="(item, index) in linkData">
|
<template v-for="(item, index) in linkData">
|
||||||
<el-menu-item :index="'0-' + index">
|
<el-menu-item :index="'0-' + index">
|
||||||
<span class="linkTitle"><a :href='item.url' :title="item.name" class="nz-a" rel="noopener norefferrer" target="_blank">{{item.name}}</a></span>
|
<span class="linkTitle"><a :href='item.url' :title="item.name" class="nz-a" rel="noopener noreferrer" target="_blank">{{item.name}}</a></span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
<div style="height: 1px; width: 100%; background-color: #cccccc;"></div>
|
<div style="height: 1px; width: 100%; background-color: #cccccc;"></div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="101-3">
|
<el-menu-item index="101-3">
|
||||||
<div @click="showPwdDialog">{{$t('overall.changePwd')}}</div>
|
<div @click="showPwdDialog">{{$t('overall.changeMima')}}</div>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="101-4">
|
<el-menu-item index="101-4">
|
||||||
<div @click="logout">{{$t('overall.signOut')}}</div>
|
<div @click="logout">{{$t('overall.signOut')}}</div>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export function resetZIndex(e){
|
|||||||
}
|
}
|
||||||
export function getUUID(){
|
export function getUUID(){
|
||||||
function S4() {
|
function S4() {
|
||||||
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
return (((1 + window.crypto.getRandomValues()) * 0x10000) | 0).toString(16).substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ function randomcolor() {
|
|||||||
return "hsl(" + n[0] + ", " + n[1] + "%, " + n[2] + "%)";
|
return "hsl(" + n[0] + ", " + n[1] + "%, " + n[2] + "%)";
|
||||||
case "hsla":
|
case "hsla":
|
||||||
var s = a(e),
|
var s = a(e),
|
||||||
o = t.alpha || Math.random();
|
o = t.alpha || window.crypto.getRandomValues();
|
||||||
return "hsla(" + s[0] + ", " + s[1] + "%, " + s[2] + "%, " + o + ")";
|
return "hsla(" + s[0] + ", " + s[1] + "%, " + s[2] + "%, " + o + ")";
|
||||||
case "rgbArray":
|
case "rgbArray":
|
||||||
return i(e);
|
return i(e);
|
||||||
@@ -120,7 +120,7 @@ function randomcolor() {
|
|||||||
return "rgb(" + i(e).join(", ") + ")";
|
return "rgb(" + i(e).join(", ") + ")";
|
||||||
case "rgba":
|
case "rgba":
|
||||||
var r = i(e);
|
var r = i(e);
|
||||||
o = t.alpha || Math.random();
|
o = t.alpha || window.crypto.getRandomValues();
|
||||||
return "rgba(" + r.join(", ") + ", " + o + ")";
|
return "rgba(" + r.join(", ") + ", " + o + ")";
|
||||||
default:
|
default:
|
||||||
return function(e) {
|
return function(e) {
|
||||||
@@ -242,7 +242,7 @@ function randomcolor() {
|
|||||||
|
|
||||||
function o(t) {
|
function o(t) {
|
||||||
if (null === e)
|
if (null === e)
|
||||||
return Math.floor(t[0] + Math.random() * (t[1] + 1 - t[0]));
|
return Math.floor(t[0] + window.crypto.getRandomValues() * (t[1] + 1 - t[0]));
|
||||||
var n = t[1] || 1,
|
var n = t[1] || 1,
|
||||||
s = t[0] || 0,
|
s = t[0] || 0,
|
||||||
o = (e = (9301 * e + 49297) % 233280) / 233280;
|
o = (e = (9301 * e + 49297) % 233280) / 233280;
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const cn = {
|
|||||||
active: "活跃",
|
active: "活跃",
|
||||||
type: "类别",
|
type: "类别",
|
||||||
detail: "详细信息",
|
detail: "详细信息",
|
||||||
changePwd: "修改密码",
|
changeMima: "修改密码",
|
||||||
createCabinet: "创建机柜",
|
createCabinet: "创建机柜",
|
||||||
createModel: "创建型号",
|
createModel: "创建型号",
|
||||||
createModule: "创建模块",
|
createModule: "创建模块",
|
||||||
@@ -108,7 +108,7 @@ const cn = {
|
|||||||
pageSize: "条/页",
|
pageSize: "条/页",
|
||||||
login: {
|
login: {
|
||||||
username: "登录名",
|
username: "登录名",
|
||||||
password: "密码",
|
mima: "密码",
|
||||||
login: "登录"
|
login: "登录"
|
||||||
},
|
},
|
||||||
dashboard: {
|
dashboard: {
|
||||||
@@ -469,7 +469,7 @@ const cn = {
|
|||||||
remark: "描述",
|
remark: "描述",
|
||||||
cli: "CLI账号",
|
cli: "CLI账号",
|
||||||
loginType: "登录类型",
|
loginType: "登录类型",
|
||||||
password: "密码",
|
mima: "密码",
|
||||||
ssh: "SSH-Key",
|
ssh: "SSH-Key",
|
||||||
account: "用户名",
|
account: "用户名",
|
||||||
port: "端口",
|
port: "端口",
|
||||||
@@ -520,16 +520,16 @@ const cn = {
|
|||||||
remark: "描述",
|
remark: "描述",
|
||||||
cli: "CLI账号",
|
cli: "CLI账号",
|
||||||
loginType: "登录类型",
|
loginType: "登录类型",
|
||||||
password: "密码",
|
mima: "密码",
|
||||||
ssh: "SSH key",
|
ssh: "SSH key",
|
||||||
protocol: "协议",
|
protocol: "协议",
|
||||||
sshProtocol: "SSH",
|
sshProtocol: "SSH",
|
||||||
telnetProtocol: "Telnet",
|
telnetProtocol: "Telnet",
|
||||||
userTip: "用户名提示",
|
userTip: "用户名提示",
|
||||||
passwordTip: "密码提示",
|
mimaTip: "密码提示",
|
||||||
reloginPasswordTip: "RELOGIN提示",
|
reloginMimaTip: "RELOGIN提示",
|
||||||
userPwdIntroduce: "请指定用户名和密码提示以便TELNET登录过程可自动运行",
|
userMimaIntroduce: "请指定用户名和密码提示以便TELNET登录过程可自动运行",
|
||||||
reLoginPwdIntroduce: "请指定密码提示以便RELOGIN登录过程可自动运行",
|
reLoginMimaIntroduce: "请指定密码提示以便RELOGIN登录过程可自动运行",
|
||||||
account: "用户名",
|
account: "用户名",
|
||||||
port: "端口",
|
port: "端口",
|
||||||
upload: "上传",
|
upload: "上传",
|
||||||
@@ -570,16 +570,16 @@ const cn = {
|
|||||||
createAccount: "新增用户",
|
createAccount: "新增用户",
|
||||||
editAccount: "编辑用户",
|
editAccount: "编辑用户",
|
||||||
notCurrentlySupport: "暂不支持",
|
notCurrentlySupport: "暂不支持",
|
||||||
password: "密码",
|
mima: "密码",
|
||||||
oldPwd: "旧密码",
|
oldMima: "旧密码",
|
||||||
inputOldPwd: "请输入旧密码",
|
inputOldMima: "请输入旧密码",
|
||||||
newPwd: "新密码",
|
newMima: "新密码",
|
||||||
inputNewPwd: "请输入新密码",
|
inputNewMima: "请输入新密码",
|
||||||
confirmPwd: "确认密码",
|
confirmMima: "确认密码",
|
||||||
inputConfirmPwd: "请再次输入密码",
|
inputConfirmMima: "请再次输入密码",
|
||||||
invalidPwd: "无效的密码,最少6个字符",
|
invalidMima: "无效的密码,最少6个字符",
|
||||||
confirmPwdErr: "两次密码输入不一致",
|
confirmMimaErr: "两次密码输入不一致",
|
||||||
reinputPwd: "请再次输入密码",
|
reinputMima: "请再次输入密码",
|
||||||
notification: "通知"
|
notification: "通知"
|
||||||
},
|
},
|
||||||
roles:{
|
roles:{
|
||||||
@@ -749,13 +749,13 @@ const cn = {
|
|||||||
smtpHost: "SMTP主机",
|
smtpHost: "SMTP主机",
|
||||||
smtpPort: "SMTP端口",
|
smtpPort: "SMTP端口",
|
||||||
smtpAccount: "SMTP账号",
|
smtpAccount: "SMTP账号",
|
||||||
smtpPwd: "SMTP密码",
|
smtpMima: "SMTP密码",
|
||||||
sendAccount: "发送账号",
|
sendAccount: "发送账号",
|
||||||
testAccount: "测试账号",
|
testAccount: "测试账号",
|
||||||
useSSL: "SSL",
|
useSSL: "SSL",
|
||||||
useTLS: "TLS",
|
useTLS: "TLS",
|
||||||
testConnection: "测试连接",
|
testConnection: "测试连接",
|
||||||
pwdTip: "提示:一些邮件提供商需要输入的是Token",
|
mimaTip: "提示:一些邮件提供商需要输入的是Token",
|
||||||
sendAccountTip: "提示:发送邮件账号,默认使用SMTP账号作为发送账号",
|
sendAccountTip: "提示:发送邮件账号,默认使用SMTP账号作为发送账号",
|
||||||
testAccountTip: "提示:仅用来作为测试邮件收件人",
|
testAccountTip: "提示:仅用来作为测试邮件收件人",
|
||||||
sslTip: "如果SMTP端口是465,通常需要启用SSL",
|
sslTip: "如果SMTP端口是465,通常需要启用SSL",
|
||||||
@@ -769,7 +769,7 @@ const cn = {
|
|||||||
ldap: "LDAP",
|
ldap: "LDAP",
|
||||||
address: "LDAP地址",
|
address: "LDAP地址",
|
||||||
dn: "Bind DN",
|
dn: "Bind DN",
|
||||||
pwd: "密码",
|
mima: "密码",
|
||||||
ou: "用户OU",
|
ou: "用户OU",
|
||||||
filter: "用户过滤器",
|
filter: "用户过滤器",
|
||||||
map: "LDAP属性映射",
|
map: "LDAP属性映射",
|
||||||
@@ -801,11 +801,11 @@ const cn = {
|
|||||||
reset: {
|
reset: {
|
||||||
reset: "重置",
|
reset: "重置",
|
||||||
type: "类型",
|
type: "类型",
|
||||||
pwd: "密码",
|
mima: "密码",
|
||||||
metric: "指标",
|
metric: "指标",
|
||||||
alert: "告警",
|
alert: "告警",
|
||||||
sysConfig: "系统设置",
|
sysConfig: "系统设置",
|
||||||
pwdTip: "请输入密码",
|
mimaTip: "请输入密码",
|
||||||
promptTitle: "确认密码",
|
promptTitle: "确认密码",
|
||||||
yes: "是",
|
yes: "是",
|
||||||
no: "否"
|
no: "否"
|
||||||
@@ -907,7 +907,7 @@ const cn = {
|
|||||||
authProtocol: "认证协议",
|
authProtocol: "认证协议",
|
||||||
privProtocol: "隐私协议",
|
privProtocol: "隐私协议",
|
||||||
contextName: "内容名称",
|
contextName: "内容名称",
|
||||||
privPassword: "隐私密码"
|
privMima: "隐私密码"
|
||||||
},
|
},
|
||||||
endpoint: {
|
endpoint: {
|
||||||
createEndpoint: "新增Endpoint",
|
createEndpoint: "新增Endpoint",
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const en = {
|
|||||||
back: 'Back', //返回
|
back: 'Back', //返回
|
||||||
unavailable: 'Unavailable',
|
unavailable: 'Unavailable',
|
||||||
available: 'Available',
|
available: 'Available',
|
||||||
changePwd:'Change password',//修改密码
|
changeMima:'Change password',//修改密码
|
||||||
createChart:'Create chart',
|
createChart:'Create chart',
|
||||||
createProject:'Create project',
|
createProject:'Create project',
|
||||||
createEndpoint:'Create endpoint',
|
createEndpoint:'Create endpoint',
|
||||||
@@ -113,7 +113,7 @@ const en = {
|
|||||||
},
|
},
|
||||||
login: {
|
login: {
|
||||||
username: 'Username',
|
username: 'Username',
|
||||||
password: 'Password',
|
mima: 'Password',
|
||||||
login: 'Login'
|
login: 'Login'
|
||||||
},
|
},
|
||||||
dashboard:{
|
dashboard:{
|
||||||
@@ -425,16 +425,16 @@ const en = {
|
|||||||
remark:'Description',//'描述'
|
remark:'Description',//'描述'
|
||||||
cli:'CLI account',//'CLI账号'
|
cli:'CLI account',//'CLI账号'
|
||||||
loginType:'Login type',//'登录类型'
|
loginType:'Login type',//'登录类型'
|
||||||
password:'Password',//'密码'
|
mima:'Password',//'密码'
|
||||||
ssh:'SSH key',//'SSH-Key'
|
ssh:'SSH key',//'SSH-Key'
|
||||||
protocol:"Protocol",
|
protocol:"Protocol",
|
||||||
sshProtocol:"SSH",
|
sshProtocol:"SSH",
|
||||||
telnetProtocol:"Telnet",
|
telnetProtocol:"Telnet",
|
||||||
userTip:"User tip",//用户名提示
|
userTip:"User tip",//用户名提示
|
||||||
passwordTip:"Password tip",//密码提示
|
mimaTip:"Password tip",//密码提示
|
||||||
reloginPasswordTip:"Relogin tip",//密码提示
|
reloginMimaTip:"Relogin tip",//密码提示
|
||||||
userPwdIntroduce:'Please specify a user name and password so that the telenet login process can automatically log in',
|
userMimaIntroduce:'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',
|
reLoginMimaIntroduce:'Please specify the password prompt so that the login process can run automatically',
|
||||||
account:'User name',//'用户名'
|
account:'User name',//'用户名'
|
||||||
port:'Port',//'端口'
|
port:'Port',//'端口'
|
||||||
upload:'Upload',//'上传'
|
upload:'Upload',//'上传'
|
||||||
@@ -520,7 +520,7 @@ const en = {
|
|||||||
remark:'Description',//'描述'
|
remark:'Description',//'描述'
|
||||||
cli:'CLI account',//'CLI账号'
|
cli:'CLI account',//'CLI账号'
|
||||||
loginType:'Login type',//'登录类型'
|
loginType:'Login type',//'登录类型'
|
||||||
password:'Password',//'密码'
|
mima:'Password',//'密码'
|
||||||
ssh:'SSH-Key',//'SSH-Key'
|
ssh:'SSH-Key',//'SSH-Key'
|
||||||
account:'Username',//'用户名'
|
account:'Username',//'用户名'
|
||||||
port:'Port',//'端口'
|
port:'Port',//'端口'
|
||||||
@@ -573,16 +573,16 @@ const en = {
|
|||||||
createAccount: 'New account',//"新增用户"
|
createAccount: 'New account',//"新增用户"
|
||||||
editAccount: 'Edit account',//"编辑用户"
|
editAccount: 'Edit account',//"编辑用户"
|
||||||
notCurrentlySupport: 'Not available',//'暂不支持'
|
notCurrentlySupport: 'Not available',//'暂不支持'
|
||||||
password: 'Password',//'密码'
|
mima: 'Password',//'密码'
|
||||||
oldPwd:'Old password',
|
oldMima:'Old password',
|
||||||
inputOldPwd:'Please input old password',
|
inputOldMima:'Please input old password',
|
||||||
newPwd:'New password',
|
newMima:'New password',
|
||||||
inputNewPwd:'Please input new password',
|
inputNewMima:'Please input new password',
|
||||||
confirmPwd:'Confirm password',
|
confirmMima:'Confirm password',
|
||||||
inputConfirmPwd:'Please input confirm password',
|
inputConfirmMima:'Please input confirm password',
|
||||||
invalidPwd:'invalide password,the length at least 6',
|
invalidMima:'invalide password,the length at least 6',
|
||||||
confirmPwdErr:'The two passwords are inconsistent',
|
confirmMimaErr:'The two passwords are inconsistent',
|
||||||
reinputPwd:'Enter password again',
|
reinputMima:'Enter password again',
|
||||||
notification: 'Notification'
|
notification: 'Notification'
|
||||||
},
|
},
|
||||||
roles:{
|
roles:{
|
||||||
@@ -753,13 +753,13 @@ const en = {
|
|||||||
smtpHost:'SMTP host',
|
smtpHost:'SMTP host',
|
||||||
smtpPort:'SMTP port',
|
smtpPort:'SMTP port',
|
||||||
smtpAccount:'SMTP account',
|
smtpAccount:'SMTP account',
|
||||||
smtpPwd:'SMTP password',
|
smtpMima:'SMTP password',
|
||||||
sendAccount:'Send account',
|
sendAccount:'Send account',
|
||||||
testAccount:'Test account',
|
testAccount:'Test account',
|
||||||
useSSL:'SSL',
|
useSSL:'SSL',
|
||||||
useTLS:'TLS',
|
useTLS:'TLS',
|
||||||
testConnection:'Test connection',
|
testConnection:'Test connection',
|
||||||
pwdTip:'Tip:Some email providers need to enter token',
|
mimaTip:'Tip:Some email providers need to enter token',
|
||||||
sendAccountTip:'Tip:The SMTP account is used as the sending account by default',
|
sendAccountTip:'Tip:The SMTP account is used as the sending account by default',
|
||||||
testAccountTip:'Tip:Used only as test mail recipient',
|
testAccountTip:'Tip:Used only as test mail recipient',
|
||||||
sslTip:'If the SMTP port is 465, you usually need to enable SSL',
|
sslTip:'If the SMTP port is 465, you usually need to enable SSL',
|
||||||
@@ -773,7 +773,7 @@ const en = {
|
|||||||
ldap:'LDAP',
|
ldap:'LDAP',
|
||||||
address:'LDAP address',
|
address:'LDAP address',
|
||||||
dn:'Bind DN',
|
dn:'Bind DN',
|
||||||
pwd:'Password',
|
mima:'Password',
|
||||||
ou:'User OU',
|
ou:'User OU',
|
||||||
filter:'User filter',
|
filter:'User filter',
|
||||||
map:'LDAP field mapping',
|
map:'LDAP field mapping',
|
||||||
@@ -805,11 +805,11 @@ const en = {
|
|||||||
reset:{
|
reset:{
|
||||||
reset:'Reset',
|
reset:'Reset',
|
||||||
type:'Type',
|
type:'Type',
|
||||||
pwd:'Password',
|
mima:'Password',
|
||||||
metric:'metric',
|
metric:'metric',
|
||||||
alert:'alert',
|
alert:'alert',
|
||||||
sysConfig:'System config',
|
sysConfig:'System config',
|
||||||
pwdTip:'Please input your password',
|
mimaTip:'Please input your password',
|
||||||
promptTitle:'Confirm',
|
promptTitle:'Confirm',
|
||||||
yes:'Yes',
|
yes:'Yes',
|
||||||
no:'No',
|
no:'No',
|
||||||
@@ -909,7 +909,7 @@ const en = {
|
|||||||
authProtocol: 'Auth protocol',
|
authProtocol: 'Auth protocol',
|
||||||
privProtocol: 'Priv protocol',
|
privProtocol: 'Priv protocol',
|
||||||
contextName: 'Context name',
|
contextName: 'Context name',
|
||||||
privPassword: 'Priv password',
|
privMima: 'Priv password',
|
||||||
tip: {
|
tip: {
|
||||||
defaultEndpointSet: 'Default endpoint settings',//"默认的Endpoint设置"
|
defaultEndpointSet: 'Default endpoint settings',//"默认的Endpoint设置"
|
||||||
relation: 'Module associated Endpoint will configure the following ports/paths/parameters by default'//"组件关联的Endpoint将默认配置以下端口/路径/参数"
|
relation: 'Module associated Endpoint will configure the following ports/paths/parameters by default'//"组件关联的Endpoint将默认配置以下端口/路径/参数"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div class="login-label"></div>
|
<div class="login-label"></div>
|
||||||
<div class="login-input">
|
<div class="login-input">
|
||||||
<i class="nz-icon nz-icon-password"></i>
|
<i class="nz-icon nz-icon-password"></i>
|
||||||
<input v-model="loginData.password" type="password" name="password" autocomplete="on" :placeholder="$t('login.password')"></input>
|
<input v-model="loginData.password" type="password" name="password" autocomplete="on" :placeholder="$t('login.mima')"></input>
|
||||||
</div>
|
</div>
|
||||||
<div class="login-foot">
|
<div class="login-foot">
|
||||||
<button @click="login" class="login-btn" id="login" v-loading="loading">{{$t("login.login")}}</button>
|
<button @click="login" class="login-btn" id="login" v-loading="loading">{{$t("login.login")}}</button>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span :class="buttonClass" @click.prevent.stop="" slot="reference" :id="'cabinet-edit-'+Math.random().toString(36).slice(-8)">
|
<span :class="buttonClass" @click.prevent.stop="" slot="reference" :id="'cabinet-edit-'+window.crypto.getRandomValues().toString(36).slice(-8)">
|
||||||
<slot name="optionZone">
|
<slot name="optionZone">
|
||||||
<i class="nz-icon nz-icon-plus" id="cabinet-plus"></i>
|
<i class="nz-icon nz-icon-plus" id="cabinet-plus"></i>
|
||||||
</slot>
|
</slot>
|
||||||
|
|||||||
@@ -420,7 +420,7 @@
|
|||||||
};
|
};
|
||||||
} else{
|
} else{
|
||||||
model.smooth={
|
model.smooth={
|
||||||
roundness:0.5 ,// (Math.random()*8 +1)/10 获取0.1-0.9之间的随机数
|
roundness:0.5 ,// (window.crypto.getRandomValues()*8 +1)/10 获取0.1-0.9之间的随机数
|
||||||
type:this.form.type,
|
type:this.form.type,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
v-model="editUser.username" maxlength="64" show-word-limit size="small" :disabled="editUser.username==='admin' && editUser.userId==1"></el-input>
|
v-model="editUser.username" maxlength="64" show-word-limit size="small" :disabled="editUser.username==='admin' && editUser.userId==1"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--password-->
|
<!--password-->
|
||||||
<el-form-item :label="$t('config.account.password')" prop="password" v-if="!editUser.userId">
|
<el-form-item :label="$t('config.account.mima')" prop="password" v-if="!editUser.userId">
|
||||||
<el-input autocomplete="new-password" type="password" placeholder="" v-model="editUser.password"
|
<el-input autocomplete="new-password" type="password" placeholder="" v-model="editUser.password"
|
||||||
maxlength="16" show-word-limit size="small" @blur="passwordBlur"></el-input>
|
maxlength="16" show-word-limit size="small" @blur="passwordBlur"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -505,7 +505,7 @@
|
|||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.assetTypeData = response.data;
|
this.assetTypeData = response.data;
|
||||||
if(this.editAsset.model&&!this.editAsset.model.type.code){
|
if(this.editAsset.model&&!this.editAsset.model.type.code){
|
||||||
this.editAsset.model.type.code=response.data[0].value;
|
this.editAsset.model.type.code=response.data[0].code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resolve(this.assetTypeData);
|
resolve(this.assetTypeData);
|
||||||
@@ -588,6 +588,9 @@
|
|||||||
box.validateAccount();
|
box.validateAccount();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// if(this.editAsset.model){
|
||||||
|
// delete this.editAsset.model;
|
||||||
|
// }
|
||||||
this.$refs.assetEditForm.validate((valid) => {
|
this.$refs.assetEditForm.validate((valid) => {
|
||||||
if (valid && this.accountValidResult) {
|
if (valid && this.accountValidResult) {
|
||||||
if (this.editAsset.id) {
|
if (this.editAsset.id) {
|
||||||
|
|||||||
@@ -165,7 +165,7 @@
|
|||||||
|
|
||||||
<el-row v-if="editModule.security_level == 'authNoPriv' || editModule.security_level == 'authPriv'">
|
<el-row v-if="editModule.security_level == 'authNoPriv' || editModule.security_level == 'authPriv'">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="sub-label sub-label-required">{{$t('login.password')}}</div>
|
<div class="sub-label sub-label-required">{{$t('login.mima')}}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
@@ -204,7 +204,7 @@
|
|||||||
|
|
||||||
<el-row v-if="editModule.security_level == 'authPriv'">
|
<el-row v-if="editModule.security_level == 'authPriv'">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="sub-label sub-label-required">{{$t('project.module.privPassword')}}</div>
|
<div class="sub-label sub-label-required">{{$t('project.module.privMima')}}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-form-item prop="priv_password">
|
<el-form-item prop="priv_password">
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
<el-row class="mib-browser-ad-search-item" v-if="assetSetting.auth.securityLevel == 'authNoPriv' || assetSetting.auth.securityLevel == 'authPriv'">
|
<el-row class="mib-browser-ad-search-item" v-if="assetSetting.auth.securityLevel == 'authNoPriv' || assetSetting.auth.securityLevel == 'authPriv'">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="mib-browser-ad-search-label">{{$t('login.password')}}</div>
|
<div class="mib-browser-ad-search-label">{{$t('login.mima')}}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.password"></el-input>
|
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.password"></el-input>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
<el-row class="mib-browser-ad-search-item" v-if="assetSetting.auth.securityLevel == 'authPriv'">
|
<el-row class="mib-browser-ad-search-item" v-if="assetSetting.auth.securityLevel == 'authPriv'">
|
||||||
<el-col :span="6">
|
<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.privMima')}}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.privPassword"></el-input>
|
<el-input class="input-x-mini-24" v-model.trim="assetSetting.auth.privPassword"></el-input>
|
||||||
|
|||||||
@@ -6,17 +6,17 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.loginType')" prop="params.method">
|
<el-form-item :label="$t('asset.loginType')" prop="params.method">
|
||||||
<el-radio-group v-model="account.params.method" size="small">
|
<el-radio-group v-model="account.params.method" size="small">
|
||||||
<el-radio-button label="password">{{$t('asset.password')}}</el-radio-button>
|
<el-radio-button label="password">{{$t('asset.mima')}}</el-radio-button>
|
||||||
<el-radio-button label="key">{{$t('asset.ssh')}}</el-radio-button>
|
<el-radio-button label="key">{{$t('asset.ssh')}}</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.password')" v-if="account.params.method == 'password'">
|
<el-form-item :label="$t('asset.mima')" v-if="account.params.method == 'password'">
|
||||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.password"/>
|
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.password"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.ssh')" v-if="account.params.method == 'key'" prop="file">
|
<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"></el-input>
|
<el-input rows="4" type="textarea" placeholder="" v-model="account.params.key" size="small"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.password')" v-if="account.params.method == 'key'">
|
<el-form-item :label="$t('asset.mima')" v-if="account.params.method == 'key'">
|
||||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.keyPassword"/>
|
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.keyPassword"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.port')" prop="port" style="display: inline-block">
|
<el-form-item :label="$t('asset.port')" prop="port" style="display: inline-block">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<el-form-item :label="$t('asset.userTip')" prop="userTip">
|
<el-form-item :label="$t('asset.userTip')" prop="userTip">
|
||||||
<el-input autocomplete="new-password" size="small" v-model="account.params.userTip"/>
|
<el-input autocomplete="new-password" size="small" v-model="account.params.userTip"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.password')">
|
<el-form-item :label="$t('asset.mima')">
|
||||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.password"/>
|
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.password"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('asset.passwordTip')">
|
<el-form-item :label="this.$t('asset.passwordTip')">
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
<el-radio-button label="authPriv"></el-radio-button>
|
<el-radio-button label="authPriv"></el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('login.password')" prop="params.password" v-if="account.params.securityLevel == 'authNoPriv' || account.params.securityLevel == 'authPriv'">
|
<el-form-item :label="$t('login.mima')" 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"/>
|
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.password"/>
|
||||||
</el-form-item>
|
</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-form-item :label="$t('project.module.authProtocol')" prop="params.authProtocol" v-if="account.params.securityLevel == 'authNoPriv' || account.params.securityLevel == 'authPriv'">
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
<el-radio-button label="AES"></el-radio-button>
|
<el-radio-button label="AES"></el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('project.module.privPassword')" prop="params.privPassword" v-if="account.params.securityLevel == 'authPriv'">
|
<el-form-item :label="$t('project.module.privMima')" prop="params.privPassword" v-if="account.params.securityLevel == 'authPriv'">
|
||||||
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.privPassword"/>
|
<el-input autocomplete="new-password" size="small" type="password" v-model="account.params.privPassword"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -687,7 +687,7 @@
|
|||||||
detail.account = account.user;
|
detail.account = account.user;
|
||||||
let loginType = "";
|
let loginType = "";
|
||||||
if (account.authType == 1) {
|
if (account.authType == 1) {
|
||||||
loginType = this.$t('asset.password');
|
loginType = this.$t('asset.mima');
|
||||||
} else if (account.authType == 2) {
|
} else if (account.authType == 2) {
|
||||||
loginType = this.$t('asset.ssh');
|
loginType = this.$t('asset.ssh');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<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-dialog class="nz-dialog" :title="$t('overall.changeMima')" :visible.sync="visible" @open="dialogOpened" :modal-append-to-body='false' @closed="dialogClosed" width="600px" :show-close="false" >
|
||||||
<el-form :model="user" label-position="right" label-width="150px" :rules="rules" ref="changePwdForm" size="mini">
|
<el-form :model="user" label-position="right" label-width="150px" :rules="rules" ref="changePwdForm" size="mini">
|
||||||
<el-form-item :label="$t('config.account.account')" prop="username" v-show="curUser != sysUser">
|
<el-form-item :label="$t('config.account.account')" prop="username" v-show="curUser != sysUser">
|
||||||
<el-input type="text" autocomplete="false" v-model="user.username" disabled></el-input>
|
<el-input type="text" autocomplete="false" v-model="user.username" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.account.oldPwd')" prop="pwd">
|
<el-form-item :label="$t('config.account.oldMima')" prop="pwd">
|
||||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.pwd" maxlength="20" :placeholder="$t('config.account.inputOldPwd')"></el-input>
|
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.pwd" maxlength="20" :placeholder="$t('config.account.inputOldMima')"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.account.newPwd')" prop="newPwd">
|
<el-form-item :label="$t('config.account.newMima')" prop="newPwd">
|
||||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.newPwd" maxlength="20" :placeholder="$t('config.account.inputNewPwd')"></el-input>
|
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.newPwd" maxlength="20" :placeholder="$t('config.account.inputNewMima')"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.account.confirmPwd')" prop="confirmPwd">
|
<el-form-item :label="$t('config.account.confirmMima')" prop="confirmPwd">
|
||||||
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.confirmPwd" maxlength="20" :placeholder="$t('config.account.inputConfirmPwd')"></el-input>
|
<el-input type="password" autocomplete="false" :show-password="true" v-model="user.confirmPwd" maxlength="20" :placeholder="$t('config.account.inputConfirmMima')"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!--底部按钮-->
|
<!--底部按钮-->
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
if(value && value != '' ){
|
if(value && value != '' ){
|
||||||
callback();
|
callback();
|
||||||
}else{
|
}else{
|
||||||
callback(new Error(temp.$t('config.account.invalidPwd')))
|
callback(new Error(temp.$t('config.account.invalidMima')))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var validateConfirmPass=(rule,value,callback) => {
|
var validateConfirmPass=(rule,value,callback) => {
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
rules:{
|
rules:{
|
||||||
pwd:[{required:true,message: this.$t('validate.required'), trigger: 'blur'}],
|
pwd:[{required:true,message: this.$t('validate.required'), trigger: 'blur'}],
|
||||||
newPwd:[{required:true,message: this.$t('validate.required'), trigger: 'blur'},{validator:validatePass,trigger: 'blur'}],
|
newPwd:[{required:true,message: this.$t('validate.required'), trigger: 'blur'},{validator:validatePass,trigger: 'blur'}],
|
||||||
confirmPwd:[{required:true,message: this.$t('config.account.reinputPwd'), trigger: 'blur'},{validator:validateConfirmPass,trigger: 'blur'}]
|
confirmPwd:[{required:true,message: this.$t('config.account.reinputMima'), trigger: 'blur'},{validator:validateConfirmPass,trigger: 'blur'}]
|
||||||
},
|
},
|
||||||
visible:false,
|
visible:false,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
<el-row class="mib-browser-ad-search-item" v-if="searchParamPop.auth.securityLevel == 'authNoPriv' || searchParamPop.auth.securityLevel == 'authPriv'">
|
<el-row class="mib-browser-ad-search-item" v-if="searchParamPop.auth.securityLevel == 'authNoPriv' || searchParamPop.auth.securityLevel == 'authPriv'">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<div class="mib-browser-ad-search-label">{{$t('login.password')}}</div>
|
<div class="mib-browser-ad-search-label">{{$t('login.mima')}}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.password"></el-input>
|
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.password"></el-input>
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
|
|
||||||
<el-row class="mib-browser-ad-search-item" v-if="searchParamPop.auth.securityLevel == 'authPriv'">
|
<el-row class="mib-browser-ad-search-item" v-if="searchParamPop.auth.securityLevel == 'authPriv'">
|
||||||
<el-col :span="6">
|
<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.privMima')}}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.privPassword"></el-input>
|
<el-input type="password" class="input-x-mini-24" v-model.trim="searchParamPop.auth.privPassword"></el-input>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<el-form-item :label="$t('config.system.email.smtpAccount')" prop="email_smtp_account">
|
<el-form-item :label="$t('config.system.email.smtpAccount')" prop="email_smtp_account">
|
||||||
<el-input v-model="email.email_smtp_account" :disabled="email.email_enable == 'off'"> autocomplete="off"</el-input>
|
<el-input v-model="email.email_smtp_account" :disabled="email.email_enable == 'off'"> autocomplete="off"</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.email.smtpPwd')" prop="email_smtp_password">
|
<el-form-item :label="$t('config.system.email.smtpMima')" prop="email_smtp_password">
|
||||||
<el-input v-model="email.email_smtp_password" type="password" :show-password="false" :disabled="email.email_enable == 'off'" autocomplete="off"></el-input>
|
<el-input v-model="email.email_smtp_password" type="password" :show-password="false" :disabled="email.email_enable == 'off'" autocomplete="off"></el-input>
|
||||||
<div><span>{{$t('config.system.email.pwdTip')}}</span></div>
|
<div><span>{{$t('config.system.email.pwdTip')}}</span></div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
<el-form-item :label="$t('config.system.ldap.dn')" prop="ldap_dn">
|
<el-form-item :label="$t('config.system.ldap.dn')" prop="ldap_dn">
|
||||||
<el-input v-model="ldap.ldap_dn"></el-input>
|
<el-input v-model="ldap.ldap_dn"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.ldap.pwd')" prop="ldap_password">
|
<el-form-item :label="$t('config.system.ldap.mima')" prop="ldap_password">
|
||||||
<el-input v-model="ldap.ldap_password" type="password"></el-input>
|
<el-input v-model="ldap.ldap_password" type="password"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.system.ldap.ou')" prop="ldap_ou">
|
<el-form-item :label="$t('config.system.ldap.ou')" prop="ldap_ou">
|
||||||
|
|||||||
@@ -692,7 +692,7 @@
|
|||||||
},
|
},
|
||||||
guid() {
|
guid() {
|
||||||
function S4() {
|
function S4() {
|
||||||
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
return (((1 + window.crypto.getRandomValues()) * 0x10000) | 0).toString(16).substring(1);
|
||||||
}
|
}
|
||||||
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
<div class="introduce-view right-margin" v-show="showIntroduce">
|
<div class="introduce-view right-margin" v-show="showIntroduce">
|
||||||
<div class="info-room">
|
<div class="info-room">
|
||||||
<div class="col-md-9 doc-content">
|
<div class="col-md-9 doc-content">
|
||||||
<h1 class="page-header">Query examples<a class="header-anchor" href="https://prometheus.io/docs/prometheus/latest/querying/examples/" target="_blank" rel="noopener norefferrer"><i style="font-size: 16px;" class="nz-icon nz-icon-link1"></i></a></h1>
|
<h1 class="page-header">Query examples<a class="header-anchor" href="https://prometheus.io/docs/prometheus/latest/querying/examples/" target="_blank" rel="noopener noreferrer"><i style="font-size: 16px;" class="nz-icon nz-icon-link1"></i></a></h1>
|
||||||
<div class="content-divider"></div>
|
<div class="content-divider"></div>
|
||||||
<h2 >
|
<h2 >
|
||||||
Simple time series selection
|
Simple time series selection
|
||||||
|
|||||||
@@ -474,7 +474,7 @@
|
|||||||
},
|
},
|
||||||
guid() {
|
guid() {
|
||||||
function S4() {
|
function S4() {
|
||||||
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
return (((1 + window.crypto.getRandomValues()) * 0x10000) | 0).toString(16).substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
|
||||||
|
|||||||
@@ -694,7 +694,7 @@
|
|||||||
detail.account=account.user;
|
detail.account=account.user;
|
||||||
let loginType="";
|
let loginType="";
|
||||||
if(account.authType==1){
|
if(account.authType==1){
|
||||||
loginType=this.$t('asset.password');
|
loginType=this.$t('asset.mima');
|
||||||
}else if(account.authType==2){
|
}else if(account.authType==2){
|
||||||
loginType=this.$t('asset.ssh');
|
loginType=this.$t('asset.ssh');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user