From 121503c08b1c6304ec24b8e6979f4c951f6ba310 Mon Sep 17 00:00:00 2001 From: Tharanidk Date: Thu, 27 Jun 2024 17:06:14 +0530 Subject: [PATCH] fix issue of not showing all the api tags --- .../source/src/app/components/Apis/Listing/CommonListing.jsx | 3 ++- .../src/app/components/Apis/Listing/TagCloudListing.jsx | 3 ++- portals/devportal/src/main/webapp/source/src/app/data/api.jsx | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/CommonListing.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/CommonListing.jsx index 5f682b9f3b3..fd9d3154ae3 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/CommonListing.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/CommonListing.jsx @@ -252,7 +252,8 @@ class CommonListingLegacy extends React.Component { */ componentDidMount() { const restApiClient = new API(); - const promisedTags = restApiClient.getAllTags(); + const tagsLimit = -1; + const promisedTags = restApiClient.getAllTags(tagsLimit); promisedTags .then((response) => { this.setState({ allTags: response.body.list }); diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/TagCloudListing.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/TagCloudListing.jsx index 4c4c9b8e884..8372953b69c 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/TagCloudListing.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Listing/TagCloudListing.jsx @@ -84,9 +84,10 @@ const Root = styled('main')(( export default function TagCloudListing() { const theme = useTheme(); const [allTags, setAllTags] = useState(null); + const tagsLimit = -1; useEffect(() => { const restApiClient = new API(); - const promisedTags = restApiClient.getAllTags(); + const promisedTags = restApiClient.getAllTags(tagsLimit); promisedTags .then((response) => { setAllTags(response.body.list); diff --git a/portals/devportal/src/main/webapp/source/src/app/data/api.jsx b/portals/devportal/src/main/webapp/source/src/app/data/api.jsx index 7292bf70858..f140837c61b 100644 --- a/portals/devportal/src/main/webapp/source/src/app/data/api.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/data/api.jsx @@ -677,9 +677,9 @@ export default class API extends Resource { * Get all tags * @returns {promise} promise all tags of APIs */ - getAllTags() { + getAllTags(limit = 25) { const promiseGet = this.client.then((client) => { - return client.apis.Tags.get_tags(this._requestMetaData()); + return client.apis.Tags.get_tags({ limit }, this._requestMetaData()); }).catch((error) => { console.error(error); });