DependencyTrack / dependency-track

Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.
https://dependencytrack.org/
Apache License 2.0
2.48k stars 536 forks source link

Project Hierarchy not show more then 100 child in Project Page #3019

Open sahil3112 opened 10 months ago

sahil3112 commented 10 months ago

Current Behavior

When I expand the parent project (Contains more than 100 children) on the project page, then in the GUI it only shows children upto 100, but when I see the list of children via API It shows all the projects if I use offset

curl -X 'GET' 'https://localhost:8081/api/v1/project//children?offset=400' -H 'accept : application/json' -H 'X-Api-Key: '

but when I switch to Flat project view then I am able to see all the projects, but in the Hierarchy view, when I expand parent project then I am only able to child project upto 100 and project after 100 I am unable to see, but Via API if I use offset then I am able to see complete list

Steps to Reproduce

  1. Create a parent project
  2. For that parent project create child projects (the count of child projects must be more than 100)
  3. Expand the Parent project in the GUI
  4. Review the number of child projects (Due to bug it only shows up to 100)
  5. Use the API below API to fetch the list of child Child project 1 to 100: curl -X 'GET' 'https://localhost:8081/api/v1/project//children' -H 'accept : application/json' -H 'X-Api-Key: ' Child project 101 to 200: curl -X 'GET' 'https://localhost:8081/api/v1/project//children?offset=200' -H 'accept: application/json' -H 'X-Api-Key: '

the list of projects that you get in the second API call with offset=200 is not visible in the Hierarchy view GUI, but visible in Flat view

Expected Behavior

When I expand the parent project (Contains more than 100 children) on the project page, then in the Hierarchy view GUI shows all the child projects (including after 100)

Dependency-Track Version

4.8.2

Dependency-Track Distribution

Container Image

Database Server

PostgreSQL

Database Server Version

No response

Browser

Google Chrome

Checklist

henryb-ehg commented 1 month ago

This is happening to me as well in Dependency Track v4.11.1 using PostgreSQL as it won't show more than 85 Child Projects under the Parent Project but can see the Projects when selecting Show flat project view

Steps to Reproduce

  1. Upload more than 85 Child Projects to a Parent Project
  2. Try to view Child Projects in Parent Project
  3. API Call ex. https://{uri}:{port}/api/v1/project/{uuid}/children?pageSize=500 which will only return 85 projects and all projects uploaded after these child projects cannot been seen in the API call.
  4. Child Projects also can't be seen when using this API call too: https://{uri}:{port}/api/v1/project?onlyRoot=FALSE&pageNumber=1&pageSize=500
  5. Expand Parent Project with more than 85 Child Projects in Projects dashboard, the latest uploaded Child Projects cannot be seen
  6. Child Projects after the 85 Child Project limit can only be seen when selecting Show flat project view