2024-01-05 02:42:36 +00:00
|
|
|
import {
|
|
|
|
EnvVarValues,
|
|
|
|
EnvironmentVariablesPanel,
|
|
|
|
} from '@@/form-components/EnvironmentVariablesFieldset';
|
2023-09-21 01:11:18 +00:00
|
|
|
import { ArrayError } from '@@/form-components/InputList/InputList';
|
|
|
|
|
|
|
|
export function EnvVarsTab({
|
2023-10-19 11:45:50 +00:00
|
|
|
values,
|
2023-09-21 01:11:18 +00:00
|
|
|
onChange,
|
|
|
|
errors,
|
|
|
|
}: {
|
2024-01-05 02:42:36 +00:00
|
|
|
values: EnvVarValues;
|
|
|
|
onChange(value: EnvVarValues): void;
|
|
|
|
errors?: ArrayError<EnvVarValues>;
|
2023-09-21 01:11:18 +00:00
|
|
|
}) {
|
|
|
|
return (
|
2023-10-19 11:45:50 +00:00
|
|
|
<div className="form-group">
|
|
|
|
<EnvironmentVariablesPanel
|
|
|
|
values={values}
|
|
|
|
explanation="These values will be applied to the container when deployed"
|
|
|
|
onChange={handleChange}
|
|
|
|
errors={errors}
|
|
|
|
/>
|
|
|
|
</div>
|
2023-09-21 01:11:18 +00:00
|
|
|
);
|
|
|
|
|
2024-01-05 02:42:36 +00:00
|
|
|
function handleChange(values: EnvVarValues) {
|
2023-09-21 01:11:18 +00:00
|
|
|
onChange(values);
|
|
|
|
}
|
|
|
|
}
|