<%@page language="java"%> <%@page contentType="text/html; charset=UTF-8" %> <%@page import="org.dataone.client.v1.itk.D1Client"%> <%@page import="org.dataone.service.types.v1.NodeList"%> <%@page import="java.util.List"%> <%@page import="org.dataone.service.types.v1.Node"%> <%@page import="org.dataone.service.types.v1.ObjectList"%> DataONE Network Status

Environment: <%=D1Client.getCN().getNodeBaseServiceUrl() %>

<% NodeList nodeList = D1Client.getCN().listNodes(); if (nodeList!= null) { List nodes = nodeList.getNodeList(); for (Node node: nodes) { String objectCountString = "-"; try { ObjectList objectList = D1Client.getMN(node.getIdentifier()).listObjects(null, null, null, null, null, null, 10); int objectCount = objectList.getTotal(); objectCountString = Integer.toString(objectCount); } catch (Exception e) { // what can we really do? objectCountString = "Error: " + "
" + e.getMessage() + "
"; e.printStackTrace(); } String lastSynch = "N/A"; try { lastSynch = node.getSynchronization().getLastHarvested().toString(); } catch (Exception e) { // CNs don't have that } String pingString = "unknown"; try { pingString = D1Client.getMN(node.getIdentifier()).ping().toString(); //pingString = node.getPing().getSuccess() + " at " + node.getPing().getLastSuccess().toString(); } catch (Exception e) { } %>
<% } } %>
Type Identifier Name Description Objects State Ping Last synchronized
<%=node.getType().xmlValue() %> <%=node.getIdentifier().getValue() %> <%=node.getName() %> <%=node.getDescription() %> <%=objectCountString %> <%=node.getState().xmlValue() %> <%=pingString %> <%=lastSynch %>

DataONE network overview includes:

NOTE: This is a prototype and may be relocated

<%@ include file="footer.jsp"%>