fix git options for kube (#8888)

pull/8894/head
Matt Hook 2023-05-05 09:20:10 +12:00 committed by GitHub
parent 5fd36ee986
commit 293d390e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 0 deletions

View File

@ -80,6 +80,8 @@
ng-if="ctrl.state.BuildMethod === ctrl.BuildMethods.GIT" ng-if="ctrl.state.BuildMethod === ctrl.BuildMethods.GIT"
value="ctrl.formValues" value="ctrl.formValues"
on-change="(ctrl.onChangeFormValues)" on-change="(ctrl.onChangeFormValues)"
environment-type="KUBERNETES"
is-force-pull-visible="false"
is-additional-files-field-visible="true" is-additional-files-field-visible="true"
is-auth-explanation-visible="true" is-auth-explanation-visible="true"
deploy-method="{{ ctrl.state.DeployType === ctrl.ManifestDeployTypes.COMPOSE ? 'compose' : 'manifest' }}" deploy-method="{{ ctrl.state.DeployType === ctrl.ManifestDeployTypes.COMPOSE ? 'compose' : 'manifest' }}"

View File

@ -8,6 +8,7 @@ export const gitForm: IComponentOptions = {
<react-git-form <react-git-form
value="$ctrl.value" value="$ctrl.value"
on-change="$ctrl.handleChange" on-change="$ctrl.handleChange"
environment-type="$ctrl.environmentType"
is-docker-standalone="$ctrl.isDockerStandalone" is-docker-standalone="$ctrl.isDockerStandalone"
deploy-method="$ctrl.deployMethod" deploy-method="$ctrl.deployMethod"
is-additional-files-field-visible="$ctrl.isAdditionalFilesFieldVisible" is-additional-files-field-visible="$ctrl.isAdditionalFilesFieldVisible"
@ -22,6 +23,7 @@ export const gitForm: IComponentOptions = {
bindings: { bindings: {
value: '<', value: '<',
onChange: '<', onChange: '<',
environmentType: '@',
isDockerStandalone: '<', isDockerStandalone: '<',
deployMethod: '@', deployMethod: '@',
baseWebhookUrl: '@', baseWebhookUrl: '@',

View File

@ -9,6 +9,7 @@
value="$ctrl.formValues.AutoUpdate" value="$ctrl.formValues.AutoUpdate"
on-change="($ctrl.onChangeAutoUpdate)" on-change="($ctrl.onChangeAutoUpdate)"
environment-type="KUBERNETES" environment-type="KUBERNETES"
is-force-pull-visible="false"
base-webhook-url="{{ $ctrl.state.baseWebhookUrl }}" base-webhook-url="{{ $ctrl.state.baseWebhookUrl }}"
webhook-id="{{ $ctrl.state.webhookId }}" webhook-id="{{ $ctrl.state.webhookId }}"
webhooks-docs="https://docs.portainer.io/user/kubernetes/applications/webhooks" webhooks-docs="https://docs.portainer.io/user/kubernetes/applications/webhooks"

View File

@ -18,6 +18,7 @@ export const gitFormModule = angular
r2a(withUIRouter(withReactQuery(withCurrentUser(GitForm))), [ r2a(withUIRouter(withReactQuery(withCurrentUser(GitForm))), [
'value', 'value',
'onChange', 'onChange',
'environmentType',
'isDockerStandalone', 'isDockerStandalone',
'deployMethod', 'deployMethod',
'isAdditionalFilesFieldVisible', 'isAdditionalFilesFieldVisible',

View File

@ -22,6 +22,7 @@ import { refFieldValidation } from './RefField/RefField';
interface Props { interface Props {
value: GitFormModel; value: GitFormModel;
onChange: (value: Partial<GitFormModel>) => void; onChange: (value: Partial<GitFormModel>) => void;
environmentType?: 'DOCKER' | 'KUBERNETES' | undefined;
deployMethod?: 'compose' | 'nomad' | 'manifest'; deployMethod?: 'compose' | 'nomad' | 'manifest';
isDockerStandalone?: boolean; isDockerStandalone?: boolean;
isAdditionalFilesFieldVisible?: boolean; isAdditionalFilesFieldVisible?: boolean;
@ -36,6 +37,7 @@ interface Props {
export function GitForm({ export function GitForm({
value, value,
onChange, onChange,
environmentType = 'DOCKER',
deployMethod = 'compose', deployMethod = 'compose',
isDockerStandalone = false, isDockerStandalone = false,
isAdditionalFilesFieldVisible, isAdditionalFilesFieldVisible,
@ -94,6 +96,7 @@ export function GitForm({
{value.AutoUpdate && ( {value.AutoUpdate && (
<AutoUpdateFieldset <AutoUpdateFieldset
environmentType={environmentType}
webhookId={webhookId} webhookId={webhookId}
baseWebhookUrl={baseWebhookUrl} baseWebhookUrl={baseWebhookUrl}
value={value.AutoUpdate} value={value.AutoUpdate}