mirror of https://github.com/portainer/portainer
refactor(app): migrate deployment type section [EE-6237] (#10704)
Co-authored-by: testa113 <testa113>pull/10705/head
parent
947ba4940b
commit
58da51f767
@ -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>
|
||||
);
|
||||
}
|
@ -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"
|
||||
/>
|
||||
);
|
||||
}
|
Loading…
Reference in new issue