1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

feat(edge/stacks): add app templates to deploy types [EE-6632] (#11040)

This commit is contained in:
Chaim Lev-Ari 2024-02-15 09:01:01 +02:00 committed by GitHub
parent 31f5b42962
commit 437831fa80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 1293 additions and 482 deletions

View file

@ -0,0 +1,30 @@
import { FormikErrors } from 'formik';
import { TemplateViewModel } from '@/react/portainer/templates/app-templates/view-model';
import { EnvVarsFieldset } from './EnvVarsFieldset';
import { TemplateNote } from './TemplateNote';
export function AppTemplateFieldset({
template,
values,
onChange,
errors,
}: {
template: TemplateViewModel;
values: Record<string, string>;
onChange: (value: Record<string, string>) => void;
errors?: FormikErrors<Record<string, string>>;
}) {
return (
<>
<TemplateNote note={template.Note} />
<EnvVarsFieldset
options={template.Env || []}
value={values}
onChange={onChange}
errors={errors}
/>
</>
);
}