diff --git a/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js b/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js
index 31a136e54f5..01a7b41bb85 100644
--- a/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js
+++ b/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js
@@ -68,6 +68,7 @@ export const SEARCH_ENTITY_TABLE = {
displayName: 'raw_product_catalog',
entity: MYDATA_SUMMARY_OPTIONS.tables,
serviceName: 'sample_data',
+ schemaName: 'shopify',
},
table_4: {
term: 'dim_address',
diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/RestoreEntity.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/RestoreEntity.spec.js
new file mode 100644
index 00000000000..e47c5b65469
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/RestoreEntity.spec.js
@@ -0,0 +1,181 @@
+/*
+ * Copyright 2023 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.
+ */
+
+import {
+ interceptURL,
+ toastNotification,
+ verifyResponseStatusCode,
+ visitEntityDetailsPage,
+} from '../../common/common';
+import { DELETE_TERM, SEARCH_ENTITY_TABLE } from '../../constants/constants';
+
+const ENTITY_TABLE = SEARCH_ENTITY_TABLE.table_3;
+
+describe('Restore entity functionality should work properly', () => {
+ beforeEach(() => {
+ cy.login();
+ });
+
+ it('Soft Delete entity table', () => {
+ visitEntityDetailsPage(
+ ENTITY_TABLE.term,
+ ENTITY_TABLE.serviceName,
+ ENTITY_TABLE.entity
+ );
+
+ cy.get('[data-testid="manage-button"]').should('exist').click();
+
+ cy.get('[data-testid="delete-button-title"]').should('exist').click();
+
+ cy.get('.ant-modal-header')
+ .should('be.visible')
+ .contains(`Delete ${ENTITY_TABLE.displayName}`);
+
+ cy.get('[data-testid="soft-delete-option"]').should('exist').click();
+
+ cy.get('[data-testid="confirm-button"]').should('be.disabled');
+ cy.get('[data-testid="confirmation-text-input"]')
+ .should('exist')
+ .type(DELETE_TERM);
+
+ interceptURL(
+ 'DELETE',
+ 'api/v1/tables/*?hardDelete=false&recursive=false',
+ 'softDeleteTable'
+ );
+ cy.get('[data-testid="confirm-button"]')
+ .should('be.visible')
+ .should('not.be.disabled')
+ .click();
+ verifyResponseStatusCode('@softDeleteTable', 200);
+
+ toastNotification('Table deleted successfully!');
+ });
+
+ it('Check Soft Deleted entity table', () => {
+ cy.get('[data-testid="appbar-item-explore"]').should('exist').click();
+ interceptURL(
+ 'GET',
+ 'api/v1/search/query?q=&index=table_search_index&from=0&size=10&deleted=true&query_filter=%7B%22query%22%3A%7B%22bool%22%3A%7B%7D%7D%7D&sort_field=_score&sort_order=desc',
+ 'showDeletedTables'
+ );
+ cy.get('[data-testid="show-deleted"]').should('exist').click();
+ verifyResponseStatusCode('@showDeletedTables', 200);
+
+ cy.get('[data-testid="sample_data-raw_product_catalog"]')
+ .should('exist')
+ .click();
+
+ cy.get('[data-testid="inactive-link"]')
+ .should('be.visible')
+ .contains(ENTITY_TABLE.displayName);
+
+ cy.get('[data-testid="deleted-badge"]').should('exist');
+ });
+
+ it("Check Soft Deleted table in it's Schema", () => {
+ cy.get('[data-testid="appbar-item-explore"]').should('exist').click();
+ interceptURL(
+ 'GET',
+ 'api/v1/search/query?q=&index=table_search_index&from=0&size=10&deleted=true&query_filter=%7B%22query%22%3A%7B%22bool%22%3A%7B%7D%7D%7D&sort_field=_score&sort_order=desc',
+ 'showDeletedTables'
+ );
+ cy.get('[data-testid="show-deleted"]').should('exist').click();
+ verifyResponseStatusCode('@showDeletedTables', 200);
+
+ cy.get('[data-testid="sample_data-raw_product_catalog"]')
+ .should('exist')
+ .click();
+
+ cy.get('[data-testid="inactive-link"]')
+ .should('be.visible')
+ .contains(ENTITY_TABLE.displayName);
+
+ cy.get('[data-testid="breadcrumb-link"]')
+ .should('be.visible')
+ .within(() => {
+ cy.contains(ENTITY_TABLE.displayName);
+ });
+
+ cy.get('[data-testid="deleted-badge"]').should('exist');
+
+ cy.get('[data-testid="breadcrumb-link"]')
+ .should('be.visible')
+ .within(() => {
+ cy.contains(ENTITY_TABLE.schemaName).click();
+ });
+
+ cy.get('[data-testid="manage-button"]').should('exist').click();
+
+ cy.get('[data-testid="deleted-table-menu-item-label"]')
+ .should('exist')
+ .contains('Show Deleted Table');
+
+ cy.get('[data-testid="deleted-table-menu-item-switch')
+ .should('exist')
+ .click();
+
+ cy.get('[data-testid="Tables"] [data-testid="filter-count"]')
+ .should('exist')
+ .contains('1');
+
+ cy.get('.ant-table-row > :nth-child(1)')
+ .should('exist')
+ .contains(ENTITY_TABLE.displayName);
+ });
+
+ it('Restore Soft Deleted table', () => {
+ cy.get('[data-testid="appbar-item-explore"]').should('exist').click();
+ interceptURL(
+ 'GET',
+ 'api/v1/search/query?q=&index=table_search_index&from=0&size=10&deleted=true&query_filter=%7B%22query%22%3A%7B%22bool%22%3A%7B%7D%7D%7D&sort_field=_score&sort_order=desc',
+ 'showDeletedTables'
+ );
+ cy.get('[data-testid="show-deleted"]').should('exist').click();
+ verifyResponseStatusCode('@showDeletedTables', 200);
+
+ cy.get('[data-testid="sample_data-raw_product_catalog"]')
+ .should('exist')
+ .click();
+
+ cy.get('[data-testid="inactive-link"]')
+ .should('be.visible')
+ .contains(ENTITY_TABLE.displayName);
+
+ cy.get('[data-testid="breadcrumb-link"]')
+ .should('be.visible')
+ .within(() => {
+ cy.contains(ENTITY_TABLE.displayName);
+ });
+
+ cy.get('[data-testid="deleted-badge"]').should('exist');
+
+ cy.get('[data-testid="manage-button"]').should('exist').click();
+
+ cy.get('[data-testid="restore-button"]').should('be.visible').click();
+
+ cy.get('.ant-modal-header').should('be.visible').contains('Restore table');
+
+ cy.get('[data-testid="restore-modal-body"]')
+ .should('be.visible')
+ .contains(
+ `Are you sure you want to restore ${ENTITY_TABLE.displayName}?`
+ );
+
+ cy.get('.ant-btn-primary').should('be.visible').contains('Restore').click();
+
+ cy.wait(500);
+
+ cy.get('[data-testid="deleted-badge"]').should('not.exist');
+ });
+});
diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/TagsAddRemove.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/TagsAddRemove.spec.js
index bb607f792bc..21638a86bc6 100644
--- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/TagsAddRemove.spec.js
+++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/TagsAddRemove.spec.js
@@ -68,7 +68,7 @@ describe('Check if tags addition and removal flow working properly from tables',
);
cy.get(
- '[data-testid="entity-tags"] [data-testid="tags-wrapper"] > [data-testid="tag-container"] [data-testid="tags"] > [data-testid="add-tag"] > span'
+ '[data-testid="entity-tags"] [data-testid="tags-wrapper"] [data-testid="tag-container"] [data-testid="tags"] [data-testid="add-tag"] span'
)
.should('be.visible')
.click();
@@ -87,13 +87,13 @@ describe('Check if tags addition and removal flow working properly from tables',
if (entityDetails.entity === 'mlmodels') {
cy.get(
- `[data-testid="feature-card-${entityDetails.fieldName}"] [data-testid="tag-container"] [data-testid="tags"] > [data-testid="add-tag"] > span`
+ `[data-testid="feature-card-${entityDetails.fieldName}"] [data-testid="tag-container"] [data-testid="tags"] > [data-testid="add-tag"] span`
)
.should('be.visible')
.click();
} else {
cy.get(
- `.ant-table-tbody [data-testid="tag-container"] [data-testid="add-tag"]>span`
+ `.ant-table-tbody [data-testid="tag-container"] [data-testid="add-tag"] span`
)
.eq(0)
.should('be.visible')
diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/closed-lock.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/closed-lock.svg
index 11296a696f2..e5ef99c536c 100644
--- a/openmetadata-ui/src/main/resources/ui/src/assets/svg/closed-lock.svg
+++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/closed-lock.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/hide-password.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/hide-password.svg
index 5e0da9930fd..1e863deec00 100644
--- a/openmetadata-ui/src/main/resources/ui/src/assets/svg/hide-password.svg
+++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/hide-password.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-restore.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-restore.svg
index 6d05d23735a..2c42246c4ce 100644
--- a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-restore.svg
+++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-restore.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/open-lock.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/open-lock.svg
index 0fa88109e03..8e3f16684c4 100644
--- a/openmetadata-ui/src/main/resources/ui/src/assets/svg/open-lock.svg
+++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/open-lock.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/show-password.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/show-password.svg
index 916a8a4038f..9ed544ff8ab 100644
--- a/openmetadata-ui/src/main/resources/ui/src/assets/svg/show-password.svg
+++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/show-password.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx
index 445fc1545d6..177747756c1 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx
@@ -28,6 +28,7 @@ import { ItemType } from 'antd/lib/menu/hooks/useItems';
import { ColumnsType } from 'antd/lib/table';
import { AxiosError } from 'axios';
import classNames from 'classnames';
+import { DROPDOWN_ICON_SIZE_PROPS } from 'constants/ManageButton.constants';
import { ERROR_PLACEHOLDER_TYPE } from 'enums/common.enum';
import { compare } from 'fast-json-patch';
import { cloneDeep, isEmpty, isUndefined, orderBy, uniqueId } from 'lodash';
@@ -39,7 +40,11 @@ import { Link } from 'react-router-dom';
import { restoreTeam } from 'rest/teamsAPI';
import AppState from '../../AppState';
import { ReactComponent as IconEdit } from '../../assets/svg/ic-edit.svg';
+import { ReactComponent as IconRestore } from '../../assets/svg/ic-restore.svg';
import { ReactComponent as IconDropdown } from '../../assets/svg/menu.svg';
+import { ReactComponent as IconOpenLock } from '../../assets/svg/open-lock.svg';
+import { ReactComponent as IconRemove } from '../../assets/svg/Remove.svg';
+import { ReactComponent as IconShowPassword } from '../../assets/svg/show-password.svg';
import {
getTeamAndUserDetailsPath,
getUserPath,
@@ -73,7 +78,6 @@ import {
DEFAULT_ENTITY_PERMISSION,
} from '../../utils/PermissionsUtils';
import { getTeamsWithFqnPath } from '../../utils/RouterUtils';
-import SVGIcons, { Icons } from '../../utils/SvgUtils';
import {
filterChildTeams,
getDeleteMessagePostFix,
@@ -290,13 +294,7 @@ const TeamDetailsV1 = ({
- }
+ icon={}
type="text"
onClick={() => deleteUserHandler(record.id)}
/>
@@ -624,29 +622,9 @@ const TeamDetailsV1 = ({
return t('message.are-you-sure-want-to-text', { text });
};
- const deletedTeamIcon = useMemo(
- () => (
-
- ),
- [showDeletedTeam]
- );
-
- const openGroupIcon = useMemo(
- () => (
-
- ),
- [currentTeam.isJoinable]
- );
-
const restoreIcon = useMemo(
() => (
-
+
),
[currentTeam.isJoinable]
);
@@ -654,18 +632,18 @@ const TeamDetailsV1 = ({
const DELETED_TOGGLE_MENU_ITEM = {
label: (
- {deletedTeamIcon}
+
+
+
- {t(
- showDeletedTeam
- ? 'label.hide-deleted-team'
- : 'label.show-deleted-team'
- )}
+ {t('label.show-deleted-entity', {
+ entity: t('label.team'),
+ })}
@@ -680,7 +658,10 @@ const TeamDetailsV1 = ({
- {t('message.view-deleted-teams')}
+ {t('message.view-deleted-entity', {
+ entity: t('label.team-plural'),
+ parent: t('label.team'),
+ })}
@@ -728,18 +709,16 @@ const TeamDetailsV1 = ({
className="cursor-pointer"
data-testid="deleted-team-menu-item"
onClick={handleOpenToJoinToggle}>
- {openGroupIcon}
+
+
+
- {`${
- currentTeam.isJoinable
- ? t('label.close')
- : t('label.open')
- } ${t('label.group')}`}
+ {t('label.public-team')}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx
index c377cbde4df..d91315f5632 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx
@@ -13,6 +13,7 @@
import { ExclamationCircleOutlined, StarFilled } from '@ant-design/icons';
import { Button, Popover, Space, Tooltip } from 'antd';
+import { ItemType } from 'antd/lib/menu/hooks/useItems';
import { AxiosError } from 'axios';
import classNames from 'classnames';
import Tags from 'components/Tag/Tags/tags';
@@ -90,6 +91,7 @@ interface Props {
onRestoreEntity?: () => void;
allowSoftDelete?: boolean;
isRecursiveDelete?: boolean;
+ extraDropdownContent?: ItemType[];
}
const EntityPageInfo = ({
@@ -123,6 +125,7 @@ const EntityPageInfo = ({
onRestoreEntity,
isRecursiveDelete = false,
allowSoftDelete,
+ extraDropdownContent,
}: Props) => {
const history = useHistory();
const tagThread = entityFieldThreads?.[0];
@@ -466,6 +469,7 @@ const EntityPageInfo = ({
entityId={entityId}
entityName={entityName}
entityType={entityType}
+ extraDropdownContent={extraDropdownContent}
isRecursiveDelete={isRecursiveDelete}
onAnnouncementClick={() => setIsAnnouncementDrawer(true)}
onRestoreEntity={onRestoreEntity}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/ManageButton/ManageButton.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/ManageButton/ManageButton.tsx
index ef24944a6e5..aec9f1bf1ba 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/ManageButton/ManageButton.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/ManageButton/ManageButton.tsx
@@ -14,6 +14,7 @@
import { Button, Col, Dropdown, Modal, Row, Tooltip, Typography } from 'antd';
import { ItemType } from 'antd/lib/menu/hooks/useItems';
import classNames from 'classnames';
+import { DROPDOWN_ICON_SIZE_PROPS } from 'constants/ManageButton.constants';
import React, { FC, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { ReactComponent as IconAnnouncementsBlack } from '../../../../assets/svg/announcements-black.svg';
@@ -89,7 +90,11 @@ const ManageButton: FC = ({
}
}}>
-
+
@@ -134,7 +139,7 @@ const ManageButton: FC = ({
@@ -178,7 +183,7 @@ const ManageButton: FC = ({
diff --git a/openmetadata-ui/src/main/resources/ui/src/constants/ManageButton.constants.ts b/openmetadata-ui/src/main/resources/ui/src/constants/ManageButton.constants.ts
new file mode 100644
index 00000000000..91ca8aa92ee
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/constants/ManageButton.constants.ts
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2023 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.
+ */
+
+export const DROPDOWN_ICON_SIZE_PROPS = {
+ width: 20,
+ height: 20,
+};
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json
index 18b2fb4d2b7..3d05c00921a 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json
@@ -348,7 +348,7 @@
"has-been-action-type-lowercase": "has been {{actionType}}",
"here-lowercase": "here",
"hide": "Hide",
- "hide-deleted-team": "Hide Deleted Team",
+ "hide-deleted-entity": "Hide Deleted {{entity}}",
"home": "Home",
"hour": "Hour",
"http-config-source": "HTTP Config Source",
@@ -576,6 +576,7 @@
"project-id": "Project ID",
"project-lowercase": "project",
"property": "Property",
+ "public-team": "Public Team",
"quality": "Quality",
"query": "Query",
"query-log-duration": "Query Log Duration",
@@ -692,7 +693,7 @@
"shift": "Shift",
"show": "Show",
"show-deleted": "Show Deleted",
- "show-deleted-team": "Show Deleted Team",
+ "show-deleted-entity": "Show Deleted {{entity}}",
"show-or-hide-advanced-config": "{{showAdv}} Advanced Config",
"sign-in-with-sso": "Sign in with {{sso}}",
"skew": "Skew",
@@ -1169,7 +1170,7 @@
"user-mentioned-in-comment": "{{user}} mentioned you in a comment.",
"user-verified-successfully": "User Verified Successfully",
"valid-url-endpoint": "Endpoints should be valid URL",
- "view-deleted-teams": "View All the Deleted Teams, which come under this Team.",
+ "view-deleted-entity": "View All the Deleted {{entity}}, which come under this {{parent}}.",
"view-sample-data": "To view Sample Data, run the Profiler Ingestion. Please refer to this doc to schedule the",
"view-sample-data-message": "To view Sample Data, run the MetaData Ingestion. Please refer to this doc to schedule the",
"view-test-suite": "View test suite",
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json
index dba88b6ef16..9d55d64356d 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json
@@ -348,7 +348,7 @@
"has-been-action-type-lowercase": "has been {{actionType}}",
"here-lowercase": "here",
"hide": "Masquer",
- "hide-deleted-team": "Hide Deleted Team",
+ "hide-deleted-entity": "Hide Deleted {{entity}}",
"home": "Home",
"hour": "Hour",
"http-config-source": "HTTP Config Source",
@@ -576,6 +576,7 @@
"project-id": "Project ID",
"project-lowercase": "project",
"property": "Property",
+ "public-team": "Public Team",
"quality": "Qualité",
"query": "Query",
"query-log-duration": "Query Log Duration",
@@ -692,7 +693,7 @@
"shift": "Shift",
"show": "Voir",
"show-deleted": "Montrer les Supprimé.es",
- "show-deleted-team": "Show Deleted Team",
+ "show-deleted-entity": "Show Deleted {{entity}}",
"show-or-hide-advanced-config": "{{showAdv}} Config Avancée",
"sign-in-with-sso": "Sign in with {{sso}}",
"skew": "Skew",
@@ -1169,7 +1170,7 @@
"user-mentioned-in-comment": "{{user}} mentioned you in a comment.",
"user-verified-successfully": "User Verified Successfully",
"valid-url-endpoint": "Endpoints should be valid URL",
- "view-deleted-teams": "Voir toutes les équipes supprimées qui relèvent de cette équipe.",
+ "view-deleted-entity": "View All the Deleted {{entity}}, which come under this {{parent}}.",
"view-sample-data": "To view Sample Data, run the Profiler Ingestion. Please refer to this doc to schedule the",
"view-sample-data-message": "To view Sample Data, run the MetaData Ingestion. Please refer to this doc to schedule the",
"view-test-suite": "View test suite",
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json
index a95f2d4934f..030312c9cbe 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json
@@ -348,7 +348,7 @@
"has-been-action-type-lowercase": "has been {{actionType}}",
"here-lowercase": "ここ",
"hide": "隠す",
- "hide-deleted-team": "削除されたチームを隠す",
+ "hide-deleted-entity": "Hide Deleted {{entity}}",
"home": "ホーム",
"hour": "時",
"http-config-source": "HTTP Config Source",
@@ -576,6 +576,7 @@
"project-id": "プロジェクトID",
"project-lowercase": "プロジェクト",
"property": "プロパティ",
+ "public-team": "Public Team",
"quality": "品質",
"query": "クエリ",
"query-log-duration": "クエリログの時間",
@@ -692,7 +693,7 @@
"shift": "Shift",
"show": "Show",
"show-deleted": "削除された項目も表示",
- "show-deleted-team": "削除されたチームも表示",
+ "show-deleted-entity": "Show Deleted {{entity}}",
"show-or-hide-advanced-config": "{{showAdv}} 高度な設定",
"sign-in-with-sso": "{{sso}}でサインインする",
"skew": "Skew",
@@ -1169,7 +1170,7 @@
"user-mentioned-in-comment": "{{user}}がコメントであなたにメンションしました。",
"user-verified-successfully": "ユーザ認証に成功しました",
"valid-url-endpoint": "エンドポイントは有効なURLでなければなりません",
- "view-deleted-teams": "このチームの下にある全ての削除されたチームを表示する。",
+ "view-deleted-entity": "View All the Deleted {{entity}}, which come under this {{parent}}.",
"view-sample-data": "To view Sample Data, run the Profiler Ingestion. Please refer to this doc to schedule the",
"view-sample-data-message": "To view Sample Data, run the MetaData Ingestion. Please refer to this doc to schedule the",
"view-test-suite": "View test suite",
diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json
index 210c081581d..32dfbc055aa 100644
--- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json
+++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json
@@ -348,7 +348,7 @@
"has-been-action-type-lowercase": "has been {{actionType}}",
"here-lowercase": "这儿",
"hide": "隐藏",
- "hide-deleted-team": "Hide Deleted Team",
+ "hide-deleted-entity": "Hide Deleted {{entity}}",
"home": "Home",
"hour": "Hour",
"http-config-source": "HTTP Config Source",
@@ -576,6 +576,7 @@
"project-id": "Project ID",
"project-lowercase": "project",
"property": "属性",
+ "public-team": "Public Team",
"quality": "质量",
"query": "查询",
"query-log-duration": "Query Log Duration",
@@ -692,7 +693,7 @@
"shift": "Shift",
"show": "显示",
"show-deleted": "显示被删除",
- "show-deleted-team": "Show Deleted Team",
+ "show-deleted-entity": "Show Deleted {{entity}}",
"show-or-hide-advanced-config": "{{showAdv}} 高级配置",
"sign-in-with-sso": "Sign in with {{sso}}",
"skew": "Skew",
@@ -1169,7 +1170,7 @@
"user-mentioned-in-comment": "{{user}} mentioned you in a comment.",
"user-verified-successfully": "User Verified Successfully",
"valid-url-endpoint": "Endpoints should be valid URL",
- "view-deleted-teams": "View all the Deleted Teams, which come under this Team.",
+ "view-deleted-entity": "View All the Deleted {{entity}}, which come under this {{parent}}.",
"view-sample-data": "To view Sample Data, run the Profiler Ingestion. Please refer to this doc to schedule the",
"view-sample-data-message": "To view Sample Data, run the MetaData Ingestion. Please refer to this doc to schedule the",
"view-test-suite": "View test suite",
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx
index bba6c12b795..30a7d26afbe 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx
@@ -11,7 +11,16 @@
* limitations under the License.
*/
-import { Card, Col, Row, Skeleton, Table as TableAntd } from 'antd';
+import {
+ Card,
+ Col,
+ Row,
+ Skeleton,
+ Switch,
+ Table as TableAntd,
+ Typography,
+} from 'antd';
+import { ItemType } from 'antd/lib/menu/hooks/useItems';
import { ColumnsType } from 'antd/lib/table';
import { AxiosError } from 'axios';
import ActivityFeedList from 'components/ActivityFeed/ActivityFeedList/ActivityFeedList';
@@ -30,6 +39,7 @@ import {
OperationPermission,
ResourceEntity,
} from 'components/PermissionProvider/PermissionProvider.interface';
+import { DROPDOWN_ICON_SIZE_PROPS } from 'constants/ManageButton.constants';
import { compare, Operation } from 'fast-json-patch';
import { TagLabel } from 'generated/type/tagLabel';
import { isUndefined, startCase, toNumber } from 'lodash';
@@ -58,6 +68,7 @@ import {
} from 'rest/feedsAPI';
import { searchQuery } from 'rest/searchAPI';
import { default as AppState, default as appState } from '../../AppState';
+import { ReactComponent as IconShowPassword } from '../../assets/svg/show-password.svg';
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
import {
getDatabaseDetailsPath,
@@ -160,6 +171,8 @@ const DatabaseSchemaPage: FunctionComponent = () => {
const [tags, setTags] = useState>([]);
const [tier, setTier] = useState();
+ const [showDeletedTables, setShowDeletedTables] = useState(false);
+
const fetchDatabaseSchemaPermission = async () => {
setIsLoading(true);
try {
@@ -347,7 +360,7 @@ const DatabaseSchemaPage: FunctionComponent = () => {
sortOrder: 'asc',
pageSize: PAGE_SIZE,
searchIndex: SearchIndex.TABLE,
- includeDeleted: false,
+ includeDeleted: showDeletedTables,
});
setTableData(getTablesFromSearchResponse(res));
setTableInstanceCount(res.hits.total.value);
@@ -670,6 +683,53 @@ const DatabaseSchemaPage: FunctionComponent = () => {
);
};
+ const extraDropdownContent: ItemType[] = useMemo(
+ () => [
+ {
+ label: (
+
+
+
+
+
+
+
+
+ {t('label.show-deleted-entity', {
+ entity: t('label.table'),
+ })}
+
+
+
+
+
+
+
+
+
+ {t('message.view-deleted-entity', {
+ entity: t('label.table-plural'),
+ parent: t('label.schema'),
+ })}
+
+
+
+
+
+ ),
+ key: 'deleted-team-dropdown',
+ },
+ ],
+ [showDeletedTables]
+ );
+
useEffect(() => {
if (TabSpecificField.ACTIVITY_FEED === tab) {
fetchActivityFeed();
@@ -700,13 +760,13 @@ const DatabaseSchemaPage: FunctionComponent = () => {
useEffect(() => {
tablePaginationHandler(INITIAL_PAGING_VALUE);
- }, [databaseSchema]);
+ }, [showDeletedTables, databaseSchema]);
useEffect(() => {
fetchDatabaseSchemaPermission();
}, [databaseSchemaFQN]);
- // alwyas Keep this useEffect at the end...
+ // always Keep this useEffect at the end...
useEffect(() => {
isMounting.current = false;
appState.inPageSearchText = '';
@@ -753,6 +813,7 @@ const DatabaseSchemaPage: FunctionComponent = () => {
entityId={databaseSchemaId}
entityName={databaseSchemaName}
entityType={EntityType.DATABASE_SCHEMA}
+ extraDropdownContent={extraDropdownContent}
extraInfo={extraInfo}
followersList={[]}
isTagEditable={