mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
getCleanClusterName fixed (#78)
This commit is contained in:
@@ -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]'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user