mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-11 19:41:55 +00:00
perf: support change gateway platform
This commit is contained in:
parent
5fcfecc060
commit
7b9627a80b
@ -11,11 +11,10 @@ export default {
|
|||||||
BaseAssetCreateUpdate
|
BaseAssetCreateUpdate
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const platformType = this.$route.query.platform_type
|
|
||||||
return {
|
return {
|
||||||
url: '/api/v1/assets/gateways/',
|
url: '/api/v1/assets/gateways/',
|
||||||
updateInitial: async(initial) => {
|
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)
|
const platform = await this.$axios.get(url)
|
||||||
initial.platform = parseInt(platform[0].id)
|
initial.platform = parseInt(platform[0].id)
|
||||||
initial.domain = this.$route.query.domain
|
initial.domain = this.$route.query.domain
|
||||||
@ -26,11 +25,10 @@ export default {
|
|||||||
disabled: true
|
disabled: true
|
||||||
},
|
},
|
||||||
platform: {
|
platform: {
|
||||||
disabled: true,
|
|
||||||
el: {
|
el: {
|
||||||
multiple: false,
|
multiple: false,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: `/api/v1/assets/platforms/?type=${platformType}`,
|
url: `/api/v1/assets/platforms/?name__startswith=Gateway`,
|
||||||
transformOption: (item) => {
|
transformOption: (item) => {
|
||||||
return { label: item.name, value: item.id }
|
return { label: item.name, value: item.id }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user