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

Explore possibility of automatically updating protocol links #662

Open
kyule opened this issue Dec 11, 2024 · 1 comment
Open

Explore possibility of automatically updating protocol links #662

kyule opened this issue Dec 11, 2024 · 1 comment
Assignees

Comments

@kyule
Copy link
Member

kyule commented Dec 11, 2024

The sampling and contractor protocol documents for various collections are periodically updated. We are not notified when this happens, making it pretty impossible to keep the links on the collections descriptions pages up to date. I haven't looked at all of the fields in the data products endpoint but maybe there is something there... otherwise perhaps best to just link to the data products themselves and the general protocol page where older docs can be found.

@sunray1
Copy link
Collaborator

sunray1 commented Mar 19, 2025

Add this to neoncollprofiles.php using DocumentListItem React component.

  1. Grab DP number from stored MySQL resource
  2. Ping API (e.g., https://data.neonscience.org/api/v0/products/DP1.10064.002) to get most recent version (specNumber) and description (specDescription)
  3. Set up component:
  const qsgDoc = {
    name: 'NEON.QSG.DP1.00001.001v1.pdf',
    type: 'application/pdf',
    size: 170516,
    description: 'Quick Start Guide for 2D wind speed and direction (DP1.00001.001)',
  };

<DocumentListItem
  document={qsgDoc}
  containerComponent="div"
  enableDownloadButton
  enableVariantChips
  fetchVariants
 />

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

No branches or pull requests

2 participants