mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +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
16
app/react/edge/edge-stacks/utils.ts
Normal file
16
app/react/edge/edge-stacks/utils.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
import { EnvironmentType } from '@/react/portainer/environments/types';
|
||||
|
||||
import { EditorType } from './types';
|
||||
|
||||
export function getValidEditorTypes(endpointTypes: EnvironmentType[]) {
|
||||
const right: Partial<Record<EnvironmentType, EditorType[]>> = {
|
||||
[EnvironmentType.EdgeAgentOnDocker]: [EditorType.Compose],
|
||||
[EnvironmentType.EdgeAgentOnKubernetes]: [EditorType.Kubernetes],
|
||||
};
|
||||
|
||||
return endpointTypes.length
|
||||
? _.intersection(...endpointTypes.map((type) => right[type]))
|
||||
: [EditorType.Compose, EditorType.Kubernetes];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue