From 1e466ba17d103ebb5467a02177e69738f17ae55d Mon Sep 17 00:00:00 2001 From: Mateusz Wisniewski Date: Mon, 22 Jul 2024 11:48:40 +0200 Subject: [PATCH] feat: add badge for overriden channel (#3090) * feat: add badge for overriden channel * fix: move beta to translations * feat: adjust UX change --- public/i18n/en.yaml | 4 ++- .../KymaModules/KymaModulesAddModule.js | 2 +- src/components/KymaModules/KymaModulesList.js | 29 +++++++++++++++++-- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/public/i18n/en.yaml b/public/i18n/en.yaml index 895c2b9e75..51b04f9bab 100644 --- a/public/i18n/en.yaml +++ b/public/i18n/en.yaml @@ -966,7 +966,9 @@ kyma-modules: state: State documentation: Documentation no-version: No version available - beta: "CAUTION: The Service Level Agreements (SLAs) and Support obligations do not apply to Beta modules and functionalities. If Beta modules or functionalities directly or indirectly affect other modules, the Service Level Agreements and Support for these modules are limited to priority levels P3 (Medium) or P4 (Low). Thus, Beta releases are not intended for use in customer production environments." + channel-overridden: Overridden + beta: Beta + beta-alert: "CAUTION: The Service Level Agreements (SLAs) and Support obligations do not apply to Beta modules and functionalities. If Beta modules or functionalities directly or indirectly affect other modules, the Service Level Agreements and Support for these modules are limited to priority levels P3 (Medium) or P4 (Low). Thus, Beta releases are not intended for use in customer production environments." legal: copyright: Copyright legal-disclosure: Legal Disclosure diff --git a/src/components/KymaModules/KymaModulesAddModule.js b/src/components/KymaModules/KymaModulesAddModule.js index 7d7f2913f9..772715f724 100644 --- a/src/components/KymaModules/KymaModulesAddModule.js +++ b/src/components/KymaModules/KymaModulesAddModule.js @@ -272,7 +272,7 @@ export default function KymaModulesAddModule(props) { hideCloseButton style={spacing.sapUiSmallMarginTop} > - {t('kyma-modules.beta')} + {t('kyma-modules.beta-alert')} ) : null} {renderCards()} diff --git a/src/components/KymaModules/KymaModulesList.js b/src/components/KymaModules/KymaModulesList.js index b4e37a60ad..d7cf5b6e75 100644 --- a/src/components/KymaModules/KymaModulesList.js +++ b/src/components/KymaModules/KymaModulesList.js @@ -173,6 +173,13 @@ export function KymaModulesList(props) { const rowRenderer = resource => { const moduleStatus = findStatus(resource.name); const showDetailsLink = hasDetailsLink(resource); + const moduleIndex = kymaResource?.spec?.modules?.findIndex( + kymaResourceModule => { + return kymaResourceModule?.name === resource?.name; + }, + ); + const isChannelOverriden = + kymaResource?.spec?.modules[moduleIndex]?.channel !== undefined; return [ // Name @@ -190,13 +197,31 @@ export function KymaModulesList(props) { resource?.channel || kymaResource?.spec?.channel, ), ) ? ( - Beta + + {t('kyma-modules.beta')} + ) : null} , // Namespace moduleStatus?.resource?.metadata?.namespace || EMPTY_TEXT_PLACEHOLDER, // Channel - moduleStatus?.channel || EMPTY_TEXT_PLACEHOLDER, + <> + {moduleStatus?.channel + ? moduleStatus?.channel + : EMPTY_TEXT_PLACEHOLDER} + {isChannelOverriden ? ( + + {t('kyma-modules.channel-overridden')} + + ) : ( + '' + )} + , // Version moduleStatus?.version || EMPTY_TEXT_PLACEHOLDER, // State