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