mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 20:06:19 +00:00
* Fix #6725 Ability to create multiple separate ingestions for one database service * modify cypress test
This commit is contained in:
parent
2898d59d32
commit
e6c5d2ccaa
@ -140,7 +140,7 @@ export const testServiceCreationAndIngestion = (
|
||||
cy.get('[data-testid="success-line"]', { timeout: 15000 }).should(
|
||||
'be.visible'
|
||||
);
|
||||
cy.contains(`"${serviceName}_metadata"`).should('be.visible');
|
||||
cy.contains(`${serviceName}_metadata`).should('be.visible');
|
||||
cy.contains('has been created and deployed successfully').should(
|
||||
'be.visible'
|
||||
);
|
||||
|
@ -421,6 +421,24 @@ const ConfigureIngestion = ({
|
||||
const getMetadataFields = () => {
|
||||
return (
|
||||
<>
|
||||
<Field>
|
||||
<label className="tw-block tw-form-label tw-mb-1" htmlFor="name">
|
||||
Name
|
||||
</label>
|
||||
<p className="tw-text-grey-muted tw-mt-1 tw-mb-2 tw-text-sm">
|
||||
Name that identifies this pipeline instance uniquely.
|
||||
</p>
|
||||
<input
|
||||
className="tw-form-inputs tw-form-inputs-padding"
|
||||
data-testid="name"
|
||||
id="name"
|
||||
name="name"
|
||||
type="text"
|
||||
value={ingestionName}
|
||||
onChange={(e) => handleIngestionName(e.target.value)}
|
||||
/>
|
||||
{getSeparator('')}
|
||||
</Field>
|
||||
<div>{getMetadataFilterPatternField()}</div>
|
||||
</>
|
||||
);
|
||||
|
@ -113,7 +113,8 @@ const Ingestion: React.FC<IngestionProps> = ({
|
||||
if (ingestionList.length > 0) {
|
||||
return pipelineType.reduce((prev, curr) => {
|
||||
if (
|
||||
curr !== PipelineType.Profiler &&
|
||||
// Prevent adding multiple usage pipeline
|
||||
curr === PipelineType.Usage &&
|
||||
ingestionList.find((d) => d.pipelineType === curr)
|
||||
) {
|
||||
return prev;
|
||||
@ -263,12 +264,21 @@ const Ingestion: React.FC<IngestionProps> = ({
|
||||
const getAddIngestionElement = () => {
|
||||
const types = getIngestionPipelineTypeOption();
|
||||
let element: JSX.Element | null = null;
|
||||
// Check if service has atleast one metadata pipeline available or not
|
||||
const hasMetadata = ingestionList.find(
|
||||
(ingestion) => ingestion.pipelineType === PipelineType.Metadata
|
||||
);
|
||||
|
||||
if (types.length) {
|
||||
if (types[0] === PipelineType.Metadata || types.length === 1) {
|
||||
element = getAddIngestionButton(types[0]);
|
||||
} else {
|
||||
// if service has metedata then show all available option
|
||||
if (hasMetadata) {
|
||||
element = getAddIngestionDropdown(types);
|
||||
} else {
|
||||
/**
|
||||
* If service does not have any metedata pipeline then
|
||||
* show only option for metadata ingestion
|
||||
*/
|
||||
element = getAddIngestionButton(PipelineType.Metadata);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -484,7 +484,11 @@ export const getIngestionName = (
|
||||
serviceName: string,
|
||||
type: IngestionPipelineType
|
||||
) => {
|
||||
if (type === IngestionPipelineType.Profiler) {
|
||||
if (
|
||||
[IngestionPipelineType.Profiler, IngestionPipelineType.Metadata].includes(
|
||||
type
|
||||
)
|
||||
) {
|
||||
return `${serviceName}_${type}_${cryptoRandomString({
|
||||
length: 8,
|
||||
type: 'alphanumeric',
|
||||
|
Loading…
x
Reference in New Issue
Block a user