Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch and Display Multiple Images from REST API in Annotation Tool #54

Closed
sumn2u opened this issue Jun 18, 2024 · 0 comments · Fixed by #55
Closed

Fetch and Display Multiple Images from REST API in Annotation Tool #54

sumn2u opened this issue Jun 18, 2024 · 0 comments · Fixed by #55
Assignees
Labels
bug Something isn't working

Comments

@sumn2u
Copy link
Owner

sumn2u commented Jun 18, 2024

Currently, the application only fetches the first image from the saved configuration, leaving the rest of the images unfetched. This results in only the first image being displayed in the annotation tool, while other images are not processed. The goal is to modify the application to fetch and display all images from the REST API.

Steps to Reproduce

  1. Upload multiple images and visit the annotation page.
  2. Refresh the page.
  3. Observe that only the first image is fetched and displayed.
  4. Other images are not fetched and remain unprocessed.

Expected Behavior

All images from the saved configuration should be fetched from the REST API and displayed in the annotation tool.

Tasks

  1. Update the preloadConfiguration function to handle multiple images.
  2. Create a new function fetchImages to fetch images from the REST API.
  3. Use Promise.all to wait for all image fetches to complete before updating the state.
  4. Ensure the state is updated with all fetched images.
  5. Add a loading indicator to show while images are being fetched.
  6. Update the useEffect hook to fetch all images when the configuration is loaded.
@sumn2u sumn2u added the bug Something isn't working label Jun 18, 2024
@sumn2u sumn2u self-assigned this Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant