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 && (
|
||||
<AdditionalFileField
|
||||
value={value.AdditionalFiles}
|
||||
value={value.AdditionalFiles || []}
|
||||
onChange={(value) => handleChange({ AdditionalFiles: value })}
|
||||
errors={errors.AdditionalFiles}
|
||||
/>
|
||||
|
@ -165,5 +165,5 @@ export function buildGitValidationSchema(
|
|||
RepositoryURLValid: boolean().default(false),
|
||||
AutoUpdate: autoUpdateValidation().nullable(),
|
||||
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;
|
||||
model: RefFieldModel;
|
||||
error?: string;
|
||||
isUrlValid: boolean;
|
||||
isUrlValid?: boolean;
|
||||
stackId?: StackId;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ export function RefSelector({
|
|||
value: string;
|
||||
stackId?: StackId;
|
||||
onChange: (value: string) => void;
|
||||
isUrlValid: boolean;
|
||||
isUrlValid?: boolean;
|
||||
}) {
|
||||
const creds = getAuthentication(model);
|
||||
const payload = {
|
||||
|
|
|
@ -26,6 +26,7 @@ export interface RepoConfigResponse {
|
|||
ConfigFilePath: string;
|
||||
Authentication?: GitAuthenticationResponse;
|
||||
ConfigHash: string;
|
||||
TLSSkipVerify: boolean;
|
||||
}
|
||||
|
||||
export type AutoUpdateModel = {
|
||||
|
@ -52,11 +53,11 @@ export type GitAuthModel = GitCredentialsModel & GitNewCredentialModel;
|
|||
|
||||
export interface GitFormModel extends GitAuthModel {
|
||||
RepositoryURL: string;
|
||||
RepositoryURLValid: boolean;
|
||||
RepositoryURLValid?: boolean;
|
||||
ComposeFilePathInRepository: string;
|
||||
RepositoryAuthentication: boolean;
|
||||
RepositoryReferenceName?: string;
|
||||
AdditionalFiles: string[];
|
||||
AdditionalFiles?: string[];
|
||||
|
||||
SaveCredential?: boolean;
|
||||
NewCredentialName?: string;
|
||||
|
|
Loading…
Reference in New Issue