From d3e01d9c162d5208bcd065c44f8b488236309f59 Mon Sep 17 00:00:00 2001 From: Aleix Date: Tue, 2 May 2023 12:32:34 +0200 Subject: [PATCH] fix: Show service badge for duplicated services (#1167) * fix: Show service badge for duplicated services --- catalog/helm/values.yaml | 2 +- catalog/ui/src/app/util.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog/helm/values.yaml b/catalog/helm/values.yaml index 1033ca880..6b176e6ff 100644 --- a/catalog/helm/values.yaml +++ b/catalog/helm/values.yaml @@ -34,7 +34,7 @@ ui: name: # default use chart name + '-ui' image: #override: - tag: v0.29.4 + tag: v0.29.5 repository: quay.io/redhat-gpte/babylon-catalog-ui pullPolicy: IfNotPresent replicaCount: 1 diff --git a/catalog/ui/src/app/util.ts b/catalog/ui/src/app/util.ts index 4ad3895d2..b802a1586 100644 --- a/catalog/ui/src/app/util.ts +++ b/catalog/ui/src/app/util.ts @@ -246,7 +246,7 @@ export function getStageFromK8sObject(k8sObject: K8sObject): 'dev' | 'test' | 'e if (!k8sObject) return null; const nameSplitted = k8sObject.metadata.name.split('.'); if (Array.isArray(nameSplitted) && nameSplitted.length > 0) { - const stage = nameSplitted[nameSplitted.length - 1]; + const stage = nameSplitted[nameSplitted.length - 1].split('-')[0]; const validStages = ['dev', 'test', 'event', 'prod']; if (validStages.includes(stage)) { return stage as 'dev' | 'test' | 'event' | 'prod';