+
) => void;
isEditing?: boolean;
+ hideEdgeConfigs?: boolean;
}
export function RelativePathFieldset({
@@ -24,6 +26,7 @@ export function RelativePathFieldset({
gitModel,
onChange,
isEditing,
+ hideEdgeConfigs,
}: Props) {
const innerOnChange = useCallback(
(value: Partial) => onChange && onChange(value),
@@ -32,6 +35,15 @@ export function RelativePathFieldset({
const { errors } = useValidation(value);
+ const { enableFsPath0, enableFsPath1, toggleFsPath } = useEnableFsPath();
+
+ const pathTip0 =
+ 'For relative path volumes use with Docker Swarm, you must have a network filesystem which all of your nodes can access.';
+ const pathTip1 =
+ 'Relative path is active. When you set the ‘local filesystem path’, it will also be utilzed for GitOps Edge configuration.';
+ const pathTip2 =
+ 'GitOps Edge configurations is active. When you set the ‘local filesystem path’, it will also be utilized for relative paths.';
+
return (
<>
@@ -43,7 +55,10 @@ export function RelativePathFieldset({
tooltip="Enabling this means you can specify relative path volumes in your Compose files, with Portainer pulling the content from your git repository to the environment the stack is deployed to."
disabled={isEditing}
checked={value.SupportRelativePath}
- onChange={(value) => innerOnChange({ SupportRelativePath: value })}
+ onChange={(value) => {
+ toggleFsPath(0, value);
+ innerOnChange({ SupportRelativePath: value });
+ }}
/>
@@ -53,8 +68,7 @@ export function RelativePathFieldset({
- For relative path volumes use with Docker Swarm, you must have a
- network filesystem which all of your nodes can access.
+ {enableFsPath1 ? pathTip2 : pathTip0}
@@ -96,15 +114,47 @@ export function RelativePathFieldset({
tooltip="By enabling the GitOps Edge Configurations feature, you gain the ability to define relative path volumes in your configuration files. Portainer will then automatically fetch the content from your git repository by matching the folder name or file name with the Portainer Edge ID, and apply it to the environment where the stack is deployed"
disabled={isEditing}
checked={!!value.SupportPerDeviceConfigs}
- onChange={(value) =>
- innerOnChange({ SupportPerDeviceConfigs: value })
- }
+ onChange={(value) => {
+ toggleFsPath(1, value);
+ innerOnChange({ SupportPerDeviceConfigs: value });
+ }}
/>