Skip to content

Commit

Permalink
Merge pull request #710 from Tharanidk/tags
Browse files Browse the repository at this point in the history
Fix the issue of not showing all the tags under Tags/API categories in the devportal
  • Loading branch information
Tharanidk committed Jul 16, 2024
2 parents c63962a + 121503c commit 3627b60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions portals/devportal/src/main/webapp/source/src/app/data/api.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 3627b60

Please sign in to comment.