mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
fix(edge stacks): allow viewing existing kompose stacks [EE-4967] (#8405)
Co-authored-by: testa113 <testa113> Co-authored-by: Matt Hook <hookenz@gmail.com>
This commit is contained in:
parent
53eb5aa1ee
commit
8574dd2371
7 changed files with 50 additions and 12 deletions
|
@ -4,10 +4,15 @@ import { EnvironmentType } from '@/react/portainer/environments/types';
|
|||
|
||||
import { EditorType } from './types';
|
||||
|
||||
export function getValidEditorTypes(endpointTypes: EnvironmentType[]) {
|
||||
export function getValidEditorTypes(
|
||||
endpointTypes: EnvironmentType[],
|
||||
allowKubeToSelectCompose?: boolean
|
||||
) {
|
||||
const right: Partial<Record<EnvironmentType, EditorType[]>> = {
|
||||
[EnvironmentType.EdgeAgentOnDocker]: [EditorType.Compose],
|
||||
[EnvironmentType.EdgeAgentOnKubernetes]: [EditorType.Kubernetes],
|
||||
[EnvironmentType.EdgeAgentOnKubernetes]: allowKubeToSelectCompose
|
||||
? [EditorType.Kubernetes, EditorType.Compose]
|
||||
: [EditorType.Kubernetes],
|
||||
};
|
||||
|
||||
return endpointTypes.length
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue