Skip to content

Commit

Permalink
perf: support change gateway platform
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Sep 4, 2024
1 parent 40bb841 commit 6176a3e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ export default {
BaseAssetCreateUpdate
},
data() {
const platformType = this.$route.query.platform_type
return {
url: '/api/v1/assets/gateways/',
updateInitial: async(initial) => {
const url = `/api/v1/assets/platforms/?name=Gateway`
const url = `/api/v1/assets/platforms/?name__startswith=Gateway`
const platform = await this.$axios.get(url)
initial.platform = parseInt(platform[0].id)
initial.domain = this.$route.query.domain
Expand All @@ -26,11 +25,10 @@ export default {
disabled: true
},
platform: {
disabled: true,
el: {
multiple: false,
ajax: {
url: `/api/v1/assets/platforms/?type=${platformType}`,
url: `/api/v1/assets/platforms/?name__startswith=Gateway`,
transformOption: (item) => {
return { label: item.name, value: item.id }
}
Expand Down

0 comments on commit 6176a3e

Please sign in to comment.