Skip to content

Commit

Permalink
fix(port-modal): callout if demo cluster only (#1626)
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiBonnet authored Sep 2, 2024
1 parent 6ff5f6e commit 3b1a4f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface CrudModalProps {
cloudProvider?: CloudProviderEnum
currentProtocol?: PortProtocolEnum
isEdit?: boolean
isDemo?: boolean
isMatchingHealthCheck?: boolean
loading?: boolean
hidePortName?: boolean
Expand All @@ -26,6 +27,7 @@ export function CrudModal({
onClose,
onSubmit,
hidePortName,
isDemo,
}: CrudModalProps) {
const { control, watch, setValue } = useFormContext()

Expand Down Expand Up @@ -163,7 +165,7 @@ export function CrudModal({
</div>
)}
/>
{watchPublicly && kubernetes === 'SELF_MANAGED' && cloudProvider === 'ON_PREMISE' && (
{watchPublicly && kubernetes === 'SELF_MANAGED' && cloudProvider === 'ON_PREMISE' && isDemo && (
<Callout.Root color="sky" className="mb-5">
<Callout.Icon>
<Icon iconName="circle-info" iconStyle="light" />
Expand Down

0 comments on commit 3b1a4f6

Please sign in to comment.