From 96a7a429e1ea9d3b6234950497e50f05db91d991 Mon Sep 17 00:00:00 2001 From: siddhikhapare <81567515+siddhikhapare@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:37:30 +0530 Subject: [PATCH] getCleanClusterName fixed (#78) --- pkg/dashboard/static/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/dashboard/static/scripts.js b/pkg/dashboard/static/scripts.js index 9d4a4bb..edd5990 100644 --- a/pkg/dashboard/static/scripts.js +++ b/pkg/dashboard/static/scripts.js @@ -129,11 +129,11 @@ function statusStyle(status, card, txt) { } } -function getCleanClusterName(rawClusterName) { +function getCleanClusterName(rawClusterName){ if (rawClusterName.indexOf('arn') === 0) { // AWS cluster const clusterSplit = rawClusterName.split(':') - const clusterName = clusterSplit.at(-1).split("/").at(-1) + const clusterName = clusterSplit.slice(-1)[0].replace('cluster/','') const region = clusterSplit.at(-3) return region + "/" + clusterName + ' [AWS]' }