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

Add last-modified dates to resource listing UI on groups pages #925

Open
Tracked by #870
jameshadfield opened this issue Jun 17, 2024 · 0 comments
Open
Tracked by #870
Labels
enhancement New feature or request

Comments

@jameshadfield
Copy link
Member

Context

The new resource-listing UI provides a way to surface last modified dates, as seen on the /staging page.

The /groups page now uses the resource-listing UI. This will soon also be the case for /groups/<groupName> pages. This work required modifications to the UI so that it would work in the absence of last-modified dates, because the charon/getAvailable API returns a list of resources (narratives & datasets) which don't include any information about the date the file was uploaded/modified.

Were the last-modified information available it would improve the UI on these pages by allowing for chronological sorting and identifying which resources had been recently updated.

Details

For individual groups pages and the summary /groups page the server obtains the data via a list objects call to S3 which returns data including the LastModified timestamp¹.

Our API ultimately returns data which looks like:

{
    "datasets": [
        {
            "request": "groups/blab/229e/E",
            "secondTreeOptions": [],
            "buildUrl":null
        },

We could extend this response to include an additional property² (e.g. lastModified: YYYY-MM-DD).

This data would then be easily parsed by the callback supplied to the list-resources UI and thus shown in the UI.


¹ This isn't the same as when the dataset was updated (as recorded in the dataset JSON's meta.updated field) however last-modified timestamps is also what the /staging and /pathogens pages use.

² An additional property shouldn't affect consumers of the API but this is something to keep in mind (primarily Auspice, but perhaps others - the CLI?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant