From dd64c7709cee608b6d6ab82f90c49a01ea3635da Mon Sep 17 00:00:00 2001 From: davidjumani Date: Tue, 20 Oct 2020 16:05:43 +0530 Subject: [PATCH] kubernetesservicetab: Selecting the right ip (#800) Signed-off-by: Rohit Yadav --- ui/src/views/compute/KubernetesServiceTab.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ui/src/views/compute/KubernetesServiceTab.vue b/ui/src/views/compute/KubernetesServiceTab.vue index 869dc033c5e..d78775ef778 100644 --- a/ui/src/views/compute/KubernetesServiceTab.vue +++ b/ui/src/views/compute/KubernetesServiceTab.vue @@ -108,13 +108,13 @@ - + - + - + @@ -327,14 +327,15 @@ export default { this.resource.projectid !== '') { params.projectid = this.resource.projectid } - if (this.isValidValueForKey(this.resource, 'associatednetworkid')) { - params.associatednetworkid = this.resource.associatednetworkid + if (this.isValidValueForKey(this.resource, 'networkid')) { + params.associatednetworkid = this.resource.networkid } } api('listPublicIpAddresses', params).then(json => { - const ips = json.listpublicipaddressesresponse.publicipaddress + let ips = json.listpublicipaddressesresponse.publicipaddress if (this.arrayHasItems(ips)) { - this.publicIpAddress = ips[0] + ips = ips.filter(x => x.issourcenat) + this.publicIpAddress = ips.length > 0 ? ips[0] : null } }).catch(error => { this.$notifyError(error)