mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-20 10:46:35 +00:00
fix: 修复系统用户添加空资产成功的问题
This commit is contained in:
@@ -122,6 +122,7 @@
|
|||||||
"TestConnection": "测试连接",
|
"TestConnection": "测试连接",
|
||||||
"Type": "类型",
|
"Type": "类型",
|
||||||
"UnselectedAssets": "未选择资产",
|
"UnselectedAssets": "未选择资产",
|
||||||
|
"UnselectedNodes": "未选择节点",
|
||||||
"UpdateAssetUserToken": "更新资产用户认证信息",
|
"UpdateAssetUserToken": "更新资产用户认证信息",
|
||||||
"Username": "用户名",
|
"Username": "用户名",
|
||||||
"UsernameHelpMessage": "用户名是动态的,登录资产时使用当前用户的用户名登录",
|
"UsernameHelpMessage": "用户名是动态的,登录资产时使用当前用户的用户名登录",
|
||||||
@@ -132,6 +133,7 @@
|
|||||||
"date_joined": "创建日期",
|
"date_joined": "创建日期",
|
||||||
"ip": "IP",
|
"ip": "IP",
|
||||||
"sshkey": "sshkey"
|
"sshkey": "sshkey"
|
||||||
|
|
||||||
},
|
},
|
||||||
"audits": {
|
"audits": {
|
||||||
"Hosts": "主机",
|
"Hosts": "主机",
|
||||||
|
@@ -122,6 +122,7 @@
|
|||||||
"TestConnection": "Test connection",
|
"TestConnection": "Test connection",
|
||||||
"Type": "Type",
|
"Type": "Type",
|
||||||
"UnselectedAssets": "Unselected assets",
|
"UnselectedAssets": "Unselected assets",
|
||||||
|
"UnselectedNodes": "Unselected nodes",
|
||||||
"UpdateAssetUserToken": "Update asset user auth",
|
"UpdateAssetUserToken": "Update asset user auth",
|
||||||
"Username": "Username",
|
"Username": "Username",
|
||||||
"UsernameHelpMessage": "Username is dynamic, When connect asset, using current user's username",
|
"UsernameHelpMessage": "Username is dynamic, When connect asset, using current user's username",
|
||||||
|
@@ -78,6 +78,9 @@ export default {
|
|||||||
systemuser: this.object.id
|
systemuser: this.object.id
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
if (data.length === 0) {
|
||||||
|
return this.$message.error(this.$t('assets.UnselectedAssets'))
|
||||||
|
}
|
||||||
return this.$axios.post(relationUrl, data)
|
return this.$axios.post(relationUrl, data)
|
||||||
},
|
},
|
||||||
onAddSuccess: (items, that) => {
|
onAddSuccess: (items, that) => {
|
||||||
@@ -144,6 +147,9 @@ export default {
|
|||||||
node: v.value
|
node: v.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if (data.length === 0) {
|
||||||
|
return this.$message.error(this.$t('assets.UnselectedNodes'))
|
||||||
|
}
|
||||||
return this.$axios.post(relationUrl, data)
|
return this.$axios.post(relationUrl, data)
|
||||||
},
|
},
|
||||||
performDelete: (item) => {
|
performDelete: (item) => {
|
||||||
|
Reference in New Issue
Block a user