mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-01 19:25:56 +00:00
fix(summary-tab): show correct feedback when trying to add duplicate link (#14817)
Co-authored-by: Chris Collins <chriscollins3456@gmail.com>
This commit is contained in:
parent
5c79114cb2
commit
23389d0344
@ -11,6 +11,11 @@ export default function ExternalUrlMenuAction({ shouldFillAllAvailableSpace }: P
|
||||
const { urn: entityUrn, entityData } = useEntityData();
|
||||
|
||||
return (
|
||||
<ViewInPlatform urn={entityUrn} data={entityData} shouldFillAllAvailableSpace={shouldFillAllAvailableSpace} />
|
||||
<ViewInPlatform
|
||||
urn={entityUrn}
|
||||
data={entityData}
|
||||
shouldFillAllAvailableSpace={shouldFillAllAvailableSpace}
|
||||
isEntityPageHeader
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@ -262,6 +262,7 @@ function EntityActions(props: Props) {
|
||||
variant="outline"
|
||||
onClick={() => setIsBatchAddGlossaryTermModalVisible(true)}
|
||||
data-testid="glossary-batch-add"
|
||||
size="sm"
|
||||
>
|
||||
<LinkOutlined /> Add to Assets
|
||||
</Button>
|
||||
@ -273,6 +274,7 @@ function EntityActions(props: Props) {
|
||||
variant="outline"
|
||||
onClick={() => setIsBatchSetDomainModalVisible(true)}
|
||||
data-testid="domain-batch-add"
|
||||
size="sm"
|
||||
>
|
||||
<LinkOutlined /> Add to Assets
|
||||
</Button>
|
||||
@ -285,7 +287,7 @@ function EntityActions(props: Props) {
|
||||
placement="bottom"
|
||||
data-testid="data-product-batch-add"
|
||||
>
|
||||
<Button variant="outline" onClick={() => setIsBatchSetDataProductModalVisible(true)}>
|
||||
<Button variant="outline" onClick={() => setIsBatchSetDataProductModalVisible(true)} size="sm">
|
||||
<LinkOutlined />
|
||||
Add Assets
|
||||
</Button>
|
||||
|
||||
@ -88,6 +88,8 @@ export default function LinksList() {
|
||||
handleConfirm={handleDelete}
|
||||
modalTitle="Confirm Delete"
|
||||
modalText="Are you sure you want to delete this link?"
|
||||
confirmButtonText="Delete"
|
||||
isDeleteModal
|
||||
/>
|
||||
{showEditLinkModal && (
|
||||
<AddEditLinkModal
|
||||
|
||||
@ -132,7 +132,8 @@ export default function ModuleMenu({ module, position }: Props) {
|
||||
: 'Are you sure you want to remove this module? You can always create a new one later if needed.'
|
||||
}
|
||||
closeButtonText="Cancel"
|
||||
confirmButtonText="Confirm"
|
||||
confirmButtonText="Remove"
|
||||
isDeleteModal
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
@ -36,6 +36,7 @@ interface Props {
|
||||
modalText?: string | React.ReactNode;
|
||||
closeButtonText?: string;
|
||||
confirmButtonText?: string;
|
||||
isDeleteModal?: boolean;
|
||||
}
|
||||
|
||||
export const ConfirmationModal = ({
|
||||
@ -46,6 +47,7 @@ export const ConfirmationModal = ({
|
||||
modalText,
|
||||
closeButtonText,
|
||||
confirmButtonText,
|
||||
isDeleteModal,
|
||||
}: Props) => {
|
||||
return (
|
||||
<StyledModal
|
||||
@ -57,7 +59,12 @@ export const ConfirmationModal = ({
|
||||
<Button variant="text" color="gray" onClick={handleClose} data-testid="modal-cancel-button">
|
||||
{closeButtonText || 'Cancel'}
|
||||
</Button>
|
||||
<Button variant="filled" onClick={handleConfirm} data-testid="modal-confirm-button">
|
||||
<Button
|
||||
variant="filled"
|
||||
onClick={handleConfirm}
|
||||
color={isDeleteModal ? 'red' : 'primary'}
|
||||
data-testid="modal-confirm-button"
|
||||
>
|
||||
{confirmButtonText || 'Yes'}
|
||||
</Button>
|
||||
</ButtonsContainer>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user