mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-15 12:00:22 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
d6c7465b19
@ -465,6 +465,7 @@ export const service = {
|
||||
description: 'This is a Glue service',
|
||||
newDescription: 'This is updated Glue service description',
|
||||
Owner: 'Aaron Johnson',
|
||||
serviceType: 'databaseService',
|
||||
};
|
||||
|
||||
export const SERVICE_TYPE = {
|
||||
|
@ -34,7 +34,7 @@ describe('Login configuration', { tags: 'Settings' }, () => {
|
||||
cy.get('[data-testid="access-block-time"]').should('have.text', '500');
|
||||
cy.get('[data-testid="jwt-token-expiry-time"]').should(
|
||||
'have.text',
|
||||
'5000 Milliseconds'
|
||||
'5000 Seconds'
|
||||
);
|
||||
/* ==== End Cypress Studio ==== */
|
||||
});
|
||||
|
@ -34,7 +34,7 @@ describe('Services page should work properly', { tags: 'Integration' }, () => {
|
||||
);
|
||||
interceptURL(
|
||||
'GET',
|
||||
`/api/v1/services/ingestionPipelines?fields=*&service=${service.name}*`,
|
||||
`/api/v1/services/ingestionPipelines?fields=*&service=${service.name}*&serviceType=${service.serviceType}`,
|
||||
'ingestionPipelines'
|
||||
);
|
||||
cy.login();
|
||||
|
@ -249,7 +249,7 @@ const DataProductsDetailsPage = ({
|
||||
description={t('message.rename-entity', {
|
||||
entity: t('label.data-product'),
|
||||
})}
|
||||
icon={<EditIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
||||
icon={EditIcon}
|
||||
id="rename-button"
|
||||
name={t('label.rename')}
|
||||
/>
|
||||
@ -271,7 +271,7 @@ const DataProductsDetailsPage = ({
|
||||
description={t('message.edit-entity-style-description', {
|
||||
entity: t('label.data-product'),
|
||||
})}
|
||||
icon={<StyleIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
||||
icon={StyleIcon}
|
||||
id="rename-button"
|
||||
name={t('label.style')}
|
||||
/>
|
||||
@ -296,7 +296,7 @@ const DataProductsDetailsPage = ({
|
||||
entityType: t('label.data-product'),
|
||||
}
|
||||
)}
|
||||
icon={<DeleteIcon color={DE_ACTIVE_COLOR} width="14px" />}
|
||||
icon={DeleteIcon}
|
||||
id="delete-button"
|
||||
name={t('label.delete')}
|
||||
/>
|
||||
|
@ -28,7 +28,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { ReactComponent as IconDelete } from '../../../assets/svg/ic-delete.svg';
|
||||
import { ReactComponent as IconDropdown } from '../../../assets/svg/menu.svg';
|
||||
import { WORKFLOWS_PROFILER_DOCS } from '../../../constants/docs.constants';
|
||||
import { DROPDOWN_ICON_SIZE_PROPS } from '../../../constants/ManageButton.constants';
|
||||
import { mockDatasetData } from '../../../constants/mockTourData.constants';
|
||||
import { useTourProvider } from '../../../context/TourProvider/TourProvider';
|
||||
import { EntityType } from '../../../enums/entity.enum';
|
||||
@ -157,13 +156,7 @@ const SampleDataTable = ({
|
||||
description={t('message.delete-entity-type-action-description', {
|
||||
entityType: t('label.sample-data'),
|
||||
})}
|
||||
icon={
|
||||
<IconDelete
|
||||
className="m-t-xss"
|
||||
{...DROPDOWN_ICON_SIZE_PROPS}
|
||||
name="Delete"
|
||||
/>
|
||||
}
|
||||
icon={IconDelete}
|
||||
id="delete-button"
|
||||
name={t('label.delete')}
|
||||
/>
|
||||
|
@ -361,7 +361,7 @@ const DomainDetailsPage = ({
|
||||
description={t('message.rename-entity', {
|
||||
entity: t('label.domain'),
|
||||
})}
|
||||
icon={<EditIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
||||
icon={EditIcon}
|
||||
id="rename-button"
|
||||
name={t('label.rename')}
|
||||
/>
|
||||
@ -383,7 +383,7 @@ const DomainDetailsPage = ({
|
||||
description={t('message.edit-entity-style-description', {
|
||||
entity: t('label.domain'),
|
||||
})}
|
||||
icon={<StyleIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
||||
icon={StyleIcon}
|
||||
id="edit-style-button"
|
||||
name={t('label.style')}
|
||||
/>
|
||||
@ -408,7 +408,7 @@ const DomainDetailsPage = ({
|
||||
entityType: t('label.domain'),
|
||||
}
|
||||
)}
|
||||
icon={<DeleteIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
||||
icon={DeleteIcon}
|
||||
id="delete-button"
|
||||
name={t('label.delete')}
|
||||
/>
|
||||
|
@ -54,6 +54,7 @@ import {
|
||||
Status,
|
||||
} from '../../../generated/entity/data/glossaryTerm';
|
||||
import { Style } from '../../../generated/type/tagLabel';
|
||||
import { useApplicationStore } from '../../../hooks/useApplicationStore';
|
||||
import { useFqn } from '../../../hooks/useFqn';
|
||||
import {
|
||||
exportGlossaryInCSVFormat,
|
||||
@ -71,8 +72,6 @@ import {
|
||||
getGlossaryVersionsPath,
|
||||
} from '../../../utils/RouterUtils';
|
||||
import { showErrorToast } from '../../../utils/ToastUtils';
|
||||
|
||||
import { useApplicationStore } from '../../../hooks/useApplicationStore';
|
||||
import { TitleBreadcrumbProps } from '../../common/TitleBreadcrumb/TitleBreadcrumb.interface';
|
||||
import Voting from '../../Entity/Voting/Voting.component';
|
||||
import StyleModal from '../../Modals/StyleModal/StyleModal.component';
|
||||
@ -274,7 +273,7 @@ const GlossaryHeader = ({
|
||||
description={t('message.export-entity-help', {
|
||||
entity: t('label.glossary-term-lowercase-plural'),
|
||||
})}
|
||||
icon={<ExportIcon width="18px" />}
|
||||
icon={ExportIcon}
|
||||
id="export-button"
|
||||
name={t('label.export')}
|
||||
/>
|
||||
@ -292,7 +291,7 @@ const GlossaryHeader = ({
|
||||
description={t('message.import-entity-help', {
|
||||
entity: t('label.glossary-term-lowercase'),
|
||||
})}
|
||||
icon={<ImportIcon width="20px" />}
|
||||
icon={ImportIcon}
|
||||
id="import-button"
|
||||
name={t('label.import')}
|
||||
/>
|
||||
@ -316,7 +315,7 @@ const GlossaryHeader = ({
|
||||
? t('label.glossary')
|
||||
: t('label.glossary-term'),
|
||||
})}
|
||||
icon={<EditIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
||||
icon={EditIcon}
|
||||
id="rename-button"
|
||||
name={t('label.rename')}
|
||||
/>
|
||||
@ -338,7 +337,7 @@ const GlossaryHeader = ({
|
||||
description={t('message.edit-entity-style-description', {
|
||||
entity: t('label.glossary-term'),
|
||||
})}
|
||||
icon={<StyleIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
||||
icon={StyleIcon}
|
||||
id="rename-button"
|
||||
name={t('label.style')}
|
||||
/>
|
||||
@ -365,13 +364,7 @@ const GlossaryHeader = ({
|
||||
: t('label.glossary-term'),
|
||||
}
|
||||
)}
|
||||
icon={
|
||||
<Icon
|
||||
className="align-middle"
|
||||
component={IconDelete}
|
||||
style={{ fontSize: '16px' }}
|
||||
/>
|
||||
}
|
||||
icon={IconDelete}
|
||||
id="delete-button"
|
||||
name={t('label.delete')}
|
||||
/>
|
||||
|
@ -47,10 +47,7 @@ import {
|
||||
AssetsFilterOptions,
|
||||
ASSET_MENU_KEYS,
|
||||
} from '../../../../constants/Assets.constants';
|
||||
import {
|
||||
DE_ACTIVE_COLOR,
|
||||
ES_UPDATE_DELAY,
|
||||
} from '../../../../constants/constants';
|
||||
import { ES_UPDATE_DELAY } from '../../../../constants/constants';
|
||||
import { GLOSSARIES_DOCS } from '../../../../constants/docs.constants';
|
||||
import { ERROR_PLACEHOLDER_TYPE } from '../../../../enums/common.enum';
|
||||
import { EntityType } from '../../../../enums/entity.enum';
|
||||
@ -288,6 +285,11 @@ const AssetsTabs = forwardRef(
|
||||
}
|
||||
};
|
||||
|
||||
const onExploreCardDelete = useCallback((source: SourceType) => {
|
||||
setAssetToDelete(source);
|
||||
setShowDeleteModal(true);
|
||||
}, []);
|
||||
|
||||
const handleAssetButtonVisibleChange = (newVisible: boolean) =>
|
||||
setVisible(newVisible);
|
||||
|
||||
@ -321,7 +323,7 @@ const AssetsTabs = forwardRef(
|
||||
description={t('message.delete-asset-from-entity-type', {
|
||||
entityType: entityTypeString,
|
||||
})}
|
||||
icon={<DeleteIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
||||
icon={DeleteIcon}
|
||||
id="delete-button"
|
||||
name={t('label.delete')}
|
||||
/>
|
||||
@ -335,11 +337,6 @@ const AssetsTabs = forwardRef(
|
||||
},
|
||||
];
|
||||
|
||||
const onExploreCardDelete = useCallback((source: SourceType) => {
|
||||
setAssetToDelete(source);
|
||||
setShowDeleteModal(true);
|
||||
}, []);
|
||||
|
||||
const handleCheckboxChange = (
|
||||
selected: boolean,
|
||||
source: EntityDetailUnion
|
||||
@ -384,6 +381,69 @@ const AssetsTabs = forwardRef(
|
||||
}
|
||||
};
|
||||
|
||||
const onAssetRemove = useCallback(
|
||||
async (assetsData: SourceType[]) => {
|
||||
if (!activeEntity) {
|
||||
return;
|
||||
}
|
||||
|
||||
setAssetRemoving(true);
|
||||
|
||||
try {
|
||||
const entities = [...(assetsData?.values() ?? [])].map((item) => {
|
||||
return getEntityReferenceFromEntity(
|
||||
item as EntityDetailUnion,
|
||||
(item as EntityDetailUnion).entityType
|
||||
);
|
||||
});
|
||||
|
||||
switch (type) {
|
||||
case AssetsOfEntity.DATA_PRODUCT:
|
||||
await removeAssetsFromDataProduct(
|
||||
activeEntity.fullyQualifiedName ?? '',
|
||||
entities
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
case AssetsOfEntity.GLOSSARY:
|
||||
await removeAssetsFromGlossaryTerm(
|
||||
activeEntity as GlossaryTerm,
|
||||
entities
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
case AssetsOfEntity.DOMAIN:
|
||||
await removeAssetsFromDomain(
|
||||
activeEntity.fullyQualifiedName ?? '',
|
||||
entities
|
||||
);
|
||||
|
||||
break;
|
||||
default:
|
||||
// Handle other entity types here
|
||||
break;
|
||||
}
|
||||
|
||||
await new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve('');
|
||||
}, ES_UPDATE_DELAY);
|
||||
});
|
||||
} catch (err) {
|
||||
showErrorToast(err as AxiosError);
|
||||
} finally {
|
||||
setShowDeleteModal(false);
|
||||
onRemoveAsset?.();
|
||||
setAssetRemoving(false);
|
||||
hideNotification();
|
||||
setSelectedItems(new Map()); // Reset selected items
|
||||
}
|
||||
},
|
||||
[type, activeEntity, entityFqn]
|
||||
);
|
||||
|
||||
const deleteSelectedItems = useCallback(() => {
|
||||
if (selectedItems) {
|
||||
onAssetRemove(Array.from(selectedItems.values()));
|
||||
@ -655,69 +715,6 @@ const AssetsTabs = forwardRef(
|
||||
);
|
||||
}, [assetsHeader, assetListing, selectedCard]);
|
||||
|
||||
const onAssetRemove = useCallback(
|
||||
async (assetsData: SourceType[]) => {
|
||||
if (!activeEntity) {
|
||||
return;
|
||||
}
|
||||
|
||||
setAssetRemoving(true);
|
||||
|
||||
try {
|
||||
const entities = [...(assetsData?.values() ?? [])].map((item) => {
|
||||
return getEntityReferenceFromEntity(
|
||||
item as EntityDetailUnion,
|
||||
(item as EntityDetailUnion).entityType
|
||||
);
|
||||
});
|
||||
|
||||
switch (type) {
|
||||
case AssetsOfEntity.DATA_PRODUCT:
|
||||
await removeAssetsFromDataProduct(
|
||||
activeEntity.fullyQualifiedName ?? '',
|
||||
entities
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
case AssetsOfEntity.GLOSSARY:
|
||||
await removeAssetsFromGlossaryTerm(
|
||||
activeEntity as GlossaryTerm,
|
||||
entities
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
case AssetsOfEntity.DOMAIN:
|
||||
await removeAssetsFromDomain(
|
||||
activeEntity.fullyQualifiedName ?? '',
|
||||
entities
|
||||
);
|
||||
|
||||
break;
|
||||
default:
|
||||
// Handle other entity types here
|
||||
break;
|
||||
}
|
||||
|
||||
await new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve('');
|
||||
}, ES_UPDATE_DELAY);
|
||||
});
|
||||
} catch (err) {
|
||||
showErrorToast(err as AxiosError);
|
||||
} finally {
|
||||
setShowDeleteModal(false);
|
||||
onRemoveAsset?.();
|
||||
setAssetRemoving(false);
|
||||
hideNotification();
|
||||
setSelectedItems(new Map()); // Reset selected items
|
||||
}
|
||||
},
|
||||
[type, activeEntity, entityFqn]
|
||||
);
|
||||
|
||||
const clearFilters = useCallback(() => {
|
||||
setQuickFilterQuery(undefined);
|
||||
setSelectedQuickFilters((pre) => {
|
||||
|
@ -16,6 +16,7 @@ import {
|
||||
StopOutlined,
|
||||
UserOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import Icon from '@ant-design/icons/lib/components/Icon';
|
||||
import { IChangeEvent } from '@rjsf/core';
|
||||
import { RJSFSchema } from '@rjsf/utils';
|
||||
import validator from '@rjsf/validator-ajv8';
|
||||
@ -40,12 +41,7 @@ import { ReactComponent as IconExternalLink } from '../../../../assets/svg/exter
|
||||
import { ReactComponent as DeleteIcon } from '../../../../assets/svg/ic-delete.svg';
|
||||
import { ReactComponent as IconRestore } from '../../../../assets/svg/ic-restore.svg';
|
||||
import { ReactComponent as IconDropdown } from '../../../../assets/svg/menu.svg';
|
||||
|
||||
import Icon from '@ant-design/icons/lib/components/Icon';
|
||||
import {
|
||||
DE_ACTIVE_COLOR,
|
||||
ICON_DIMENSION,
|
||||
} from '../../../../constants/constants';
|
||||
import { ICON_DIMENSION } from '../../../../constants/constants';
|
||||
import { GlobalSettingOptions } from '../../../../constants/GlobalSettings.constants';
|
||||
import { ServiceCategory } from '../../../../enums/service.enum';
|
||||
import {
|
||||
@ -175,13 +171,7 @@ const AppDetails = () => {
|
||||
description={t('message.restore-action-description', {
|
||||
entityType: getEntityName(appData),
|
||||
})}
|
||||
icon={
|
||||
<IconRestore
|
||||
className="m-t-xss"
|
||||
name="Restore"
|
||||
width="18px"
|
||||
/>
|
||||
}
|
||||
icon={IconRestore}
|
||||
id="restore-button"
|
||||
name={t('label.restore')}
|
||||
/>
|
||||
@ -202,11 +192,7 @@ const AppDetails = () => {
|
||||
description={t('message.disable-app', {
|
||||
app: getEntityName(appData),
|
||||
})}
|
||||
icon={
|
||||
<StopOutlined
|
||||
style={{ fontSize: '18px', color: DE_ACTIVE_COLOR }}
|
||||
/>
|
||||
}
|
||||
icon={StopOutlined as SvgComponent}
|
||||
id="disable-button"
|
||||
name={t('label.disable')}
|
||||
/>
|
||||
@ -225,7 +211,7 @@ const AppDetails = () => {
|
||||
description={t('message.uninstall-app', {
|
||||
app: getEntityName(appData),
|
||||
})}
|
||||
icon={<DeleteIcon color={DE_ACTIVE_COLOR} width="18px" />}
|
||||
icon={DeleteIcon}
|
||||
id="uninstall-button"
|
||||
name={t('label.uninstall')}
|
||||
/>
|
||||
|
@ -51,7 +51,6 @@ import {
|
||||
GlobalSettingOptions,
|
||||
GlobalSettingsMenuCategory,
|
||||
} from '../../../../constants/GlobalSettings.constants';
|
||||
import { DROPDOWN_ICON_SIZE_PROPS } from '../../../../constants/ManageButton.constants';
|
||||
import { usePermissionProvider } from '../../../../context/PermissionProvider/PermissionProvider';
|
||||
import { ResourceEntity } from '../../../../context/PermissionProvider/PermissionProvider.interface';
|
||||
import { ERROR_PLACEHOLDER_TYPE } from '../../../../enums/common.enum';
|
||||
@ -464,13 +463,6 @@ const TeamDetailsV1 = ({
|
||||
return t('message.are-you-sure-want-to-text', { text });
|
||||
};
|
||||
|
||||
const restoreIcon = useMemo(
|
||||
() => (
|
||||
<IconRestore {...DROPDOWN_ICON_SIZE_PROPS} name={t('label.restore')} />
|
||||
),
|
||||
[currentTeam.isJoinable]
|
||||
);
|
||||
|
||||
const handleTeamExportClick = useCallback(async () => {
|
||||
if (currentTeam?.name) {
|
||||
showModal({
|
||||
@ -499,7 +491,7 @@ const TeamDetailsV1 = ({
|
||||
description={t('message.export-entity-help', {
|
||||
entity: t('label.team-lowercase'),
|
||||
})}
|
||||
icon={<ExportIcon width="18px" />}
|
||||
icon={ExportIcon}
|
||||
id="export"
|
||||
name={t('label.export')}
|
||||
/>
|
||||
@ -517,7 +509,7 @@ const TeamDetailsV1 = ({
|
||||
description={t('message.import-entity-help', {
|
||||
entity: t('label.team-lowercase'),
|
||||
})}
|
||||
icon={<ImportIcon width="20px" />}
|
||||
icon={ImportIcon}
|
||||
id="import-button"
|
||||
name={t('label.import')}
|
||||
/>
|
||||
@ -539,7 +531,7 @@ const TeamDetailsV1 = ({
|
||||
label: (
|
||||
<ManageButtonItemLabel
|
||||
description={t('message.restore-deleted-team')}
|
||||
icon={restoreIcon}
|
||||
icon={IconRestore}
|
||||
id="restore-team-dropdown"
|
||||
name={t('label.restore-entity', {
|
||||
entity: t('label.team'),
|
||||
@ -558,7 +550,7 @@ const TeamDetailsV1 = ({
|
||||
label: (
|
||||
<ManageButtonItemLabel
|
||||
description={t('message.access-to-collaborate')}
|
||||
icon={<IconOpenLock {...DROPDOWN_ICON_SIZE_PROPS} />}
|
||||
icon={IconOpenLock}
|
||||
id="open-group-dropdown"
|
||||
name={
|
||||
<Row>
|
||||
|
@ -248,7 +248,7 @@ export const UserTab = ({
|
||||
description={t('message.export-entity-help', {
|
||||
entity: t('label.user-lowercase'),
|
||||
})}
|
||||
icon={<ExportIcon width="18px" />}
|
||||
icon={ExportIcon}
|
||||
id="export"
|
||||
name={t('label.export')}
|
||||
/>
|
||||
@ -265,7 +265,7 @@ export const UserTab = ({
|
||||
description={t('message.import-entity-help', {
|
||||
entity: t('label.team-lowercase'),
|
||||
})}
|
||||
icon={<ImportIcon width="20px" />}
|
||||
icon={ImportIcon}
|
||||
id="import-button"
|
||||
name={t('label.import')}
|
||||
/>
|
||||
|
@ -25,7 +25,6 @@ import { ReactComponent as IconRestore } from '../../../../assets/svg/ic-restore
|
||||
import { ReactComponent as IconSetting } from '../../../../assets/svg/ic-settings-gray.svg';
|
||||
import { ReactComponent as IconDropdown } from '../../../../assets/svg/menu.svg';
|
||||
import { NO_PERMISSION_FOR_ACTION } from '../../../../constants/HelperTextUtil';
|
||||
import { DROPDOWN_ICON_SIZE_PROPS } from '../../../../constants/ManageButton.constants';
|
||||
import { EntityType } from '../../../../enums/entity.enum';
|
||||
import { ANNOUNCEMENT_ENTITIES } from '../../../../utils/AnnouncementsUtils';
|
||||
import { showErrorToast } from '../../../../utils/ToastUtils';
|
||||
@ -127,13 +126,7 @@ const ManageButton: FC<ManageButtonProps> = ({
|
||||
description={t('message.restore-action-description', {
|
||||
entityType,
|
||||
})}
|
||||
icon={
|
||||
<IconRestore
|
||||
className="m-t-xss"
|
||||
name="Restore"
|
||||
{...DROPDOWN_ICON_SIZE_PROPS}
|
||||
/>
|
||||
}
|
||||
icon={IconRestore}
|
||||
id="restore-button"
|
||||
name={t('label.restore')}
|
||||
/>
|
||||
@ -156,13 +149,7 @@ const ManageButton: FC<ManageButtonProps> = ({
|
||||
label: (
|
||||
<ManageButtonItemLabel
|
||||
description={t('message.announcement-action-description')}
|
||||
icon={
|
||||
<IconAnnouncementsBlack
|
||||
className="m-t-xss"
|
||||
name="announcement"
|
||||
{...DROPDOWN_ICON_SIZE_PROPS}
|
||||
/>
|
||||
}
|
||||
icon={IconAnnouncementsBlack}
|
||||
id="announcement-button"
|
||||
name={t('label.announcement-plural')}
|
||||
/>
|
||||
@ -184,7 +171,7 @@ const ManageButton: FC<ManageButtonProps> = ({
|
||||
description={t('message.update-displayName-entity', {
|
||||
entity: entityName,
|
||||
})}
|
||||
icon={<EditIcon width="18px" />}
|
||||
icon={EditIcon}
|
||||
id="rename-button"
|
||||
name={t('label.rename')}
|
||||
/>
|
||||
@ -207,13 +194,7 @@ const ManageButton: FC<ManageButtonProps> = ({
|
||||
deleteButtonDescription ??
|
||||
t('message.update-profiler-settings')
|
||||
}
|
||||
icon={
|
||||
<IconSetting
|
||||
className="m-t-xss"
|
||||
{...DROPDOWN_ICON_SIZE_PROPS}
|
||||
name="Profiler Settings"
|
||||
/>
|
||||
}
|
||||
icon={IconSetting}
|
||||
id="profiler-setting-button"
|
||||
name={t('label.profiler-setting-plural')}
|
||||
/>
|
||||
@ -237,13 +218,7 @@ const ManageButton: FC<ManageButtonProps> = ({
|
||||
entityType,
|
||||
})
|
||||
}
|
||||
icon={
|
||||
<IconDelete
|
||||
className="m-t-xss"
|
||||
{...DROPDOWN_ICON_SIZE_PROPS}
|
||||
name="Delete"
|
||||
/>
|
||||
}
|
||||
icon={IconDelete}
|
||||
id="delete-button"
|
||||
name={t('label.delete')}
|
||||
/>
|
||||
|
@ -10,6 +10,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Col, Row, Typography } from 'antd';
|
||||
import React from 'react';
|
||||
import { MangeButtonItemLabelProps } from './ManageButtonItemLabel.interface';
|
||||
@ -21,10 +22,12 @@ export const ManageButtonItemLabel = ({
|
||||
description,
|
||||
id,
|
||||
}: MangeButtonItemLabelProps) => {
|
||||
const Icon = icon;
|
||||
|
||||
return (
|
||||
<Row className="cursor-pointer" data-testid={id} onClick={onClick}>
|
||||
<Col className="self-center" data-testid={`${id}-icon`} span={3}>
|
||||
{icon}
|
||||
<Icon width="18px" />
|
||||
</Col>
|
||||
<Col
|
||||
className="text-left"
|
||||
|
@ -12,12 +12,14 @@
|
||||
*/
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import React from 'react';
|
||||
import { act } from 'react-test-renderer';
|
||||
import { ReactComponent as Icon } from '../../../assets/svg/teams-grey.svg';
|
||||
import { ManageButtonItemLabel } from './ManageButtonContentItem.component';
|
||||
import { MangeButtonItemLabelProps } from './ManageButtonItemLabel.interface';
|
||||
|
||||
const mockProps: MangeButtonItemLabelProps = {
|
||||
name: 'export',
|
||||
icon: null,
|
||||
icon: Icon,
|
||||
description: 'description',
|
||||
id: 'export',
|
||||
};
|
||||
@ -40,4 +42,15 @@ describe('ManageButtonContentItem component', () => {
|
||||
await screen.findByTestId(`${mockProps.id}-description`)
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should call onClick for clicking on item', async () => {
|
||||
const mockClick = jest.fn();
|
||||
render(<ManageButtonItemLabel {...mockProps} onClick={mockClick} />);
|
||||
|
||||
await act(async () => {
|
||||
screen.getByTestId(`${mockProps.id}`).click();
|
||||
});
|
||||
|
||||
expect(mockClick).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
@ -15,7 +15,7 @@ import { ReactNode } from 'react';
|
||||
export interface MangeButtonItemLabelProps {
|
||||
name: ReactNode;
|
||||
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
||||
icon: ReactNode;
|
||||
icon: SvgComponent;
|
||||
description: string;
|
||||
id: string;
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ import {
|
||||
sortTagsCaseInsensitive,
|
||||
} from '../../utils/CommonUtils';
|
||||
import { getQueryFilterForDatabase } from '../../utils/Database/Database.util';
|
||||
import entityUtilClassBase from '../../utils/EntityUtilClassBase';
|
||||
import { getEntityName } from '../../utils/EntityUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||
import { getTagsWithoutTier, getTierTags } from '../../utils/TableUtils';
|
||||
@ -118,6 +119,11 @@ const DatabaseDetails: FunctionComponent = () => {
|
||||
const [updateProfilerSetting, setUpdateProfilerSetting] =
|
||||
useState<boolean>(false);
|
||||
|
||||
const extraDropdownContent = entityUtilClassBase.getManageExtraOptions(
|
||||
EntityType.DATABASE,
|
||||
decodedDatabaseFQN
|
||||
);
|
||||
|
||||
const history = useHistory();
|
||||
const isMounting = useRef(true);
|
||||
|
||||
@ -645,6 +651,7 @@ const DatabaseDetails: FunctionComponent = () => {
|
||||
afterDomainUpdateAction={afterDomainUpdateAction}
|
||||
dataAsset={database}
|
||||
entityType={EntityType.DATABASE}
|
||||
extraDropdownContent={extraDropdownContent}
|
||||
openTaskCount={feedCount.openTaskCount}
|
||||
permissions={databasePermission}
|
||||
onDisplayNameUpdate={handleUpdateDisplayName}
|
||||
|
@ -79,6 +79,7 @@ import {
|
||||
getFeedCounts,
|
||||
sortTagsCaseInsensitive,
|
||||
} from '../../utils/CommonUtils';
|
||||
import entityUtilClassBase from '../../utils/EntityUtilClassBase';
|
||||
import { getEntityName } from '../../utils/EntityUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||
import { getTagsWithoutTier, getTierTags } from '../../utils/TableUtils';
|
||||
@ -126,6 +127,11 @@ const DatabaseSchemaPage: FunctionComponent = () => {
|
||||
const [updateProfilerSetting, setUpdateProfilerSetting] =
|
||||
useState<boolean>(false);
|
||||
|
||||
const extraDropdownContent = entityUtilClassBase.getManageExtraOptions(
|
||||
EntityType.DATABASE_SCHEMA,
|
||||
decodedDatabaseSchemaFQN
|
||||
);
|
||||
|
||||
const handleShowDeletedTables = (value: boolean) => {
|
||||
setShowDeletedTables(value);
|
||||
setCurrentTablesPage(INITIAL_PAGING_VALUE);
|
||||
@ -717,6 +723,7 @@ const DatabaseSchemaPage: FunctionComponent = () => {
|
||||
afterDomainUpdateAction={afterDomainUpdateAction}
|
||||
dataAsset={databaseSchema}
|
||||
entityType={EntityType.DATABASE_SCHEMA}
|
||||
extraDropdownContent={extraDropdownContent}
|
||||
permissions={databaseSchemaPermission}
|
||||
onDisplayNameUpdate={handleUpdateDisplayName}
|
||||
onOwnerUpdate={handleUpdateOwner}
|
||||
|
@ -25,7 +25,6 @@ import IconGoogle from '../../assets/img/icon-google.png';
|
||||
import IconOkta from '../../assets/img/icon-okta.png';
|
||||
import loginBG from '../../assets/img/login-bg.png';
|
||||
import { ReactComponent as IconFailBadge } from '../../assets/svg/fail-badge.svg';
|
||||
|
||||
import { useBasicAuth } from '../../components/Auth/AuthProviders/BasicAuthProvider';
|
||||
import BrandImage from '../../components/common/BrandImage/BrandImage';
|
||||
import Loader from '../../components/common/Loader/Loader';
|
||||
@ -308,7 +307,7 @@ const SignInPage = () => {
|
||||
<Col className="relative" span={16}>
|
||||
<div className="absolute inset-0">
|
||||
<img
|
||||
alt="bg-image"
|
||||
alt="Login Background"
|
||||
className="w-full h-full"
|
||||
data-testid="bg-image"
|
||||
src={loginBG}
|
||||
|
@ -266,6 +266,7 @@ const ServiceDetailsPage: FunctionComponent = () => {
|
||||
const response = await getIngestionPipelines({
|
||||
arrQueryFields: ['owner', 'pipelineStatuses'],
|
||||
serviceFilter: decodedServiceFQN,
|
||||
serviceType: getEntityTypeFromServiceCategory(serviceCategory),
|
||||
paging,
|
||||
pipelineType: [
|
||||
PipelineType.Metadata,
|
||||
|
@ -91,6 +91,7 @@ import {
|
||||
} from '../../utils/CommonUtils';
|
||||
import { defaultFields } from '../../utils/DatasetDetailsUtils';
|
||||
import EntityLink from '../../utils/EntityLink';
|
||||
import entityUtilClassBase from '../../utils/EntityUtilClassBase';
|
||||
import { getEntityName } from '../../utils/EntityUtils';
|
||||
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||
import { getTagsWithoutTier, getTierTags } from '../../utils/TableUtils';
|
||||
@ -126,6 +127,11 @@ const TableDetailsPageV1: React.FC = () => {
|
||||
DEFAULT_ENTITY_PERMISSION
|
||||
);
|
||||
|
||||
const extraDropdownContent = entityUtilClassBase.getManageExtraOptions(
|
||||
EntityType.TABLE,
|
||||
datasetFQN
|
||||
);
|
||||
|
||||
const viewUsagePermission = useMemo(
|
||||
() => tablePermissions.ViewAll || tablePermissions.ViewUsage,
|
||||
[tablePermissions]
|
||||
@ -1025,6 +1031,7 @@ const TableDetailsPageV1: React.FC = () => {
|
||||
afterDomainUpdateAction={updateTableDetailsState}
|
||||
dataAsset={tableDetails}
|
||||
entityType={EntityType.TABLE}
|
||||
extraDropdownContent={extraDropdownContent}
|
||||
openTaskCount={feedCount.openTaskCount}
|
||||
permissions={tablePermissions}
|
||||
onDisplayNameUpdate={handleDisplayNameUpdate}
|
||||
|
@ -20,7 +20,7 @@ import { ReactComponent as IconDisableTag } from '../assets/svg/disable-tag.svg'
|
||||
import { ReactComponent as EditIcon } from '../assets/svg/edit-new.svg';
|
||||
import { ManageButtonItemLabel } from '../components/common/ManageButtonContentItem/ManageButtonContentItem.component';
|
||||
import RichTextEditorPreviewer from '../components/common/RichTextEditor/RichTextEditorPreviewer';
|
||||
import { DE_ACTIVE_COLOR, NO_DATA_PLACEHOLDER } from '../constants/constants';
|
||||
import { NO_DATA_PLACEHOLDER } from '../constants/constants';
|
||||
import { OperationPermission } from '../context/PermissionProvider/PermissionProvider.interface';
|
||||
import { ProviderType } from '../generated/entity/bot';
|
||||
import { Tag } from '../generated/entity/classification/tag';
|
||||
@ -228,7 +228,7 @@ export const getClassificationExtraDropdownContent = (
|
||||
? t('message.enable-classification-description')
|
||||
: t('message.disable-classification-description')
|
||||
}
|
||||
icon={<IconDisableTag color={DE_ACTIVE_COLOR} width="18px" />}
|
||||
icon={IconDisableTag}
|
||||
id="enable-disable"
|
||||
name={
|
||||
isClassificationDisabled
|
||||
|
@ -10,6 +10,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { ItemType } from 'antd/lib/menu/hooks/useItems';
|
||||
import DataProductsPage from '../components/DataProducts/DataProductsPage/DataProductsPage.component';
|
||||
import {
|
||||
getEditWebhookPath,
|
||||
@ -281,6 +283,13 @@ class EntityUtilClassBase {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public getManageExtraOptions(
|
||||
_entityType?: EntityType,
|
||||
_fqn?: string
|
||||
): ItemType[] {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
const entityUtilClassBase = new EntityUtilClassBase();
|
||||
|
Loading…
x
Reference in New Issue
Block a user