This is an automated email from the ASF dual-hosted git repository. dhavalrajpara pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ranger.git
commit 1671901793e6f4511330d6a5f0e0e50f5843e25d Author: Mugdha Varadkar <[email protected]> AuthorDate: Wed Apr 17 18:58:35 2024 +0530 RANGER-4765: GDS UI: Need a date filter to filter the records in history tab for dataset/datashare Signed-off-by: Dhaval.Rajpara <[email protected]> --- .../views/GovernedData/Dataset/DatasetDetailLayout.jsx | 15 ++++++++------- .../GovernedData/Datashare/DatashareDetailLayout.jsx | 15 ++++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/security-admin/src/main/webapp/react-webapp/src/views/GovernedData/Dataset/DatasetDetailLayout.jsx b/security-admin/src/main/webapp/react-webapp/src/views/GovernedData/Dataset/DatasetDetailLayout.jsx index bbbd639a3..8e914298a 100755 --- a/security-admin/src/main/webapp/react-webapp/src/views/GovernedData/Dataset/DatasetDetailLayout.jsx +++ b/security-admin/src/main/webapp/react-webapp/src/views/GovernedData/Dataset/DatasetDetailLayout.jsx @@ -319,6 +319,12 @@ const DatasetDetailLayout = () => { label: "User", urlLabel: "owner", type: "text" + }, + { + category: "startDate", + label: "Start Date", + urlLabel: "startDate", + type: "date" } ]; @@ -331,16 +337,11 @@ const DatasetDetailLayout = () => { }; const fetchHistoryList = useCallback( - async ({ pageSize, pageIndex, sortBy, gotoPage }) => { + async ({ pageSize, pageIndex, sortBy }) => { setHistoryLoader(true); let resp = []; let historyList = []; let totalCount = 0; - let page = - state && state.showLastPage - ? state.addPageData.totalPage - 1 - : pageIndex; - let totalPageCount = 0; const fetchId = ++fetchIdRef.current; let params = { ...searchHistoryFilterParams }; if (fetchId === fetchIdRef.current) { @@ -371,7 +372,6 @@ const DatasetDetailLayout = () => { setHistoryListData(historyList); setEntries(resp.data); setPageCount(Math.ceil(totalCount / pageSize)); - //setResetpage({ page: gotoPage }); setHistoryLoader(false); } }, @@ -2061,6 +2061,7 @@ const DatasetDetailLayout = () => { placeholder="Search..." onChange={updateHistorySearchFilter} options={historySearchFilterOptions} + defaultSelected={[]} /> </div> <div className="gds-header-btn-grp"></div> diff --git a/security-admin/src/main/webapp/react-webapp/src/views/GovernedData/Datashare/DatashareDetailLayout.jsx b/security-admin/src/main/webapp/react-webapp/src/views/GovernedData/Datashare/DatashareDetailLayout.jsx index 2b38a52d1..6590cb707 100755 --- a/security-admin/src/main/webapp/react-webapp/src/views/GovernedData/Datashare/DatashareDetailLayout.jsx +++ b/security-admin/src/main/webapp/react-webapp/src/views/GovernedData/Datashare/DatashareDetailLayout.jsx @@ -204,6 +204,12 @@ const DatashareDetailLayout = () => { label: "User", urlLabel: "owner", type: "text" + }, + { + category: "startDate", + label: "Start Date", + urlLabel: "startDate", + type: "date" } ]; @@ -764,16 +770,11 @@ const DatashareDetailLayout = () => { }; const fetchHistoryList = useCallback( - async ({ pageSize, pageIndex, sortBy, gotoPage }) => { + async ({ pageSize, pageIndex, sortBy }) => { setHistoryLoader(true); let resp = []; let historyList = []; let totalCount = 0; - let page = - state && state.showLastPage - ? state.addPageData.totalPage - 1 - : pageIndex; - let totalPageCount = 0; const fetchId = ++fetchIdRef.current; let params = { ...searchHistoryFilterParams }; if (fetchId === fetchIdRef.current) { @@ -805,7 +806,6 @@ const DatashareDetailLayout = () => { setHistoryListData(historyList); setHistoryEntries(resp.data); setPageCount(Math.ceil(totalCount / pageSize)); - //setResetpage({ page: gotoPage }); setHistoryLoader(false); } }, @@ -1480,6 +1480,7 @@ const DatashareDetailLayout = () => { placeholder="Search resources..." options={resourceSearchFilterOptions} onChange={updateResourceSearchFilter} + defaultSelected={[]} /> {(isSystemAdmin() || userAclPerm == "ADMIN") && ( <>
