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

Integrate member repository details using the CN node capabilities service #22

Open
csjx opened this issue Mar 16, 2020 · 4 comments
Open
Assignees
Labels

Comments

@csjx
Copy link
Member

csjx commented Mar 16, 2020

Each member repository has its own node capabilities document that gets updated on the Coordinating Node using the CN.updateNodeCapabilities() call. An example node document is https://cn.dataone.org/cn/v2/node/urn:node:ARCTIC (be sure to view the XML source). On the CN, the node documents have a number of CN-managed properties, like:

<property key="CN_operational_status">operational</property>
<property key="CN_date_operational">2016-12-01T00:00:0.000Z</property>
<property key="CN_node_name">Arctic Data Center</property>
<property key="CN_logo_url">https://raw.githubusercontent.com/DataONEorg/member-node-info/master/production/graphics/web/ARCTIC.png</property>
<property key="CN_date_upcoming">2016-04-05T00:00:0.000Z</property>
<property key="CN_info_url">https://arcticdata.io/</property>
<property key="CN_location_lonlat">-119.69,34.42</property>

Change the DataONE homepage to pull the logos and other node information directly from this service using the either the CN.listNodes() call or the CN.getNodeCapabilities(nodeid) call.

By doing this, member repositories can update their information and it will propagate to the DataONE site.

@laurenwalker
Copy link
Contributor

We may be able to reuse code from the existing DataONE site.

It should be easy to send an XHR to the CN node service, then use jQuery to $.parseXML() to convert the info to json.

@robyngit
Copy link
Member

Just a side note: The ability to use XML data in Hugo templates is on Hugo's development road map (see gohugoio/hugo#4470). Once that feature is implemented, we could perhaps integrate member repository details like this.

@csjx
Copy link
Member Author

csjx commented Mar 17, 2020

And we can also think about using the browser's internal Fetch API, which reduces our dependency on JQuery. that said, we'd have to figure out a polyfill for older browsers, so, something to consider.

@robyngit robyngit self-assigned this Jun 16, 2020
@laurenwalker
Copy link
Contributor

All this info is fetched and parsed by MetacatUI, so I've been thinking we should just create a view in MetacatUI for this and link to that page from dataone.org. Thoughts?

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

No branches or pull requests

4 participants