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]' }