portainer/app/react/docker/containers/CreateView/EnvVarsTab/toViewModel.ts

12 lines
319 B
TypeScript

import { parseArrayOfStrings } from '@@/form-components/EnvironmentVariablesFieldset/utils';
import { ContainerJSON } from '../../queries/container';
export function getDefaultViewModel() {
return [];
}
export function toViewModel(container: ContainerJSON) {
return parseArrayOfStrings(container.Config?.Env);
}