From 9d8033ef585e37e5ac3a277ef1185b245a33ddfa Mon Sep 17 00:00:00 2001 From: purnimagarg1 <139125209+purnimagarg1@users.noreply.github.com> Date: Wed, 11 Jun 2025 01:24:26 +0530 Subject: [PATCH] feat(ui/ingestions): maintain the system sources filter across tabs (#13734) --- .../src/app/ingestV2/ManageIngestionPage.tsx | 11 ++++++++++- .../src/app/ingestV2/executions/ExecutionsTab.tsx | 5 +++-- .../src/app/ingestV2/source/IngestionSourceList.tsx | 11 +++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/datahub-web-react/src/app/ingestV2/ManageIngestionPage.tsx b/datahub-web-react/src/app/ingestV2/ManageIngestionPage.tsx index 934f321e02..3ea7174e7a 100644 --- a/datahub-web-react/src/app/ingestV2/ManageIngestionPage.tsx +++ b/datahub-web-react/src/app/ingestV2/ManageIngestionPage.tsx @@ -76,6 +76,7 @@ export const ManageIngestionPage = () => { const isShowNavBarRedesign = useShowNavBarRedesign(); const [showCreateSourceModal, setShowCreateSourceModal] = useState(false); const [showCreateSecretModal, setShowCreateSecretModal] = useState(false); + const [hideSystemSources, setHideSystemSources] = useState(true); const history = useHistory(); const shouldPreserveParams = useRef(false); @@ -104,13 +105,21 @@ export const ManageIngestionPage = () => { showCreateModal={showCreateSourceModal} setShowCreateModal={setShowCreateSourceModal} shouldPreserveParams={shouldPreserveParams} + hideSystemSources={hideSystemSources} + setHideSystemSources={setHideSystemSources} /> ), key: TabType.Sources as string, name: TabType.Sources as string, }, { - component: , + component: ( + + ), key: TabType.ExecutionLog as string, name: 'Execution Log', }, diff --git a/datahub-web-react/src/app/ingestV2/executions/ExecutionsTab.tsx b/datahub-web-react/src/app/ingestV2/executions/ExecutionsTab.tsx index 799684c84c..02c32ac581 100644 --- a/datahub-web-react/src/app/ingestV2/executions/ExecutionsTab.tsx +++ b/datahub-web-react/src/app/ingestV2/executions/ExecutionsTab.tsx @@ -54,12 +54,13 @@ const DEFAULT_PAGE_SIZE = 25; interface Props { shouldPreserveParams: React.MutableRefObject; + hideSystemSources: boolean; + setHideSystemSources: (show: boolean) => void; } -export const ExecutionsTab = ({ shouldPreserveParams }: Props) => { +export const ExecutionsTab = ({ shouldPreserveParams, hideSystemSources, setHideSystemSources }: Props) => { const [appliedFilters, setAppliedFilters] = useState>(new Map()); const [executionRequestUrnToView, setExecutionRequestUrnToView] = useState(undefined); - const [hideSystemSources, setHideSystemSources] = useState(true); const { page, setPage, start, count: pageSize } = usePagination(DEFAULT_PAGE_SIZE); // When filters changed, reset page to 1 diff --git a/datahub-web-react/src/app/ingestV2/source/IngestionSourceList.tsx b/datahub-web-react/src/app/ingestV2/source/IngestionSourceList.tsx index 53b7f426d6..be55de481a 100644 --- a/datahub-web-react/src/app/ingestV2/source/IngestionSourceList.tsx +++ b/datahub-web-react/src/app/ingestV2/source/IngestionSourceList.tsx @@ -120,9 +120,17 @@ interface Props { showCreateModal: boolean; setShowCreateModal: (show: boolean) => void; shouldPreserveParams: React.MutableRefObject; + hideSystemSources: boolean; + setHideSystemSources: (show: boolean) => void; } -export const IngestionSourceList = ({ showCreateModal, setShowCreateModal, shouldPreserveParams }: Props) => { +export const IngestionSourceList = ({ + showCreateModal, + setShowCreateModal, + shouldPreserveParams, + hideSystemSources, + setHideSystemSources, +}: Props) => { const location = useLocation(); const me = useUserContext(); const params = QueryString.parse(location.search, { arrayFormat: 'comma' }); @@ -150,7 +158,6 @@ export const IngestionSourceList = ({ showCreateModal, setShowCreateModal, shoul // Set of removed urns used to account for eventual consistency const [removedUrns, setRemovedUrns] = useState([]); const [sourceFilter, setSourceFilter] = useState(IngestionSourceType.ALL); - const [hideSystemSources, setHideSystemSources] = useState(true); const [sort, setSort] = useState(); // Debounce the search query