From 3b1a4f6ff69b37b111bb47619303e053420c1c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bonnet?= Date: Mon, 2 Sep 2024 16:39:08 +0200 Subject: [PATCH] fix(port-modal): callout if demo cluster only (#1626) --- .../crud-modal-feature/crud-modal-feature.tsx | 1 + .../src/lib/flow-create-port/ui/crud-modal/crud-modal.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/pages/application/src/lib/feature/page-settings-ports-feature/crud-modal-feature/crud-modal-feature.tsx b/libs/pages/application/src/lib/feature/page-settings-ports-feature/crud-modal-feature/crud-modal-feature.tsx index fe5d2338001..b5f754b72ea 100644 --- a/libs/pages/application/src/lib/feature/page-settings-ports-feature/crud-modal-feature/crud-modal-feature.tsx +++ b/libs/pages/application/src/lib/feature/page-settings-ports-feature/crud-modal-feature/crud-modal-feature.tsx @@ -193,6 +193,7 @@ export function CrudModalFeature({ service, onClose, port }: CrudModalFeaturePro kubernetes={cluster?.kubernetes} currentProtocol={port?.protocol} isEdit={!!port} + isDemo={cluster?.is_demo} isMatchingHealthCheck={isMatchingHealthCheck(port, livenessType) || isMatchingHealthCheck(port, readinessType)} loading={isLoadingEditService} onClose={onClose} diff --git a/libs/shared/console-shared/src/lib/flow-create-port/ui/crud-modal/crud-modal.tsx b/libs/shared/console-shared/src/lib/flow-create-port/ui/crud-modal/crud-modal.tsx index b0ec5d08cc9..38b0366ef6d 100644 --- a/libs/shared/console-shared/src/lib/flow-create-port/ui/crud-modal/crud-modal.tsx +++ b/libs/shared/console-shared/src/lib/flow-create-port/ui/crud-modal/crud-modal.tsx @@ -9,6 +9,7 @@ export interface CrudModalProps { cloudProvider?: CloudProviderEnum currentProtocol?: PortProtocolEnum isEdit?: boolean + isDemo?: boolean isMatchingHealthCheck?: boolean loading?: boolean hidePortName?: boolean @@ -26,6 +27,7 @@ export function CrudModal({ onClose, onSubmit, hidePortName, + isDemo, }: CrudModalProps) { const { control, watch, setValue } = useFormContext() @@ -163,7 +165,7 @@ export function CrudModal({ )} /> - {watchPublicly && kubernetes === 'SELF_MANAGED' && cloudProvider === 'ON_PREMISE' && ( + {watchPublicly && kubernetes === 'SELF_MANAGED' && cloudProvider === 'ON_PREMISE' && isDemo && (