This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.18 by this push:
new 65f57124f5d UI: ignore error when list public ips for CKS clusters on
Shared network (#8489)
65f57124f5d is described below
commit 65f57124f5dffa5e62302bd2fe5c59f2ab9578a5
Author: Wei Zhou <[email protected]>
AuthorDate: Tue Apr 23 15:12:57 2024 +0200
UI: ignore error when list public ips for CKS clusters on Shared network
(#8489)
---
ui/src/views/compute/KubernetesServiceTab.vue | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/ui/src/views/compute/KubernetesServiceTab.vue
b/ui/src/views/compute/KubernetesServiceTab.vue
index 96a99586db9..de5617cfcf1 100644
--- a/ui/src/views/compute/KubernetesServiceTab.vue
+++ b/ui/src/views/compute/KubernetesServiceTab.vue
@@ -204,7 +204,7 @@ export default {
virtualmachines: [],
vmColumns: [],
networkLoading: false,
- network: {},
+ network: null,
publicIpAddress: null,
currentTab: 'details',
cksSshStartingPort: 2222,
@@ -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,