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