mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-02 19:48:17 +00:00
MINOR: modify and fix some lineage issues (#19107)
* modify and fix some lineage issues * minor fix * restrict the node removal in case any error occured * fix flaky playwright test * userDetail flaky fix (cherry picked from commit 9edc078027ae619d289cdb68ad6b998f21da84dd)
This commit is contained in:
parent
79511566e4
commit
1721f4c38f
@ -130,6 +130,10 @@ test.describe('User with different Roles', () => {
|
||||
.getByTestId('edit-description')
|
||||
.click();
|
||||
|
||||
await userPage.waitForSelector('[role="dialog"].ant-modal', {
|
||||
state: 'visible',
|
||||
});
|
||||
|
||||
// Add description content
|
||||
await userPage.locator(descriptionBox).fill(USER_DESCRIPTION);
|
||||
|
||||
@ -155,9 +159,16 @@ test.describe('User with different Roles', () => {
|
||||
.getByTestId('edit-description')
|
||||
.click();
|
||||
|
||||
await userPage.click(descriptionBox);
|
||||
await userPage.waitForSelector('[role="dialog"].ant-modal', {
|
||||
state: 'visible',
|
||||
});
|
||||
|
||||
await userPage.locator(descriptionBox).clear();
|
||||
|
||||
await expect(userPage.locator(descriptionBox)).not.toContainText(
|
||||
'Name of the User'
|
||||
);
|
||||
|
||||
const removeUserDescription = userPage.waitForResponse(
|
||||
(response) => response.request().method() === 'PATCH'
|
||||
);
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_13519_22989)">
|
||||
<mask id="mask0_13519_22989" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="16" height="16">
|
||||
<path d="M16 0H0V16H16V0Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_13519_22989)">
|
||||
<path d="M8 0C3.58879 0 0 3.58879 0 8C0 12.4112 3.58879 16 8 16C12.4111 16 16 12.4111 16 8C16 3.58887 12.4111 0 8 0ZM12.5051 6.57537L6.74413 12.3361C6.66655 12.4137 6.56867 12.4673 6.46148 12.4908L3.55454 13.1279C3.51434 13.1367 3.47311 13.1413 3.43196 13.1413C3.28012 13.1413 3.13419 13.0807 3.02674 12.9733C2.88862 12.8351 2.83024 12.6361 2.87204 12.4453L3.50916 9.53848C3.53263 9.43145 3.58616 9.33333 3.66367 9.25583L9.42463 3.4951C9.83599 3.08378 10.3832 2.85871 10.9649 2.85871C11.5465 2.85871 12.0937 3.08378 12.5051 3.4951C13.3544 4.3443 13.3543 5.72617 12.5051 6.57537ZM8.89869 5.64193L10.3582 7.1015L6.0523 11.407L4.18331 11.8167L4.59296 9.94789L8.89869 5.64193ZM11.6946 4.3052C12.097 4.70765 12.0969 5.36248 11.6946 5.76492L11.1687 6.29109L9.70918 4.83137L10.2351 4.30524C10.4298 4.1105 10.6897 4.00491 10.9649 4.00491C11.24 4.00488 11.5 4.1105 11.6946 4.3052Z" fill="#6B7280"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.5051 6.57537L6.74413 12.3361C6.66655 12.4137 6.56867 12.4673 6.46148 12.4908L3.55454 13.1279C3.51434 13.1367 3.47311 13.1413 3.43196 13.1413C3.28012 13.1413 3.13419 13.0807 3.02674 12.9733C2.88862 12.8351 2.83024 12.6361 2.87204 12.4453L3.50916 9.53848C3.53263 9.43145 3.58616 9.33333 3.66367 9.25583L9.42463 3.4951C9.83599 3.08378 10.3832 2.85871 10.9649 2.85871C11.5465 2.85871 12.0937 3.08378 12.5051 3.4951C13.3544 4.3443 13.3543 5.72617 12.5051 6.57537ZM10.3582 7.1015L8.89869 5.64193L4.59296 9.94789L4.18331 11.8167L6.0523 11.407L10.3582 7.1015ZM11.6946 5.76492C12.0969 5.36248 12.097 4.70765 11.6946 4.3052C11.5 4.1105 11.24 4.00488 10.9649 4.00491C10.6897 4.00491 10.4298 4.1105 10.2351 4.30524L9.70918 4.83137L11.1687 6.29109L11.6946 5.76492Z" fill="white"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_13519_22989">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@ -125,9 +125,10 @@ const AddPipeLineModal = ({
|
||||
data-testid="add-edge-modal"
|
||||
footer={[
|
||||
<Button
|
||||
danger
|
||||
data-testid="remove-edge-button"
|
||||
key="remove-edge-btn"
|
||||
type="text"
|
||||
type="primary"
|
||||
onClick={onRemoveEdgeClick}>
|
||||
{t('label.remove-entity', {
|
||||
entity: t('label.edge-lowercase'),
|
||||
|
||||
@ -16,6 +16,7 @@ import { Button, Tag } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import React, { Fragment, useCallback, useMemo } from 'react';
|
||||
import { EdgeProps, getBezierPath } from 'reactflow';
|
||||
import { ReactComponent as IconEditCircle } from '../../../assets/svg/ic-edit-circle.svg';
|
||||
import { ReactComponent as FunctionIcon } from '../../../assets/svg/ic-function.svg';
|
||||
import { ReactComponent as IconTimesCircle } from '../../../assets/svg/ic-times-circle.svg';
|
||||
import { ReactComponent as PipelineIcon } from '../../../assets/svg/pipeline-grey.svg';
|
||||
@ -314,13 +315,13 @@ export const CustomEdge = ({
|
||||
const getEditLineageIcon = useCallback(
|
||||
(
|
||||
dataTestId: string,
|
||||
rotate: boolean,
|
||||
onClick:
|
||||
| ((
|
||||
event: React.MouseEvent<HTMLElement, MouseEvent>,
|
||||
data: CustomEdgeData
|
||||
) => void)
|
||||
| undefined
|
||||
| undefined,
|
||||
isPipeline?: boolean
|
||||
) => {
|
||||
return (
|
||||
<LineageEdgeIcon offset={offset} x={edgeCenterX} y={edgeCenterY}>
|
||||
@ -331,13 +332,10 @@ export const CustomEdge = ({
|
||||
<Icon
|
||||
alt="times-circle"
|
||||
className="align-middle"
|
||||
component={IconTimesCircle}
|
||||
component={isPipeline ? IconEditCircle : IconTimesCircle}
|
||||
style={{ fontSize: '16px' }}
|
||||
/>
|
||||
}
|
||||
style={{
|
||||
transform: rotate ? 'rotate(45deg)' : 'none',
|
||||
}}
|
||||
type="link"
|
||||
onClick={(event) => onClick?.(event, rest as CustomEdgeData)}
|
||||
/>
|
||||
@ -377,11 +375,11 @@ export const CustomEdge = ({
|
||||
)}
|
||||
{isColumnLineageAllowed &&
|
||||
isSelectedEditMode &&
|
||||
getEditLineageIcon('add-pipeline', true, onAddPipelineClick)}
|
||||
getEditLineageIcon('add-pipeline', onAddPipelineClick, true)}
|
||||
{!isColumnLineageAllowed &&
|
||||
isSelectedEditMode &&
|
||||
isSelected &&
|
||||
getEditLineageIcon('delete-button', false, onColumnEdgeRemove)}
|
||||
getEditLineageIcon('delete-button', onColumnEdgeRemove)}
|
||||
{!isColumnLineageAllowed &&
|
||||
data.columnFunctionValue &&
|
||||
data.isExpanded &&
|
||||
|
||||
@ -14,7 +14,14 @@ import Icon from '@ant-design/icons/lib/components/Icon';
|
||||
import { Button, Modal } from 'antd';
|
||||
import { AxiosError } from 'axios';
|
||||
import classNames from 'classnames';
|
||||
import { isEqual, isUndefined, uniq, uniqueId, uniqWith } from 'lodash';
|
||||
import {
|
||||
isEmpty,
|
||||
isEqual,
|
||||
isUndefined,
|
||||
uniq,
|
||||
uniqueId,
|
||||
uniqWith,
|
||||
} from 'lodash';
|
||||
import { LoadingState } from 'Models';
|
||||
import QueryString from 'qs';
|
||||
import React, {
|
||||
@ -836,6 +843,8 @@ const LineageProvider = ({ children }: LineageProviderProps) => {
|
||||
currentEdge.columns = updatedColumns; // update current edge with new columns
|
||||
}
|
||||
|
||||
setNewAddedNode({} as Node);
|
||||
|
||||
setEntityLineage((pre) => {
|
||||
const newData = {
|
||||
...pre,
|
||||
@ -848,8 +857,6 @@ const LineageProvider = ({ children }: LineageProviderProps) => {
|
||||
|
||||
return newData;
|
||||
});
|
||||
|
||||
setNewAddedNode({} as Node);
|
||||
})
|
||||
.catch((err) => {
|
||||
showErrorToast(err);
|
||||
@ -1211,7 +1218,9 @@ const LineageProvider = ({ children }: LineageProviderProps) => {
|
||||
|
||||
useEffect(() => {
|
||||
if (!loading) {
|
||||
redrawLineage(entityLineage);
|
||||
if (isEmpty(newAddedNode)) {
|
||||
redrawLineage(entityLineage);
|
||||
}
|
||||
}
|
||||
}, [entityLineage, loading]);
|
||||
|
||||
|
||||
@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Copyright 2025 Collate.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Cockroach Database Connection Config
|
||||
*/
|
||||
export interface CockroachConnection {
|
||||
/**
|
||||
* Choose Auth Config Type.
|
||||
*/
|
||||
authType?: AuthConfigurationType;
|
||||
connectionArguments?: { [key: string]: any };
|
||||
connectionOptions?: { [key: string]: string };
|
||||
/**
|
||||
* Optional name to give to the database in OpenMetadata. If left blank, we will use default
|
||||
* as the database name.
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* Database Schema of the data source. This is optional parameter, if you would like to
|
||||
* restrict the metadata reading to a single schema. When left blank, OpenMetadata Ingestion
|
||||
* attempts to scan all the schemas.
|
||||
*/
|
||||
databaseSchema?: string;
|
||||
/**
|
||||
* Host and port of the Cockrooach service.
|
||||
*/
|
||||
hostPort: string;
|
||||
/**
|
||||
* Ingest data from all databases in Postgres. You can use databaseFilterPattern on top of
|
||||
* this.
|
||||
*/
|
||||
ingestAllDatabases?: boolean;
|
||||
/**
|
||||
* SQLAlchemy driver scheme options.
|
||||
*/
|
||||
scheme?: CockroachScheme;
|
||||
/**
|
||||
* SSL Configuration details.
|
||||
*/
|
||||
sslConfig?: Config;
|
||||
sslMode?: SSLMode;
|
||||
supportsMetadataExtraction?: boolean;
|
||||
/**
|
||||
* Service Type
|
||||
*/
|
||||
type?: CockroachType;
|
||||
/**
|
||||
* Username to connect to Cockroach. This user should have privileges to read all the
|
||||
* metadata in Cockroach.
|
||||
*/
|
||||
username: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Choose Auth Config Type.
|
||||
*
|
||||
* Common Database Connection Config
|
||||
*/
|
||||
export interface AuthConfigurationType {
|
||||
/**
|
||||
* Password to connect to source.
|
||||
*/
|
||||
password?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* SQLAlchemy driver scheme options.
|
||||
*/
|
||||
export enum CockroachScheme {
|
||||
CockroachdbPsycopg2 = "cockroachdb+psycopg2",
|
||||
}
|
||||
|
||||
/**
|
||||
* SSL Configuration details.
|
||||
*
|
||||
* Client SSL configuration
|
||||
*
|
||||
* OpenMetadata Client configured to validate SSL certificates.
|
||||
*/
|
||||
export interface Config {
|
||||
/**
|
||||
* The CA certificate used for SSL validation.
|
||||
*/
|
||||
caCertificate?: string;
|
||||
/**
|
||||
* The SSL certificate used for client authentication.
|
||||
*/
|
||||
sslCertificate?: string;
|
||||
/**
|
||||
* The private key associated with the SSL certificate.
|
||||
*/
|
||||
sslKey?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* SSL Mode to connect to database.
|
||||
*/
|
||||
export enum SSLMode {
|
||||
Allow = "allow",
|
||||
Disable = "disable",
|
||||
Prefer = "prefer",
|
||||
Require = "require",
|
||||
VerifyCA = "verify-ca",
|
||||
VerifyFull = "verify-full",
|
||||
}
|
||||
|
||||
/**
|
||||
* Service Type
|
||||
*
|
||||
* Service type.
|
||||
*/
|
||||
export enum CockroachType {
|
||||
Cockroach = "Cockroach",
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2024 Collate.
|
||||
* Copyright 2025 Collate.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user