1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 23:09:41 +02:00

refactor(app): migrate deployment type section [EE-6237] (#10704)

Co-authored-by: testa113 <testa113>
This commit is contained in:
Ali 2024-01-03 10:04:08 +13:00 committed by GitHub
parent 947ba4940b
commit 58da51f767
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 38 deletions

View file

@ -0,0 +1,34 @@
import { BoxSelector } from '@@/BoxSelector';
import { FormSection } from '@@/form-components/FormSection';
import { TextTip } from '@@/Tip/TextTip';
import { getDeploymentOptions } from './deploymentOptions';
interface Props {
value: number;
onChange(value: number): void;
supportGlobalDeployment: boolean;
}
export function AppDeploymentTypeFormSection({
supportGlobalDeployment,
value,
onChange,
}: Props) {
const options = getDeploymentOptions(supportGlobalDeployment);
return (
<FormSection title="Deployment">
<TextTip color="blue">
Select how you want to deploy your application inside the cluster.
</TextTip>
<BoxSelector
slim
options={options}
value={value}
onChange={onChange}
radioName="deploymentType"
/>
</FormSection>
);
}

View file

@ -1,27 +0,0 @@
import { BoxSelector } from '@@/BoxSelector';
import { getDeploymentOptions } from './deploymentOptions';
interface Props {
value: number;
onChange(value: number): void;
supportGlobalDeployment: boolean;
}
export function KubeApplicationDeploymentTypeSelector({
supportGlobalDeployment,
value,
onChange,
}: Props) {
const options = getDeploymentOptions(supportGlobalDeployment);
return (
<BoxSelector
slim
options={options}
value={value}
onChange={onChange}
radioName="deploymentType"
/>
);
}