mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 22:36:23 +00:00
fix(applications): 修复更新数据库页面不对的问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<GenericDetailPage :object.sync="DatabaseApp" :active-menu.sync="config.activeMenu" v-bind="config" v-on="$listeners">
|
||||
<GenericDetailPage :object.sync="app" :active-menu.sync="config.activeMenu" v-bind="config" v-on="$listeners">
|
||||
<keep-alive>
|
||||
<component :is="config.activeMenu" :object="DatabaseApp" />
|
||||
<component :is="config.activeMenu" :object="app" />
|
||||
</keep-alive>
|
||||
</GenericDetailPage>
|
||||
</template>
|
||||
@@ -18,7 +18,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
DatabaseApp: {
|
||||
app: {
|
||||
name: '', get_type_display: '', host: '', port: '', database: '', date_created: '', created_by: '', comment: '', attrs: ''
|
||||
},
|
||||
config: {
|
||||
@@ -31,7 +31,10 @@ export default {
|
||||
],
|
||||
actions: {
|
||||
detailApiUrl: `/api/v1/applications/applications/${this.$route.params.id}/`,
|
||||
deleteApiUrl: `/api/v1/applications/applications/${this.$route.params.id}/`
|
||||
deleteApiUrl: `/api/v1/applications/applications/${this.$route.params.id}/`,
|
||||
updateCallback: (item) => {
|
||||
this.$router.push({ name: 'DatabaseAppUpdate', params: { id: this.app.id }, query: { type: this.app.type }})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -11,7 +11,6 @@ import DetailCard from '@/components/DetailCard'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
name: 'DatabaseAppDetail',
|
||||
components: {
|
||||
DetailCard
|
||||
},
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<GenericDetailPage :object.sync="KubernetesApp" :active-menu.sync="config.activeMenu" v-bind="config" v-on="$listeners">
|
||||
<GenericDetailPage :object.sync="app" :active-menu.sync="config.activeMenu" v-bind="config" v-on="$listeners">
|
||||
<keep-alive>
|
||||
<component :is="config.activeMenu" :object="KubernetesApp" />
|
||||
<component :is="config.activeMenu" :object="app" />
|
||||
</keep-alive>
|
||||
</GenericDetailPage>
|
||||
</template>
|
||||
@@ -18,7 +18,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
KubernetesApp: {
|
||||
app: {
|
||||
name: '', type_display: '', cluster: '', date_created: '', created_by: '', comment: '', attrs: ''
|
||||
},
|
||||
config: {
|
||||
@@ -31,7 +31,10 @@ export default {
|
||||
],
|
||||
actions: {
|
||||
detailApiUrl: `/api/v1/applications/applications/${this.$route.params.id}/`,
|
||||
deleteApiUrl: `/api/v1/applications/applications/${this.$route.params.id}/`
|
||||
deleteApiUrl: `/api/v1/applications/applications/${this.$route.params.id}/`,
|
||||
updateCallback: (item) => {
|
||||
this.$router.push({ name: 'KubernetesAppUpdate', params: { id: this.app.id }, query: { type: this.app.type }})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -12,7 +12,6 @@ import DetailCard from '@/components/DetailCard'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
name: 'RemoteAppDetail',
|
||||
components: {
|
||||
DetailCard
|
||||
},
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<GenericDetailPage :object.sync="RemoteApp" :active-menu.sync="config.activeMenu" v-bind="config" v-on="$listeners">
|
||||
<GenericDetailPage :object.sync="app" :active-menu.sync="config.activeMenu" v-bind="config" v-on="$listeners">
|
||||
<keep-alive>
|
||||
<component :is="config.activeMenu" :object="RemoteApp" />
|
||||
<component :is="config.activeMenu" :object="app" />
|
||||
</keep-alive>
|
||||
</GenericDetailPage>
|
||||
</template>
|
||||
@@ -17,9 +17,8 @@ export default {
|
||||
TabPage
|
||||
},
|
||||
data() {
|
||||
const vm = this
|
||||
return {
|
||||
RemoteApp: {
|
||||
app: {
|
||||
name: '', asset: '', get_type_display: '', path: '', date_created: '', created_by: '', comment: '', attrs: ''
|
||||
},
|
||||
config: {
|
||||
@@ -33,8 +32,8 @@ export default {
|
||||
actions: {
|
||||
detailApiUrl: `/api/v1/applications/applications/${this.$route.params.id}/`,
|
||||
deleteApiUrl: `/api/v1/applications/applications/${this.$route.params.id}/`,
|
||||
updateCallback: function(item) {
|
||||
vm.$router.push({ name: 'RemoteAppUpdate', params: { id: vm.RemoteApp.id }, query: { type: vm.RemoteApp.type }})
|
||||
updateCallback: (item) => {
|
||||
this.$router.push({ name: 'RemoteAppUpdate', params: { id: this.app.id }, query: { type: this.app.type }})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user