mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-13 15:04:43 +00:00
perf: 选择资产组件弹窗显示资产详情
This commit is contained in:
parent
d66c6b59a2
commit
fa77a95d93
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TreeTable from '@/components/TreeTable'
|
import TreeTable from '@/components/TreeTable'
|
||||||
import { DetailFormatter } from '@/components/TableFormatters'
|
import { DialogDetailFormatter } from '@/components/TableFormatters'
|
||||||
import Select2 from '@/components/FormFields/Select2'
|
import Select2 from '@/components/FormFields/Select2'
|
||||||
import Dialog from '@/components/Dialog'
|
import Dialog from '@/components/Dialog'
|
||||||
|
|
||||||
@ -109,9 +109,45 @@ export default {
|
|||||||
label: this.$t('assets.Name'),
|
label: this.$t('assets.Name'),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
formatter: DetailFormatter,
|
formatter: DialogDetailFormatter,
|
||||||
formatterArgs: {
|
formatterArgs: {
|
||||||
route: 'AssetDetail'
|
getDialogTitle: function({ col, row }) { this.$t('assets.AssetDetail') }.bind(this),
|
||||||
|
getDetailItems: function({ col, row }) {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
key: this.$t('assets.Name'),
|
||||||
|
value: row.name
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('assets.AssetAddress'),
|
||||||
|
value: row.address
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('assets.Protocols'),
|
||||||
|
value: row.protocols.map(item => item.name).join(', ')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('assets.Category'),
|
||||||
|
value: row.category.label
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('assets.Type'),
|
||||||
|
value: row.type.label
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('assets.Platform'),
|
||||||
|
value: row.platform?.name || ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('common.Active'),
|
||||||
|
value: row.is_active
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: this.$t('assets.Comment'),
|
||||||
|
value: row.comment
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}.bind(this)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -233,5 +269,4 @@ export default {
|
|||||||
.page ::v-deep .treebox {
|
.page ::v-deep .treebox {
|
||||||
height: inherit !important;
|
height: inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -68,7 +68,9 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.card >>> .el-card__body {
|
.card >>> .el-card__body {
|
||||||
padding: 0
|
padding: 0;
|
||||||
|
}
|
||||||
|
.el-card {
|
||||||
|
border: 0!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -103,6 +103,7 @@
|
|||||||
"NoSQLProtocol": "NoSQL Protocol"
|
"NoSQLProtocol": "NoSQL Protocol"
|
||||||
},
|
},
|
||||||
"assets": {
|
"assets": {
|
||||||
|
"AssetAddress": "IP/Host",
|
||||||
"sshkeyAccount": "ssh key account",
|
"sshkeyAccount": "ssh key account",
|
||||||
"passwordAccount": "Password account",
|
"passwordAccount": "Password account",
|
||||||
"SelectTemplate": "Select template",
|
"SelectTemplate": "Select template",
|
||||||
|
@ -108,6 +108,7 @@
|
|||||||
"NoSQLProtocol": "非リレーショナルデータベース"
|
"NoSQLProtocol": "非リレーショナルデータベース"
|
||||||
},
|
},
|
||||||
"assets": {
|
"assets": {
|
||||||
|
"AssetAddress": "IP/ホスト名",
|
||||||
"sshkeyAccount": "SSHキー",
|
"sshkeyAccount": "SSHキー",
|
||||||
"passwordAccount": "パスワード",
|
"passwordAccount": "パスワード",
|
||||||
"SelectTemplate": "テンプレートの選択",
|
"SelectTemplate": "テンプレートの選択",
|
||||||
|
@ -107,6 +107,7 @@
|
|||||||
"NoSQLProtocol": "非关系数据库"
|
"NoSQLProtocol": "非关系数据库"
|
||||||
},
|
},
|
||||||
"assets": {
|
"assets": {
|
||||||
|
"AssetAddress": "IP/主机名",
|
||||||
"sshkeyAccount": "密钥账号",
|
"sshkeyAccount": "密钥账号",
|
||||||
"passwordAccount": "密码账号",
|
"passwordAccount": "密码账号",
|
||||||
"Category": "类别",
|
"Category": "类别",
|
||||||
|
@ -59,7 +59,7 @@ export default {
|
|||||||
value: row.name
|
value: row.name
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: this.$t('assets.Address'),
|
key: this.$t('assets.AssetAddress'),
|
||||||
value: row.address
|
value: row.address
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -76,7 +76,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: this.$t('assets.Platform'),
|
key: this.$t('assets.Platform'),
|
||||||
value: row.platform
|
value: row.platform?.name || ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: this.$t('common.Active'),
|
key: this.$t('common.Active'),
|
||||||
|
Loading…
Reference in New Issue
Block a user