mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
fix(edge/templates): fix issues with git templates [EE-6357] (#10679)
This commit is contained in:
parent
974378c9b5
commit
2a18c9f215
16 changed files with 201 additions and 116 deletions
|
@ -35,7 +35,7 @@ export function RelativePathFieldset({
|
|||
|
||||
const { errors } = useValidation(value);
|
||||
|
||||
const { enableFsPath0, enableFsPath1, toggleFsPath } = useEnableFsPath();
|
||||
const { enableFsPath0, enableFsPath1, toggleFsPath } = useEnableFsPath(value);
|
||||
|
||||
const pathTip0 =
|
||||
'For relative path volumes use with Docker Swarm, you must have a network filesystem which all of your nodes can access.';
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
import { useState } from 'react';
|
||||
|
||||
export function useEnableFsPath() {
|
||||
const [state, setState] = useState<number[]>([]);
|
||||
import { RelativePathModel } from './types';
|
||||
|
||||
export function useEnableFsPath(initialValue: RelativePathModel) {
|
||||
const [state, setState] = useState<number[]>(() =>
|
||||
initialValue.SupportPerDeviceConfigs ? [1] : []
|
||||
);
|
||||
|
||||
const enableFsPath0 = state.length && state[0] === 0;
|
||||
const enableFsPath1 = state.length && state[0] === 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue