import { useFormikContext, Field } from 'formik'; import { GroupField } from '@/react/portainer/environments/wizard/EnvironmentsCreationView/shared/MetadataFieldset/GroupsField'; import { FormControl } from '@@/form-components/FormControl'; import { Input } from '@@/form-components/Input'; import { SwitchField } from '@@/form-components/SwitchField'; import { TextTip } from '@@/Tip/TextTip'; import { TagSelector } from '@@/TagSelector'; import { EdgeGroupsSelector } from '../../edge-stacks/components/EdgeGroupsSelector'; import { ScriptFormValues } from './types'; interface Props { hideIdGetter?: boolean; showMetaFields?: boolean; } export function EdgeScriptSettingsFieldset({ hideIdGetter, showMetaFields, }: Props) { const { values, setFieldValue, errors } = useFormikContext(); return ( <> {showMetaFields && ( <> setFieldValue('edgeGroupsIds', value)} isGroupVisible={(group) => !group.Dynamic} horizontal /> setFieldValue('tagsIds', value)} /> )} {!hideIdGetter && ( <> setFieldValue(e.target.name, e.target.value)} />
PORTAINER_EDGE_ID environment variable is required to successfully connect the edge agent to Portainer
)}
setFieldValue('allowSelfSignedCertificates', value) } label="Allow self-signed certs" labelClass="col-sm-3 col-lg-2" tooltip="When allowing self-signed certificates the edge agent will ignore the domain validation when connecting to Portainer via HTTPS" />
); }