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

Add headings to results, hide result containers before model run

parent a97f7864
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@
<p>This model is integrated in VIPS from the <a href="https://platform.ipmdecisions.net/" target="new">IPM Decisions Platform</a>
to support field validations for evaluation of the potential for use of this model in Norway.
The integration of the model in VIPS, also serves as a demonstration of how decisions support systems from IPM Decisions can be integrated into external services.
Please read the <a href="https://gitlab.nibio.no/VIPS/VIPSWeb/" target="new">documentation on GitLab</a> for a more technical description.<br/>
Please read the <a href="https://gitlab.nibio.no/VIPS/VIPSWeb/-/tree/develop/ipmd" target="new">documentation on GitLab</a> for a more technical description.<br/>
Source organization: <a href="https://adas.co.uk/" target="new">ADAS, England</a>.
</p>
......@@ -44,7 +44,7 @@
</div>
</div>
<div id="weatherDataForm" style="display: none;">
<h2>Weather data</h2>
<h2>Weather data sources</h2>
<div class="row">
<div class="col-md-6">
<div id="parameterInfo" style="display: none;"></div>
......@@ -85,10 +85,14 @@
<div class="col-md-6"><div id="forecastDatasourceMap"></div></div>
</div>
<button class="btn btn-primary" type="button" onclick="submitData();">Run</button>
<div style="aspect-ratio: 2;">
<div style="aspect-ratio: 2; display: none;" id="chartContainer">
<h2>Results chart</h2>
<canvas id="resultChart"></canvas>
</div>
<div id="weatherData" class="table-responsive"></div>
<div id="weatherDataContainer" style="display: none;">
<h2>Weather data</h2>
<div id="weatherData" class="table-responsive"></div>
</div>
</div>
{% endblock %}
......@@ -558,6 +562,8 @@
*/
function displayResult(result) {
document.getElementById("chartContainer").style.display="block";
let chartData = [];
// Generate dates
let dates = getDateArray(result.timeStart, 86400, result.locationResult[0].length);
......@@ -597,7 +603,9 @@
data: {
datasets: chartData
}
})
});
document.getElementById("weatherDataContainer").style.display="block";
renderWeatherData(weatherData, document.getElementById("weatherData"), "table table-striped")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment