Skip to content

Commit

Permalink
Update 8489 UI: ignore Shared network when fetch public IPs for CKS
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhouapache committed Apr 18, 2024
1 parent 6ae57f3 commit 4b59441
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions ui/src/views/compute/KubernetesServiceTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export default {
virtualmachines: [],
vmColumns: [],
networkLoading: false,
network: {},
network: null,
publicIpAddress: null,
currentTab: 'details',
cksSshStartingPort: 2222,
Expand Down Expand Up @@ -382,7 +382,27 @@ export default {
this.virtualmachines.map(x => { x.ipaddress = x.nic[0].ipaddress })
this.instanceLoading = false
},
fetchPublicIpAddress () {
fetchNetwork () {
this.networkLoading = true
return new Promise((resolve, reject) => {
api('listNetworks', {
listAll: true,
id: this.resource.networkid
}).then(json => {
const networks = json.listnetworksresponse.network
if (this.arrayHasItems(networks)) {
this.network = networks[0]
}
})
this.networkLoading = false
})
},
async fetchPublicIpAddress () {
await this.fetchNetwork()
if (this.network && this.network.type === 'Shared') {
this.publicIpAddress = null
return
}
this.networkLoading = true
var params = {
listAll: true,
Expand Down

0 comments on commit 4b59441

Please sign in to comment.