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 index 55dc7615fc2..0f4e0508555 100644 --- 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 @@ -115,21 +115,16 @@ describe('Restore entity functionality should work properly', () => { .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'); - interceptURL( 'GET', '/api/v1/search/query?q=*&index=table_search_index&from=0&size=10&deleted=true&sort_field=name.keyword&sort_order=asc', 'queryDeletedTables' ); - cy.get('[data-testid="deleted-table-menu-item-switch') - .should('exist') - .click(); + + cy.get('[data-testid="show-deleted"]').should('exist').click(); + verifyResponseStatusCode('@queryDeletedTables', 200); + cy.get('[data-testid="table"] [data-testid="count"]') .should('exist') .contains('1'); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Teams.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Teams.spec.js index 7c651e01445..d66f3da495d 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Teams.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Teams.spec.js @@ -356,11 +356,7 @@ describe('Teams flow should work properly', () => { // Check if soft deleted team is shown when 'Deleted Teams' switch is on cy.get('table').should('not.contain', TEAM_DETAILS.name); - cy.get('[data-testid="header"] [data-testid="manage-button"]') - .should('exist') - .click(); - - cy.get('[data-testid="deleted-menu-item-switch"').should('exist').click(); + cy.get('[data-testid="show-deleted"').should('exist').click(); interceptURL( 'GET', diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelsTable.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelsTable.tsx index 7a28636b7ec..a27638c3e30 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelsTable.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelsTable.tsx @@ -11,7 +11,7 @@ * limitations under the License. */ -import { Table } from 'antd'; +import { Col, Table } from 'antd'; import { ColumnsType } from 'antd/lib/table'; import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder'; import NextPrevious from 'components/common/next-previous/NextPrevious'; @@ -74,7 +74,7 @@ const DataModelTable = ({ } return ( -
+ )} - + ); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamDetailsV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamDetailsV1.tsx index c9e37705eb7..743b7825b3d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamDetailsV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamDetailsV1.tsx @@ -30,7 +30,6 @@ import { ReactComponent as ExportIcon } from 'assets/svg/ic-export.svg'; import { ReactComponent as ImportIcon } from 'assets/svg/ic-import.svg'; import { ReactComponent as IconRestore } from 'assets/svg/ic-restore.svg'; import { ReactComponent as IconOpenLock } from 'assets/svg/open-lock.svg'; -import { ReactComponent as IconShowPassword } from 'assets/svg/show-password.svg'; import { AxiosError } from 'axios'; import classNames from 'classnames'; import { ManageButtonItemLabel } from 'components/common/ManageButtonContentItem/ManageButtonContentItem.component'; @@ -195,7 +194,7 @@ const TeamDetailsV1 = ({ }>(DELETE_USER_INITIAL_STATE); const [searchTerm, setSearchTerm] = useState(''); const [table, setTable] = useState([]); - const [slashedDatabaseName, setSlashedDatabaseName] = useState< + const [slashedTeamName, setSlashedTeamName] = useState< TitleBreadcrumbProps['titleLinks'] >([]); const [addAttribute, setAddAttribute] = useState(); @@ -612,7 +611,7 @@ const TeamDetailsV1 = ({ url: '', }, ]; - setSlashedDatabaseName(breadcrumb); + setSlashedTeamName(breadcrumb); setHeading(currentTeam.displayName || currentTeam.name); } }, [currentTeam, parentTeams, showDeletedTeam]); @@ -669,42 +668,6 @@ const TeamDetailsV1 = ({ }); }, []); - const DELETED_TOGGLE_MENU_ITEM = { - label: ( - } - id="deleted-team-dropdown" - name={ - - - - {t('label.show-deleted-entity', { - entity: t('label.team'), - })} - - - - - - - - } - /> - ), - onClick: onShowDeletedTeamChange, - key: 'deleted-team-dropdown', - }; - const IMPORT_EXPORT_MENU_ITEM = useMemo(() => { const options = [ { @@ -795,9 +758,6 @@ const TeamDetailsV1 = ({ onClick: handleOpenToJoinToggle, key: 'open-group-dropdown', }, - ...(currentTeam.teamType === TeamType.BusinessUnit - ? [DELETED_TOGGLE_MENU_ITEM] - : []), ], [ entityPermissions, @@ -1024,10 +984,7 @@ const TeamDetailsV1 = ({ {!isEmpty(currentTeam) ? ( {!isOrganization && ( - + )}
)}
@@ -1149,6 +1103,16 @@ const TeamDetailsV1 = ({
+ + + + {t('label.deleted')} + + @@ -227,13 +223,10 @@ const UserListV1: FC = ({ - - {t('label.deleted-entity', { - entity: t('label.user-plural'), - })} - + {t('label.deleted')} { try { const response = await getContainerByName( containerFQN, - 'parent,dataModel,owner,tags,followers,extension' + 'parent,dataModel,owner,tags,followers,extension', + Include.All ); setContainerData({ ...response, diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DataModelPage/DataModelPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DataModelPage/DataModelPage.component.tsx index 50a77768f74..31f21c20a2c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DataModelPage/DataModelPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DataModelPage/DataModelPage.component.tsx @@ -26,6 +26,7 @@ import { EntityType } from 'enums/entity.enum'; import { compare } from 'fast-json-patch'; import { CreateThread } from 'generated/api/feed/createThread'; import { DashboardDataModel } from 'generated/entity/data/dashboardDataModel'; +import { Include } from 'generated/type/include'; import { LabelType, State, TagSource } from 'generated/type/tagLabel'; import { EntityFieldThreadCount } from 'interface/feed.interface'; import { isUndefined, omitBy } from 'lodash'; @@ -148,7 +149,8 @@ const DataModelsPage = () => { try { const response = await getDataModelsByName( dashboardDataModelFQN, - 'owner,tags,followers' + 'owner,tags,followers', + Include.All ); setDataModelData(response); } catch (error) { 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 5d6ea089fb8..1b522b2415f 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 @@ -20,7 +20,6 @@ import { Tabs, Typography, } from 'antd'; -import { ItemType } from 'antd/lib/menu/hooks/useItems'; import { ColumnsType } from 'antd/lib/table'; import { AxiosError } from 'axios'; import ActivityFeedProvider, { @@ -44,7 +43,6 @@ import { ResourceEntity, } from 'components/PermissionProvider/PermissionProvider.interface'; import TabsLabel from 'components/TabsLabel/TabsLabel.component'; -import { DROPDOWN_ICON_SIZE_PROPS } from 'constants/ManageButton.constants'; import { ERROR_PLACEHOLDER_TYPE } from 'enums/common.enum'; import { compare, Operation } from 'fast-json-patch'; import { TagLabel } from 'generated/type/tagLabel'; @@ -69,7 +67,6 @@ import { import { getFeedCount, postThread } from 'rest/feedsAPI'; import { searchQuery } from 'rest/searchAPI'; import { 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, @@ -560,53 +557,6 @@ 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] - ); - const handleRestoreDatabaseSchema = useCallback(async () => { try { await restoreDatabaseSchema(databaseSchemaId); @@ -707,7 +657,6 @@ const DatabaseSchemaPage: FunctionComponent = () => { entityId={databaseSchemaId} entityName={databaseSchemaName} entityType={EntityType.DATABASE_SCHEMA} - extraDropdownContent={extraDropdownContent} extraInfo={extraInfo} followersList={[]} permission={databaseSchemaPermission} @@ -768,6 +717,20 @@ const DatabaseSchemaPage: FunctionComponent = () => { onThreadLinkSelect={onThreadLinkSelect} /> + + + + + + {t('label.deleted')} + {' '} + + + {getSchemaTableList()} )} diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/database-details/index.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/database-details/index.tsx index 9f43a1cad2f..54d62af747f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/database-details/index.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/database-details/index.tsx @@ -11,7 +11,16 @@ * limitations under the License. */ -import { Col, Row, Skeleton, Space, Table, Tabs } from 'antd'; +import { + Col, + Row, + Skeleton, + Space, + Switch, + Table, + Tabs, + Typography, +} from 'antd'; import { ColumnsType } from 'antd/lib/table'; import { AxiosError } from 'axios'; import ActivityFeedProvider, { @@ -40,6 +49,7 @@ import TagsContainer from 'components/Tag/TagsContainer/tags-container'; import { ERROR_PLACEHOLDER_TYPE } from 'enums/common.enum'; import { compare, Operation } from 'fast-json-patch'; import { LabelType } from 'generated/entity/data/table'; +import { Include } from 'generated/type/include'; import { State } from 'generated/type/tagLabel'; import { isEmpty, isNil, isUndefined, startCase } from 'lodash'; import { observer } from 'mobx-react'; @@ -111,6 +121,7 @@ const DatabaseDetails: FunctionComponent = () => { const { databaseFQN, tab: activeTab = EntityTabs.SCHEMA } = useParams<{ databaseFQN: string; tab: EntityTabs }>(); const [isLoading, setIsLoading] = useState(true); + const [showDeletedSchemas, setShowDeletedSchemas] = useState(false); const [database, setDatabase] = useState(); const [serviceType, setServiceType] = useState(); const [schemaData, setSchemaData] = useState([]); @@ -221,7 +232,12 @@ const DatabaseDetails: FunctionComponent = () => { const fetchDatabaseSchemas = (pagingObj?: string) => { return new Promise((resolve, reject) => { setSchemaDataLoading(true); - getDatabaseSchemas(databaseFQN, pagingObj, ['owner', 'usageSummary']) + getDatabaseSchemas( + databaseFQN, + pagingObj, + ['owner', 'usageSummary'], + showDeletedSchemas ? Include.Deleted : Include.NonDeleted + ) .then((res) => { if (res.data) { setSchemaData(res.data); @@ -677,6 +693,10 @@ const DatabaseDetails: FunctionComponent = () => { databaseSchemaPagingHandler, ]); + useEffect(() => { + fetchDatabaseSchemas(); + }, [showDeletedSchemas]); + if (isLoading) { return ; } @@ -851,7 +871,20 @@ const DatabaseDetails: FunctionComponent = () => { onThreadLinkSelect={onThreadLinkSelect} /> - + + + + + + {t('label.deleted')} + {' '} + + + {databaseTable} diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/service/index.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/service/index.tsx index 481ff542fa0..e92ce6d9b14 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/service/index.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/service/index.tsx @@ -11,7 +11,16 @@ * limitations under the License. */ -import { Button, Col, Row, Space, Tabs, Tooltip, Typography } from 'antd'; +import { + Button, + Col, + Row, + Space, + Switch, + Tabs, + Tooltip, + Typography, +} from 'antd'; import Table, { ColumnsType } from 'antd/lib/table'; import { AxiosError } from 'axios'; import AirflowMessageBanner from 'components/common/AirflowMessageBanner/AirflowMessageBanner'; @@ -41,6 +50,7 @@ import { EntityTabs, EntityType } from 'enums/entity.enum'; import { compare } from 'fast-json-patch'; import { Container } from 'generated/entity/data/container'; import { DashboardDataModel } from 'generated/entity/data/dashboardDataModel'; +import { Include } from 'generated/type/include'; import { isEmpty, isNil, isUndefined, startCase, toLower } from 'lodash'; import { ExtraInfo, @@ -136,10 +146,16 @@ const ServicePage: FunctionComponent = () => { tab: string; }>(); - const activeTab = useMemo( - () => tab ?? getCountLabel(serviceCategory).toLowerCase(), - [tab, serviceCategory] - ); + const activeTab = useMemo(() => { + if (tab) { + return tab; + } + if (serviceCategory === ServiceCategory.METADATA_SERVICES) { + return EntityTabs.INGESTIONS; + } + + return getCountLabel(serviceCategory).toLowerCase(); + }, [tab, serviceCategory]); const entitySpecificTabName = useMemo( () => getCountLabel(serviceCategory).toLowerCase(), [serviceCategory] @@ -168,6 +184,7 @@ const ServicePage: FunctionComponent = () => { const [ingestions, setIngestions] = useState([]); const [serviceList] = useState>([]); const [ingestionPaging, setIngestionPaging] = useState({} as Paging); + const [showDeleted, setShowDeleted] = useState(false); const [currentPage, setCurrentPage] = useState(1); const [dataModelCurrentPage, setDataModelCurrentPage] = useState(1); @@ -432,13 +449,19 @@ const ServicePage: FunctionComponent = () => { }).finally(() => setIsLoading(false)); }; + const include = useMemo( + () => (showDeleted ? Include.Deleted : Include.NonDeleted), + [showDeleted] + ); + const fetchDatabases = async (paging?: PagingWithoutTotal) => { setIsServiceLoading(true); try { const { data, paging: resPaging } = await getDatabases( serviceFQN, 'owner,usageSummary', - paging + paging, + include ); setData(data); @@ -458,7 +481,8 @@ const ServicePage: FunctionComponent = () => { const { data, paging: resPaging } = await getTopics( serviceFQN, 'owner,tags', - paging + paging, + include ); setData(data); setPaging(resPaging); @@ -475,7 +499,8 @@ const ServicePage: FunctionComponent = () => { const { data, paging: resPaging } = await getDashboards( serviceFQN, 'owner,usageSummary,tags', - paging + paging, + include ); setData(data); setPaging(resPaging); @@ -492,7 +517,8 @@ const ServicePage: FunctionComponent = () => { const { data, paging: resPaging } = await getDataModels( serviceFQN, 'owner,tags,followers', - paging + paging, + include ); setDataModel(data); setDataModelPaging(resPaging); @@ -509,7 +535,8 @@ const ServicePage: FunctionComponent = () => { const { data, paging: resPaging } = await getPipelines( serviceFQN, 'owner,tags', - paging + paging, + include ); setData(data); setPaging(resPaging); @@ -526,7 +553,8 @@ const ServicePage: FunctionComponent = () => { const { data, paging: resPaging } = await getMlModels( serviceFQN, 'owner,tags', - paging + paging, + include ); setData(data); setPaging(resPaging); @@ -545,6 +573,7 @@ const ServicePage: FunctionComponent = () => { fields: 'owner,tags', paging, root: true, + include, }); setData(response.data); @@ -676,6 +705,10 @@ const ServicePage: FunctionComponent = () => { } }; + useEffect(() => { + getOtherDetails(undefined, activeTab === EntityTabs.DATA_Model); + }, [activeTab, showDeleted]); + useEffect(() => { if (servicePermission.ViewAll || servicePermission.ViewBasic) { setIsLoading(true); @@ -887,13 +920,30 @@ const ServicePage: FunctionComponent = () => { const dataModalTab = useMemo( () => ( - + + + + + + + {t('label.deleted')} + {' '} + + + + + + ), [dataModel, isServiceLoading, dataModelPagingHandler, dataModelCurrentPage] ); @@ -1059,7 +1109,7 @@ const ServicePage: FunctionComponent = () => { return ; } else if (!isEmpty(data) && !isServiceLoading) { return ( -
+
{ totalCount={paging.total} /> )} - + ); } else { return ; @@ -1202,7 +1252,25 @@ const ServicePage: FunctionComponent = () => { onChange={activeTabHandler} /> - {activeTab === entitySpecificTabName && entityServiceTab} + {activeTab === entitySpecificTabName && ( + + + + + + + {t('label.deleted')} + {' '} + + + + {entityServiceTab} + + )} {activeTab === EntityTabs.DATA_Model && dataModalTab} {activeTab === EntityTabs.INGESTIONS && ingestionTab} {activeTab === EntityTabs.CONNECTION && testConnectionTab} diff --git a/openmetadata-ui/src/main/resources/ui/src/rest/dashboardAPI.ts b/openmetadata-ui/src/main/resources/ui/src/rest/dashboardAPI.ts index e15b8585fce..b193a0f9671 100644 --- a/openmetadata-ui/src/main/resources/ui/src/rest/dashboardAPI.ts +++ b/openmetadata-ui/src/main/resources/ui/src/rest/dashboardAPI.ts @@ -13,6 +13,7 @@ import { AxiosResponse } from 'axios'; import { Operation } from 'fast-json-patch'; +import { Include } from 'generated/type/include'; import { PagingResponse, PagingWithoutTotal, RestoreRequestType } from 'Models'; import { ServicePageData } from 'pages/service'; import { Dashboard } from '../generated/entity/data/dashboard'; @@ -40,7 +41,8 @@ export const getDashboardVersion = async (id: string, version: string) => { export const getDashboards = async ( service: string, fields: string, - paging?: PagingWithoutTotal + paging?: PagingWithoutTotal, + include: Include = Include.NonDeleted ) => { const response = await APIClient.get<{ data: ServicePageData[]; @@ -50,6 +52,7 @@ export const getDashboards = async ( service, fields, ...paging, + include, }, }); @@ -133,7 +136,8 @@ export const restoreDashboard = async (id: string) => { export const getDataModels = async ( service: string, fields: string, - paging?: PagingWithoutTotal + paging?: PagingWithoutTotal, + include: Include = Include.NonDeleted ) => { const response = await APIClient.get>( `/dashboard/datamodels`, @@ -142,6 +146,7 @@ export const getDataModels = async ( service, fields, ...paging, + include, }, } ); diff --git a/openmetadata-ui/src/main/resources/ui/src/rest/dataModelsAPI.ts b/openmetadata-ui/src/main/resources/ui/src/rest/dataModelsAPI.ts index 4cf5bab3429..19eb32e5f1d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/rest/dataModelsAPI.ts +++ b/openmetadata-ui/src/main/resources/ui/src/rest/dataModelsAPI.ts @@ -15,6 +15,7 @@ import { Operation } from 'fast-json-patch'; import { DashboardDataModel } from 'generated/entity/data/dashboardDataModel'; import { EntityHistory } from 'generated/type/entityHistory'; import { EntityReference } from 'generated/type/entityReference'; +import { Include } from 'generated/type/include'; import { getURLWithQueryFields } from 'utils/APIUtils'; import APIClient from './index'; @@ -41,10 +42,16 @@ export const getDataModelDetails = async ( export const getDataModelsByName = async ( name: string, - fields: string | string[] + fields: string | string[], + include: Include = Include.NonDeleted ) => { const response = await APIClient.get( - `${URL}/name/${name}?fields=${fields}` + `${URL}/name/${name}?fields=${fields}`, + { + params: { + include, + }, + } ); return response.data; diff --git a/openmetadata-ui/src/main/resources/ui/src/rest/databaseAPI.ts b/openmetadata-ui/src/main/resources/ui/src/rest/databaseAPI.ts index f489350dacb..841f68fb46b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/rest/databaseAPI.ts +++ b/openmetadata-ui/src/main/resources/ui/src/rest/databaseAPI.ts @@ -13,6 +13,7 @@ import { AxiosResponse } from 'axios'; import { Operation } from 'fast-json-patch'; +import { Include } from 'generated/type/include'; import { PagingWithoutTotal, RestoreRequestType } from 'Models'; import { Database } from '../generated/entity/data/database'; import { DatabaseSchema } from '../generated/entity/data/databaseSchema'; @@ -23,7 +24,8 @@ import APIClient from './index'; export const getDatabases = async ( service: string, fields: string, - paging?: PagingWithoutTotal + paging?: PagingWithoutTotal, + include: Include = Include.NonDeleted ) => { const response = await APIClient.get<{ data: Database[]; @@ -33,6 +35,7 @@ export const getDatabases = async ( service, fields, ...paging, + include, }, }); @@ -96,7 +99,8 @@ export const patchDatabaseSchemaDetails = async ( export const getDatabaseSchemas = async ( databaseName: string, paging?: string, - arrQueryFields?: string | string[] + arrQueryFields?: string | string[], + include: Include = Include.NonDeleted ) => { const url = `${getURLWithQueryFields( `/databaseSchemas`, @@ -106,7 +110,11 @@ export const getDatabaseSchemas = async ( const response = await APIClient.get<{ data: DatabaseSchema[]; paging: Paging; - }>(url); + }>(url, { + params: { + include, + }, + }); return response.data; }; diff --git a/openmetadata-ui/src/main/resources/ui/src/rest/mlModelAPI.ts b/openmetadata-ui/src/main/resources/ui/src/rest/mlModelAPI.ts index 2acb127a569..24d34286439 100644 --- a/openmetadata-ui/src/main/resources/ui/src/rest/mlModelAPI.ts +++ b/openmetadata-ui/src/main/resources/ui/src/rest/mlModelAPI.ts @@ -58,7 +58,8 @@ export const getMlModelByFQN = async ( export const getMlModels = async ( service: string, fields: string, - paging?: PagingWithoutTotal + paging?: PagingWithoutTotal, + include: Include = Include.NonDeleted ) => { const response = await APIClient.get<{ data: ServicePageData[]; @@ -68,6 +69,7 @@ export const getMlModels = async ( service, fields, ...paging, + include, }, }); diff --git a/openmetadata-ui/src/main/resources/ui/src/rest/pipelineAPI.ts b/openmetadata-ui/src/main/resources/ui/src/rest/pipelineAPI.ts index 9ca2f162893..9c474406872 100644 --- a/openmetadata-ui/src/main/resources/ui/src/rest/pipelineAPI.ts +++ b/openmetadata-ui/src/main/resources/ui/src/rest/pipelineAPI.ts @@ -13,6 +13,7 @@ import { AxiosResponse } from 'axios'; import { Operation } from 'fast-json-patch'; +import { Include } from 'generated/type/include'; import { PagingResponse, PagingWithoutTotal, RestoreRequestType } from 'Models'; import { ServicePageData } from 'pages/service'; import { Pipeline, PipelineStatus } from '../generated/entity/data/pipeline'; @@ -41,7 +42,8 @@ export const getPipelineVersion = async (id: string, version: string) => { export const getPipelines = async ( service: string, fields: string, - paging?: PagingWithoutTotal + paging?: PagingWithoutTotal, + include: Include = Include.NonDeleted ) => { const response = await APIClient.get<{ data: ServicePageData[]; @@ -51,6 +53,7 @@ export const getPipelines = async ( service, fields, ...paging, + include, }, }); diff --git a/openmetadata-ui/src/main/resources/ui/src/rest/storageAPI.ts b/openmetadata-ui/src/main/resources/ui/src/rest/storageAPI.ts index 8c3d39ed0e2..df319e87858 100644 --- a/openmetadata-ui/src/main/resources/ui/src/rest/storageAPI.ts +++ b/openmetadata-ui/src/main/resources/ui/src/rest/storageAPI.ts @@ -15,6 +15,7 @@ import { Operation } from 'fast-json-patch'; import { Container } from 'generated/entity/data/container'; import { EntityHistory } from 'generated/type/entityHistory'; import { EntityReference } from 'generated/type/entityReference'; +import { Include } from 'generated/type/include'; import { Paging } from 'generated/type/paging'; import { PagingWithoutTotal, RestoreRequestType } from 'Models'; import { ServicePageData } from 'pages/service'; @@ -34,6 +35,7 @@ export const getContainers = async (args: { fields: string; paging?: PagingWithoutTotal; root?: boolean; + include: Include; }) => { const { paging, ...rest } = args; @@ -52,10 +54,16 @@ export const getContainers = async (args: { export const getContainerByName = async ( name: string, - fields: string | string[] + fields: string | string[], + include: Include = Include.NonDeleted ) => { const response = await APIClient.get( - `containers/name/${name}?fields=${fields}` + `containers/name/${name}?fields=${fields}`, + { + params: { + include, + }, + } ); return response.data; diff --git a/openmetadata-ui/src/main/resources/ui/src/rest/topicsAPI.ts b/openmetadata-ui/src/main/resources/ui/src/rest/topicsAPI.ts index 49138410994..d0a334d15ab 100644 --- a/openmetadata-ui/src/main/resources/ui/src/rest/topicsAPI.ts +++ b/openmetadata-ui/src/main/resources/ui/src/rest/topicsAPI.ts @@ -13,6 +13,7 @@ import { AxiosResponse } from 'axios'; import { Operation } from 'fast-json-patch'; +import { Include } from 'generated/type/include'; import { PagingWithoutTotal, RestoreRequestType } from 'Models'; import { ServicePageData } from 'pages/service'; import { TabSpecificField } from '../enums/entity.enum'; @@ -41,7 +42,8 @@ export const getTopicVersion = async (id: string, version: string) => { export const getTopics = async ( service: string, fields: string, - paging?: PagingWithoutTotal + paging?: PagingWithoutTotal, + include: Include = Include.NonDeleted ) => { const response = await APIClient.get<{ data: ServicePageData[]; @@ -51,6 +53,7 @@ export const getTopics = async ( service, fields, ...paging, + include, }, });