Skip to content

Commit

Permalink
feat: add badge for overriden channel (#3090)
Browse files Browse the repository at this point in the history
* feat: add badge for overriden channel

* fix: move beta to translations

* feat: adjust UX change
  • Loading branch information
mrCherry97 authored Jul 22, 2024
1 parent f64157c commit 1e466ba
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
4 changes: 3 additions & 1 deletion public/i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/components/KymaModules/KymaModulesAddModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export default function KymaModulesAddModule(props) {
hideCloseButton
style={spacing.sapUiSmallMarginTop}
>
{t('kyma-modules.beta')}
{t('kyma-modules.beta-alert')}
</MessageStrip>
) : null}
{renderCards()}
Expand Down
29 changes: 27 additions & 2 deletions src/components/KymaModules/KymaModulesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -190,13 +197,31 @@ export function KymaModulesList(props) {
resource?.channel || kymaResource?.spec?.channel,
),
) ? (
<Badge style={spacing.sapUiTinyMarginBegin}>Beta</Badge>
<Badge style={spacing.sapUiTinyMarginBegin}>
{t('kyma-modules.beta')}
</Badge>
) : null}
</>,
// Namespace
moduleStatus?.resource?.metadata?.namespace || EMPTY_TEXT_PLACEHOLDER,
// Channel
moduleStatus?.channel || EMPTY_TEXT_PLACEHOLDER,
<>
{moduleStatus?.channel
? moduleStatus?.channel
: EMPTY_TEXT_PLACEHOLDER}
{isChannelOverriden ? (
<Badge
hideStateIcon
design="Set2"
colorScheme="5"
style={spacing.sapUiTinyMarginBegin}
>
{t('kyma-modules.channel-overridden')}
</Badge>
) : (
''
)}
</>,
// Version
moduleStatus?.version || EMPTY_TEXT_PLACEHOLDER,
// State
Expand Down

0 comments on commit 1e466ba

Please sign in to comment.