mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-18 08:12:33 +00:00
perf:修改冲突
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<Dialog
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
:visible.sync="iVisible"
|
||||
:destroy-on-close="true"
|
||||
:show-cancel="false"
|
||||
:show-confirm="false"
|
||||
:title="$tc('assets.AddAccount')"
|
||||
:visible.sync="iVisible"
|
||||
:close-on-click-modal="false"
|
||||
v-bind="$attrs"
|
||||
width="70%"
|
||||
v-on="$listeners"
|
||||
@@ -42,6 +42,12 @@ export default {
|
||||
account: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return this.$t('assets.AddAccount')
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@@ -18,6 +18,7 @@
|
||||
:visible.sync="showAddDialog"
|
||||
:asset="iAsset"
|
||||
:account="account"
|
||||
:title="accountCreateUpdateTitle"
|
||||
@add="addAccountSuccess"
|
||||
/>
|
||||
</div>
|
||||
@@ -98,6 +99,7 @@ export default {
|
||||
showViewSecretDialog: false,
|
||||
showUpdateSecretDialog: false,
|
||||
showAddDialog: false,
|
||||
accountCreateUpdateTitle: this.$t('assets.AddAccount'),
|
||||
iAsset: this.asset,
|
||||
account: {},
|
||||
secretUrl: '',
|
||||
@@ -225,6 +227,7 @@ export default {
|
||||
vm.account = row
|
||||
vm.iAsset = row.asset
|
||||
vm.showAddDialog = false
|
||||
vm.accountCreateUpdateTitle = this.$t('assets.UpdateAccount')
|
||||
setTimeout(() => {
|
||||
vm.showAddDialog = true
|
||||
})
|
||||
@@ -246,6 +249,10 @@ export default {
|
||||
url: this.exportUrl,
|
||||
mfaVerifyRequired: true
|
||||
},
|
||||
importOptions: {
|
||||
canImportCreate: this.$hasPerm('accounts.add_account'),
|
||||
canImportUpdate: this.$hasPerm('accounts.change_account')
|
||||
},
|
||||
extraActions: [
|
||||
{
|
||||
name: 'add',
|
||||
@@ -257,6 +264,7 @@ export default {
|
||||
callback: async() => {
|
||||
await this.getAssetDetail()
|
||||
setTimeout(() => {
|
||||
vm.accountCreateUpdateTitle = this.$t('assets.AddAccount')
|
||||
vm.showAddDialog = true
|
||||
})
|
||||
}
|
||||
|
@@ -125,6 +125,7 @@
|
||||
"CloudPlatform": "Cloud platform",
|
||||
"RecentlyUsed": "Recently used",
|
||||
"AddAccount": "Add account",
|
||||
"UpdateAccount": "Update account",
|
||||
"Account": "Account",
|
||||
"Defaults": "Default",
|
||||
"CreateDatabase": "Create asset - Database",
|
||||
|
@@ -126,6 +126,7 @@
|
||||
"CloudPlatform": "クラウドプラットフォーム",
|
||||
"RecentlyUsed": "最近使われる",
|
||||
"AddAccount": "アカウントの追加",
|
||||
"UpdateAccount": "アカウントの更新",
|
||||
"Account": "アカウント",
|
||||
"Defaults": "デフォルト値",
|
||||
"CreateDatabase": "資産の作成 - データベース",
|
||||
|
@@ -227,6 +227,7 @@
|
||||
"CloudPlatform": "云平台",
|
||||
"RecentlyUsed": "最近使用",
|
||||
"AddAccount": "添加账号",
|
||||
"UpdateAccount": "更新账号",
|
||||
"Account": "账号",
|
||||
"Defaults": "默认值",
|
||||
"CreateDatabase": "创建资产-数据库",
|
||||
|
@@ -2,7 +2,8 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="14" :sm="24">
|
||||
<AutoDetailCard v-bind="detailBasicConfig" />
|
||||
<AutoDetailCard v-if="detailSpecificConfig.show" v-bind="detailSpecificConfig" />
|
||||
<AutoDetailCard v-if="detailSpecInfoConfig.show" v-bind="detailSpecInfoConfig" />
|
||||
<AutoDetailCard v-if="detailInfoConfig.show" v-bind="detailInfoConfig" />
|
||||
</el-col>
|
||||
<el-col :md="10" :sm="24">
|
||||
<QuickActions :actions="quickActions" type="primary" />
|
||||
@@ -172,13 +173,20 @@ export default {
|
||||
'is_active', 'date_created', 'created_by', 'comment'
|
||||
]
|
||||
},
|
||||
detailSpecificConfig: {
|
||||
detailSpecInfoConfig: {
|
||||
show: Object.keys(this.object['spec_info']).length > 0,
|
||||
title: this.$t('common.SpecificInfo'),
|
||||
url: `/api/v1/assets/assets/${this.object.id}/spec-info/`,
|
||||
object: this.object.spec_info,
|
||||
showUndefine: false,
|
||||
excludes: ['spec_info.script']
|
||||
},
|
||||
detailInfoConfig: {
|
||||
show: this.object.category.value === 'host' && Object.keys(this.object['info']).length > 0,
|
||||
url: `/api/v1/assets/hosts/${this.object.id}/info/`,
|
||||
title: this.$t('assets.HardwareInfo'),
|
||||
object: this.object.info,
|
||||
showUndefine: false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@@ -23,7 +23,7 @@ export default {
|
||||
return {
|
||||
url: `/api/v1/ops/playbooks/${this.object.id}/`,
|
||||
excludes: [
|
||||
'path'
|
||||
'path', 'create_method', 'vcs_url'
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@@ -2,7 +2,8 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :md="14" :sm="24">
|
||||
<IBox title="README">
|
||||
<vue-markdown :source="object.readme" />
|
||||
<vue-markdown v-if="object.readme" :source="object.readme" />
|
||||
<span v-else>{{ $tc('common.NoData') }}</span>
|
||||
</IBox>
|
||||
</el-col>
|
||||
<el-col :md="10" :sm="24">
|
||||
|
@@ -59,7 +59,7 @@ export default {
|
||||
deleteSuccessRoute: 'Applets',
|
||||
updateCallback: () => {
|
||||
this.$router.push({
|
||||
name: 'Applets',
|
||||
name: 'AppletHostUpdate',
|
||||
params: { id: this.$route.params.id },
|
||||
query: { platform: this.host.platform.id }
|
||||
})
|
||||
|
Reference in New Issue
Block a user