mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
chore(kompose): remove from settings [EE-4741] (#8375)
This commit is contained in:
parent
00bbf4ac63
commit
5640cce4d6
25 changed files with 237 additions and 238 deletions
|
@ -0,0 +1,55 @@
|
|||
import { EditorType } from '@/react/edge/edge-stacks/types';
|
||||
|
||||
import { BoxSelector } from '@@/BoxSelector';
|
||||
import { BoxSelectorOption } from '@@/BoxSelector/types';
|
||||
import {
|
||||
compose,
|
||||
kubernetes,
|
||||
} from '@@/BoxSelector/common-options/deployment-methods';
|
||||
|
||||
interface Props {
|
||||
value: number;
|
||||
onChange(value: number): void;
|
||||
hasDockerEndpoint: boolean;
|
||||
hasKubeEndpoint: boolean;
|
||||
}
|
||||
|
||||
export function EdgeStackDeploymentTypeSelector({
|
||||
value,
|
||||
onChange,
|
||||
hasDockerEndpoint,
|
||||
hasKubeEndpoint,
|
||||
}: Props) {
|
||||
const deploymentOptions: BoxSelectorOption<number>[] = [
|
||||
{
|
||||
...compose,
|
||||
value: EditorType.Compose,
|
||||
disabled: () => hasKubeEndpoint,
|
||||
tooltip: () =>
|
||||
hasKubeEndpoint
|
||||
? 'Cannot use this option with Edge Kubernetes environments'
|
||||
: '',
|
||||
},
|
||||
{
|
||||
...kubernetes,
|
||||
value: EditorType.Kubernetes,
|
||||
disabled: () => hasDockerEndpoint,
|
||||
tooltip: () =>
|
||||
hasDockerEndpoint
|
||||
? 'Cannot use this option with Edge Docker environments'
|
||||
: '',
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="col-sm-12 form-section-title"> Deployment type</div>
|
||||
<BoxSelector
|
||||
radioName="deploymentType"
|
||||
value={value}
|
||||
options={deploymentOptions}
|
||||
onChange={onChange}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue