mirror of https://github.com/portainer/portainer
refactor(git): allow empty additional files
parent
6674df6dc9
commit
20e5c258b5
|
@ -88,7 +88,7 @@ export function GitForm({
|
||||||
|
|
||||||
{isAdditionalFilesFieldVisible && (
|
{isAdditionalFilesFieldVisible && (
|
||||||
<AdditionalFileField
|
<AdditionalFileField
|
||||||
value={value.AdditionalFiles}
|
value={value.AdditionalFiles || []}
|
||||||
onChange={(value) => handleChange({ AdditionalFiles: value })}
|
onChange={(value) => handleChange({ AdditionalFiles: value })}
|
||||||
errors={errors.AdditionalFiles}
|
errors={errors.AdditionalFiles}
|
||||||
/>
|
/>
|
||||||
|
@ -165,5 +165,5 @@ export function buildGitValidationSchema(
|
||||||
RepositoryURLValid: boolean().default(false),
|
RepositoryURLValid: boolean().default(false),
|
||||||
AutoUpdate: autoUpdateValidation().nullable(),
|
AutoUpdate: autoUpdateValidation().nullable(),
|
||||||
TLSSkipVerify: boolean().default(false),
|
TLSSkipVerify: boolean().default(false),
|
||||||
}).concat(gitAuthValidation(gitCredentials, false));
|
}).concat(gitAuthValidation(gitCredentials, false)) as SchemaOf<GitFormModel>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ interface Props {
|
||||||
onChange(value: string): void;
|
onChange(value: string): void;
|
||||||
model: RefFieldModel;
|
model: RefFieldModel;
|
||||||
error?: string;
|
error?: string;
|
||||||
isUrlValid: boolean;
|
isUrlValid?: boolean;
|
||||||
stackId?: StackId;
|
stackId?: StackId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ export function RefSelector({
|
||||||
value: string;
|
value: string;
|
||||||
stackId?: StackId;
|
stackId?: StackId;
|
||||||
onChange: (value: string) => void;
|
onChange: (value: string) => void;
|
||||||
isUrlValid: boolean;
|
isUrlValid?: boolean;
|
||||||
}) {
|
}) {
|
||||||
const creds = getAuthentication(model);
|
const creds = getAuthentication(model);
|
||||||
const payload = {
|
const payload = {
|
||||||
|
|
|
@ -26,6 +26,7 @@ export interface RepoConfigResponse {
|
||||||
ConfigFilePath: string;
|
ConfigFilePath: string;
|
||||||
Authentication?: GitAuthenticationResponse;
|
Authentication?: GitAuthenticationResponse;
|
||||||
ConfigHash: string;
|
ConfigHash: string;
|
||||||
|
TLSSkipVerify: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AutoUpdateModel = {
|
export type AutoUpdateModel = {
|
||||||
|
@ -52,11 +53,11 @@ export type GitAuthModel = GitCredentialsModel & GitNewCredentialModel;
|
||||||
|
|
||||||
export interface GitFormModel extends GitAuthModel {
|
export interface GitFormModel extends GitAuthModel {
|
||||||
RepositoryURL: string;
|
RepositoryURL: string;
|
||||||
RepositoryURLValid: boolean;
|
RepositoryURLValid?: boolean;
|
||||||
ComposeFilePathInRepository: string;
|
ComposeFilePathInRepository: string;
|
||||||
RepositoryAuthentication: boolean;
|
RepositoryAuthentication: boolean;
|
||||||
RepositoryReferenceName?: string;
|
RepositoryReferenceName?: string;
|
||||||
AdditionalFiles: string[];
|
AdditionalFiles?: string[];
|
||||||
|
|
||||||
SaveCredential?: boolean;
|
SaveCredential?: boolean;
|
||||||
NewCredentialName?: string;
|
NewCredentialName?: string;
|
||||||
|
|
Loading…
Reference in New Issue