mirror of https://github.com/portainer/portainer
fix(app/edge-stack): hide non-working BE fields from CE (#205)
Co-authored-by: LP B <xAt0mZ@users.noreply.github.com>release/2.25
parent
c5accd0f16
commit
3c3dc547b2
|
@ -4,6 +4,7 @@ import { GitForm } from '@/react/portainer/gitops/GitForm';
|
||||||
import { baseEdgeStackWebhookUrl } from '@/portainer/helpers/webhookHelper';
|
import { baseEdgeStackWebhookUrl } from '@/portainer/helpers/webhookHelper';
|
||||||
import { RelativePathFieldset } from '@/react/portainer/gitops/RelativePathFieldset/RelativePathFieldset';
|
import { RelativePathFieldset } from '@/react/portainer/gitops/RelativePathFieldset/RelativePathFieldset';
|
||||||
import { applySetStateAction } from '@/react-tools/apply-set-state-action';
|
import { applySetStateAction } from '@/react-tools/apply-set-state-action';
|
||||||
|
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
||||||
|
|
||||||
import { BoxSelector } from '@@/BoxSelector';
|
import { BoxSelector } from '@@/BoxSelector';
|
||||||
import { FormSection } from '@@/form-components/FormSection';
|
import { FormSection } from '@@/form-components/FormSection';
|
||||||
|
@ -124,6 +125,7 @@ export function DockerComposeForm({
|
||||||
webhookId={webhookId}
|
webhookId={webhookId}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{isBE && (
|
||||||
<FormSection title="Advanced configurations">
|
<FormSection title="Advanced configurations">
|
||||||
<RelativePathFieldset
|
<RelativePathFieldset
|
||||||
values={values.relativePath}
|
values={values.relativePath}
|
||||||
|
@ -139,6 +141,7 @@ export function DockerComposeForm({
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</FormSection>
|
</FormSection>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { Form, useFormikContext } from 'formik';
|
||||||
|
|
||||||
import { applySetStateAction } from '@/react-tools/apply-set-state-action';
|
import { applySetStateAction } from '@/react-tools/apply-set-state-action';
|
||||||
import { EnvironmentType } from '@/react/portainer/environments/types';
|
import { EnvironmentType } from '@/react/portainer/environments/types';
|
||||||
|
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
||||||
|
|
||||||
import { EnvironmentVariablesPanel } from '@@/form-components/EnvironmentVariablesFieldset';
|
import { EnvironmentVariablesPanel } from '@@/form-components/EnvironmentVariablesFieldset';
|
||||||
import { FormActions } from '@@/form-components/FormActions';
|
import { FormActions } from '@@/form-components/FormActions';
|
||||||
|
@ -92,6 +93,8 @@ export function InnerForm({
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{isBE && (
|
||||||
|
<>
|
||||||
{values.method !== 'repository' && (
|
{values.method !== 'repository' && (
|
||||||
<WebhookSwitch
|
<WebhookSwitch
|
||||||
onChange={(value) => setFieldValue('enableWebhook', value)}
|
onChange={(value) => setFieldValue('enableWebhook', value)}
|
||||||
|
@ -111,7 +114,9 @@ export function InnerForm({
|
||||||
value={values.privateRegistryId}
|
value={values.privateRegistryId}
|
||||||
values={{ fileContent: values.fileContent, file: values.file }}
|
values={{ fileContent: values.fileContent, file: values.file }}
|
||||||
error={errors.privateRegistryId}
|
error={errors.privateRegistryId}
|
||||||
onFieldError={(message) => setFieldError('privateRegistryId', message)}
|
onFieldError={(message) =>
|
||||||
|
setFieldError('privateRegistryId', message)
|
||||||
|
}
|
||||||
isGit={values.method === 'repository'}
|
isGit={values.method === 'repository'}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -132,6 +137,8 @@ export function InnerForm({
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
<FormActions
|
<FormActions
|
||||||
data-cy="edgeStackCreate-createStackButton"
|
data-cy="edgeStackCreate-createStackButton"
|
||||||
|
|
Loading…
Reference in New Issue