Skip to content
Snippets Groups Projects
Commit 5eeb0ced authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Added human readable view for DSS and weather

parent 219ca111
No related branches found
No related tags found
No related merge requests found
<html>
<head>
<title>DSS list - MaDIPHS Integration platform</title>
</head>
<body>
<a href="/"><img src="css/images/MaDiPHS_logo.png" style="width: 300px;" alt="MaDiPHS logo"/></a>
<h1>DSS list</h1>
<p>A human-friendly view of the data returned from <a href="/dss/rest/dss">this endpoint</a></p>
<div id="dsslist">
</div>
</body>
<script type="text/javascript">
fetch("https://test.madiphs.org/dss/rest/dss/")
.then(x => x.json())
.then(dsss =>
{
var html = "";
for(var i in dsss)
{
dss = dsss[i];
html += "<h2>" + dss.name + "</h2>\n";
html += "<ul>";
for(var j in dss.models)
{
model = dss.models[j];
console.info(model.name);
html += "<li><b>" + model.name + "</b>: " + model.purpose + "</li>";
}
html += "</ul>";
}
document.getElementById("dsslist").innerHTML = html;
});
</script>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>MaDIPHS Integration platform</title>
......@@ -15,13 +16,13 @@
</p>
<ul>
<li><a href="/dss/apidocs/">API documentation</a></li>
<li><a href="/dss/rest/dss">List all DSSs available</a></p></li>
<li><a href="/dsslist.html">List all DSSs available</a></p></li>
</ul>
<h3>Weather API</h3>
<p>This is the web service API for discovery of and usage of weather datasources, providing input data to DSS, both measured/calculated data from the current growing season and weather forecasts.</p>
<ul>
<li><a href="/weather/apidocs/">API documentation</a></li>
<li><a href="/weather/rest/dss">List all DSSs available</a></p></li>
<li><a href="/weatherdatasourcelist">List all weather datasources available</a></p></li>
</ul>
<p style="font-size: small;">
The DSS API and the Weather API are based on software developed for a similar purpose in Europe in the <a href="https://platform.ipmdecisions.net/" target="new">IPM Decisions project</a>
......
<html>
<head>
<title>Weather datasource list - MaDIPHS Integration platform</title>
</head>
<body>
<a href="/"><img src="css/images/MaDiPHS_logo.png" style="width: 300px;" alt="MaDiPHS logo"/></a>
<h1>DSS list</h1>
<p>A human-friendly view of the data returned from <a href="/weather/rest/weatherdatasource">this endpoint</a></p>
<div id="weatherdatasourcelist">
</div>
</body>
<script type="text/javascript">
fetch("https://test.madiphs.org/weather/rest/weatherdatasource")
.then(x => x.json())
.then(wdss =>
{
var html = "";
for(var i in wdss)
{
wds = wdss[i];
html += "<h2>" + wds.name + "</h2>\n";
html += "<p>" + wds.description + "</p>\n";
}
document.getElementById("weatherdatasourcelist").innerHTML = html;
});
</script>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment