Fixed issue Create test suite ingestion pipelines with underscores instead of spaces #7279 (#7547)

* Fixed issue Create test suite ingestion pipelines with underscores instead of spaces #7279

* used utils method for replacing space
This commit is contained in:
Shailesh Parmar 2022-09-19 19:28:16 +05:30 committed by GitHub
parent c12cc0276e
commit d7d2d7eae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,6 +35,7 @@ import {
} from '../../generated/api/services/ingestionPipelines/createIngestionPipeline';
import { IngestionPipeline } from '../../generated/entity/services/ingestionPipelines/ingestionPipeline';
import jsonData from '../../jsons/en';
import { replaceSpaceWith_ } from '../../utils/CommonUtils';
import { getTestSuitePath } from '../../utils/RouterUtils';
import { showErrorToast } from '../../utils/ToastUtils';
import SuccessScreen from '../common/success-screen/SuccessScreen';
@ -105,13 +106,15 @@ const TestSuiteIngestion: React.FC<TestSuiteIngestionProps> = ({
};
const createIngestionPipeline = async (repeatFrequency: string) => {
const updatedName = replaceSpaceWith_(testSuite.name);
const ingestionPayload: CreateIngestionPipeline = {
airflowConfig: {
scheduleInterval: isEmpty(repeatFrequency)
? undefined
: repeatFrequency,
},
name: `${testSuite.name}_${PipelineType.TestSuite}`,
name: `${updatedName}_${PipelineType.TestSuite}`,
pipelineType: PipelineType.TestSuite,
service: {
id: testSuite.id || '',