From a6e9aec769f316ff693f1d97a0bf9ce42605327b Mon Sep 17 00:00:00 2001 From: Henrique Sato Date: Thu, 7 Nov 2024 06:12:15 -0300 Subject: [PATCH] Fix Kubernetes cluster listing when user is unable to scale (#9867) Co-authored-by: Henrique Sato --- ui/src/config/section/compute.js | 2 +- ui/src/views/compute/KubernetesServiceTab.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js index 2570d8a2651..37bccf86758 100644 --- a/ui/src/config/section/compute.js +++ b/ui/src/config/section/compute.js @@ -537,7 +537,7 @@ export default { if (store.listAllProjects) { fields.push('project') } - if (store.apis.scaleKubernetesCluster.params.filter(x => x.name === 'autoscalingenabled').length > 0) { + if (store.apis.scaleKubernetesCluster?.params?.filter(x => x.name === 'autoscalingenabled').length > 0) { fields.splice(2, 0, 'autoscalingenabled') } fields.push('zonename') diff --git a/ui/src/views/compute/KubernetesServiceTab.vue b/ui/src/views/compute/KubernetesServiceTab.vue index c2e8891b9a0..4e0a76f8d31 100644 --- a/ui/src/views/compute/KubernetesServiceTab.vue +++ b/ui/src/views/compute/KubernetesServiceTab.vue @@ -278,7 +278,7 @@ export default { } }, mounted () { - if (this.$store.getters.apis.scaleKubernetesCluster.params.filter(x => x.name === 'nodeids').length > 0 && this.resource.clustertype === 'CloudManaged') { + if (this.$store.getters.apis.scaleKubernetesCluster?.params?.filter(x => x.name === 'nodeids').length > 0 && this.resource.clustertype === 'CloudManaged') { this.vmColumns.push({ key: 'actions', title: this.$t('label.actions'),