NCATSTranslator / Knowledge_Graph_Exchange_Registry

The Biomedical Data Translator Consortium site for development of Knowledge Graph Exchange Standards and Registry
MIT License
5 stars 3 forks source link

Show N most recently published artifacts on the home page. #57

Open jeffhhk opened 3 years ago

jeffhhk commented 3 years ago

Now that the "Done Uploading" HTTP request is short (see #51), we have another small UI issue. The issue is that the user now has a hard time finding out when the fileset either becomes available or fails in processing.

This is suggestion 1 of 2 for how to let the user know what happened with their submissions.

Do one recursive list of the bucket. This is fast if done like you do here:

  def list_files(client, bucket_name: str):
      """
      Check for the new file in the bucket listing.
      :param client:
      :param bucket_name:
      :return:
      """
      response = client.list_objects_v2(Bucket=bucket_name)

Filter for publishing metadata files. Take the top N and display what they mean at the top or bottom of the home page.

Even better: also record a failure metadata file. Gather and present those too, so the user can find out about errors. If so, keep both N successes and K failures, so that somebody having trouble doesn't bury all the success events.