mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-06 04:26:57 +00:00
Bug: Integer ingestion config field changes needed to be handled correctly (#11104)
* Bug: Integer ingestion config field changes were not handled correctly * Change method name
This commit is contained in:
parent
07b74ce8e8
commit
af2093f78b
@ -149,11 +149,10 @@ const ConfigureIngestion = ({
|
||||
const toggleField = (field: keyof AddIngestionState) =>
|
||||
onChange({ [field]: !data[field] });
|
||||
|
||||
const handleValueParseInt =
|
||||
(property: keyof AddIngestionState) =>
|
||||
(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||
const handleIntValue =
|
||||
(property: keyof AddIngestionState) => (value: number | undefined | null) =>
|
||||
onChange({
|
||||
[property]: parseInt(event.target.value),
|
||||
[property]: value ?? undefined,
|
||||
});
|
||||
|
||||
const handleValueChange =
|
||||
@ -163,24 +162,6 @@ const ConfigureIngestion = ({
|
||||
[property]: event.target.value,
|
||||
});
|
||||
|
||||
const handleProfileSample = (profileSample: number | undefined | null) =>
|
||||
onChange({
|
||||
profileSample: profileSample ?? undefined,
|
||||
});
|
||||
|
||||
const handleConfidenceScore = (confidence: number | undefined | null) =>
|
||||
onChange({
|
||||
confidence: confidence ?? undefined,
|
||||
});
|
||||
|
||||
const handleProfileSampleTypeChange = (value: ProfileSampleType) => {
|
||||
onChange({
|
||||
profileSampleType: value,
|
||||
});
|
||||
|
||||
handleProfileSample(undefined);
|
||||
};
|
||||
|
||||
const handleDashBoardServiceNames = (inputValue: string[]) => {
|
||||
if (inputValue) {
|
||||
onChange({
|
||||
@ -220,18 +201,30 @@ const ConfigureIngestion = ({
|
||||
|
||||
const handleProcessPii = () => toggleField('processPii');
|
||||
|
||||
const handleQueryLogDuration = handleValueParseInt('queryLogDuration');
|
||||
const handleQueryLogDuration = handleIntValue('queryLogDuration');
|
||||
|
||||
const handleResultLimit = handleValueParseInt('resultLimit');
|
||||
const handleResultLimit = handleIntValue('resultLimit');
|
||||
|
||||
const handleStageFileLocation = handleValueChange('stageFileLocation');
|
||||
|
||||
const handleThreadCount = handleValueParseInt('threadCount');
|
||||
const handleThreadCount = handleIntValue('threadCount');
|
||||
|
||||
const handleTimeoutSeconds = handleValueParseInt('timeoutSeconds');
|
||||
const handleTimeoutSeconds = handleIntValue('timeoutSeconds');
|
||||
|
||||
const handleIngestionName = handleValueChange('ingestionName');
|
||||
|
||||
const handleProfileSample = handleIntValue('profileSample');
|
||||
|
||||
const handleConfidenceScore = handleIntValue('confidence');
|
||||
|
||||
const handleProfileSampleTypeChange = (value: ProfileSampleType) => {
|
||||
onChange({
|
||||
profileSampleType: value,
|
||||
});
|
||||
|
||||
handleProfileSample(undefined);
|
||||
};
|
||||
|
||||
const commonMetadataFields: FieldProp[] = [
|
||||
{
|
||||
name: 'name',
|
||||
@ -890,6 +883,7 @@ const ConfigureIngestion = ({
|
||||
'data-testid': 'threadCount',
|
||||
placeholder: '5',
|
||||
value: threadCount,
|
||||
min: 1,
|
||||
onChange: handleThreadCount,
|
||||
},
|
||||
},
|
||||
@ -905,6 +899,7 @@ const ConfigureIngestion = ({
|
||||
'data-testid': 'timeoutSeconds',
|
||||
placeholder: '43200',
|
||||
value: timeoutSeconds,
|
||||
min: 1,
|
||||
onChange: handleTimeoutSeconds,
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user