Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: modify and fix some lineage issues #19107

Merged
merged 7 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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'
);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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}>
Expand All @@ -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)}
/>
Expand Down Expand Up @@ -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 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down Expand Up @@ -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,
Expand All @@ -848,8 +857,6 @@ const LineageProvider = ({ children }: LineageProviderProps) => {

return newData;
});

setNewAddedNode({} as Node);
})
.catch((err) => {
showErrorToast(err);
Expand Down Expand Up @@ -1211,7 +1218,9 @@ const LineageProvider = ({ children }: LineageProviderProps) => {

useEffect(() => {
if (!loading) {
redrawLineage(entityLineage);
if (isEmpty(newAddedNode)) {
redrawLineage(entityLineage);
}
}
}, [entityLineage, loading]);

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,21 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
/*
* Copyright 2021 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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
"copy": "Copiar",
"cost-analysis": "Análise de custos",
"count": "Contar",
"covered": "Cuberto",
"covered": "Cuberto",
"create": "Crear",
"create-entity": "Crear {{entity}}",
"create-new-test-suite": "Crear un novo conxunto de probas",
Expand Down Expand Up @@ -372,7 +372,7 @@
"destination-plural": "Destinos",
"detail-plural": "Detalles",
"developed-by-developer": "Desenvolvido por {{developer}}",
"dimension": "Dimensión",
"dimension": "Dimensión",
"disable": "Desactivar",
"disable-lowercase": "desactivar",
"disable-tag": "Desactivar etiqueta",
Expand Down Expand Up @@ -582,7 +582,7 @@
"granularity": "Granularidade",
"group": "Grupo",
"has-been-action-type-lowercase": "foi {{actionType}}",
"header-plural": "Cabeceiras",
"header-plural": "Cabeceiras",
"health-check": "Verificación de saúde",
"health-lowercase": "saude",
"healthy": "Saudable",
Expand Down Expand Up @@ -1699,7 +1699,7 @@
"no-closed-task": "Non hai tarefas pechadas",
"no-config-available": "Non hai configuracións de conexión dispoñibles.",
"no-config-plural": "Non hai configuracións.",
"no-custom-properties-table": "Actualmente non hai propiedades personalizadas definidas para o activo de datos {{entity}}. Para descubrir como engadir propiedades personalizadas, consulte <0>{{docs}}</0>",
"no-custom-properties-entity": "There are currently no Custom Properties defined for the {{entity}} Data Asset. To discover how to add Custom Properties, please refer to <0>{{docs}}</0>",
"no-customization-available": "Non hai ningunha personalización dispoñible para esta pestana",
"no-data": "Non hai datos",
"no-data-assets": "Benvido a OpenMetadata! Parece que aínda non se engadiron activos de datos. Consulta a nosa guía de <0>Como comezar</0> para iniciar.",
Expand Down Expand Up @@ -1918,7 +1918,7 @@
"token-security-description": "Calquera que teña o teu Token JWT poderá enviar solicitudes REST API ao servidor de OpenMetadata. Non expoñas o Token JWT no código da túa aplicación. Non o compartas en GitHub nin noutro lugar en liña.",
"total-entity-insight": "Mostrar o número máis recente de activos de datos por tipo.",
"tour-follow-step": "Segue un activo de datos para estar informado sobre os cambios. No teu feed de actividades mostrarase todo o relacionado co activo de datos que segues. Tamén recibirás alertas se este activo ten problemas de calidade de datos.",
"tour-high-level-assets-information-step": "Na páxina de detalles de Activos de Datos, obtés unha visión de 360 ​​graos do activo para axudarche a comprender todo o contexto dos datos e facer o mellor uso deles.",
"tour-high-level-assets-information-step": "Na páxina de detalles de Activos de Datos, obtés unha visión de 360 graos do activo para axudarche a comprender todo o contexto dos datos e facer o mellor uso deles.",
"tour-owner-step": "Aquí podes asignar a propiedade dun activo de datos a un equipo ou a unha persoa. Colabora cos propietarios de datos: fai preguntas para comprender os datos, solicita descricións faltantes ou incluso suxire cambios.",
"tour-step-activity-feed": "<0>{{text}}</0> axúdache a comprender como están cambiando os datos na túa organización.",
"tour-step-click-on-entity-tab": "Fai clic na lapela <0>\"{{text}}\"</0>.",
Expand Down
Loading