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 @@ ...@@ -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> <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. 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. 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>. Source organization: <a href="https://adas.co.uk/" target="new">ADAS, England</a>.
</p> </p>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</div> </div>
</div> </div>
<div id="weatherDataForm" style="display: none;"> <div id="weatherDataForm" style="display: none;">
<h2>Weather data</h2> <h2>Weather data sources</h2>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div id="parameterInfo" style="display: none;"></div> <div id="parameterInfo" style="display: none;"></div>
...@@ -85,10 +85,14 @@ ...@@ -85,10 +85,14 @@
<div class="col-md-6"><div id="forecastDatasourceMap"></div></div> <div class="col-md-6"><div id="forecastDatasourceMap"></div></div>
</div> </div>
<button class="btn btn-primary" type="button" onclick="submitData();">Run</button> <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> <canvas id="resultChart"></canvas>
</div> </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> </div>
{% endblock %} {% endblock %}
...@@ -558,6 +562,8 @@ ...@@ -558,6 +562,8 @@
*/ */
function displayResult(result) { function displayResult(result) {
document.getElementById("chartContainer").style.display="block";
let chartData = []; let chartData = [];
// Generate dates // Generate dates
let dates = getDateArray(result.timeStart, 86400, result.locationResult[0].length); let dates = getDateArray(result.timeStart, 86400, result.locationResult[0].length);
...@@ -597,7 +603,9 @@ ...@@ -597,7 +603,9 @@
data: { data: {
datasets: chartData datasets: chartData
} }
}) });
document.getElementById("weatherDataContainer").style.display="block";
renderWeatherData(weatherData, document.getElementById("weatherData"), "table table-striped") 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