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

Fix typos

parent 844e6957
Branches
No related tags found
No related merge requests found
...@@ -44,12 +44,12 @@ ...@@ -44,12 +44,12 @@
</div> </div>
</div> </div>
<div id="weatherDataForm" style="display: none;"> <div id="weatherDataForm" style="display: none;">
<h2>Weather data sources</h2> <h2>Weatherdatasources</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>
<fieldset id="historicDatasourceFields"> <fieldset id="historicDatasourceFields">
<legend>Weather datasource (historic)</legend> <legend>Weatherdatasource (historic)</legend>
<select class="form-control" name="weatherDatasourceId" id="weatherDatasourceList" onchange="handleWeatherDatasourceSelected(this);"></select> <select class="form-control" name="weatherDatasourceId" id="weatherDatasourceList" onchange="handleWeatherDatasourceSelected(this);"></select>
<div id="historicSourceInfoPanel" class="panel panel-default" style="display: none;"> <div id="historicSourceInfoPanel" class="panel panel-default" style="display: none;">
<div class="panel-body" id="historicSourceInfo"></div> <div class="panel-body" id="historicSourceInfo"></div>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<canvas id="resultChart"></canvas> <canvas id="resultChart"></canvas>
</div> </div>
<div id="weatherDataContainer" style="display: none;"> <div id="weatherDataContainer" style="display: none;">
<h2>Weather data</h2> <h2>Weatherdata</h2>
<div id="weatherData" class="table-responsive"></div> <div id="weatherData" class="table-responsive"></div>
</div> </div>
...@@ -157,14 +157,14 @@ ...@@ -157,14 +157,14 @@
parameterInfo.innerHTML = paramHTML; parameterInfo.innerHTML = paramHTML;
parameterInfo.style.display = "block"; parameterInfo.style.display = "block";
// Pull weather data sources from web service, render lists (historic and forecast sources, some are both) // Pull weatherdatasources from web service, render lists (historic and forecast sources, some are both)
weatherDatasources = await getFilteredWeatherDatasources({"authenticationType":"NONE"}); weatherDatasources = await getFilteredWeatherDatasources({"authenticationType":"NONE"});
//console.info(weatherDatasources); //console.info(weatherDatasources);
weatherDatasources.sort((a, b) => { weatherDatasources.sort((a, b) => {
return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0; return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0;
}); });
let weatherDatasourceList = document.getElementById("weatherDatasourceList"); let weatherDatasourceList = document.getElementById("weatherDatasourceList");
weatherDatasourceList.add(new Option("Please select a weather datasource", "-1")); weatherDatasourceList.add(new Option("Please select a weatherdatasource", "-1"));
for(let i=0;i<weatherDatasources.length; i++) for(let i=0;i<weatherDatasources.length; i++)
{ {
if(weatherDatasources[i].temporal.historic != null && weatherDatasources[i].temporal.historic.start != null) if(weatherDatasources[i].temporal.historic != null && weatherDatasources[i].temporal.historic.start != null)
...@@ -198,8 +198,8 @@ ...@@ -198,8 +198,8 @@
/** /**
* *
* When the user selects a weather datasource: * When the user selects a weatherdatasource:
* - Displays the description from the weather datasources's metadata * - Displays the description from the weatherdatasources's metadata
* - Displays a map showing the stations or area OR nothing - depending on the metadata's "spatial" property * - Displays a map showing the stations or area OR nothing - depending on the metadata's "spatial" property
* *
* *
...@@ -277,8 +277,8 @@ ...@@ -277,8 +277,8 @@
* - For gridded datasources: Anywhere inside the grid area * - For gridded datasources: Anywhere inside the grid area
* -> The location selected by the user is set in the latitude/longitude form fields * -> The location selected by the user is set in the latitude/longitude form fields
* *
* @param {String} id the weatherstation id NULL => gridded weather datasource * @param {String} id the weatherstation id NULL => gridded weatherdatasource
* @param {Array} [lon,lat] (decimal degrees) of the clicked location. NULL => station based weather datasource * @param {Array} [lon,lat] (decimal degrees) of the clicked location. NULL => station based weatherdatasource
*/ */
function handleHistoricDatasourceMapClicked(id, coordinate) function handleHistoricDatasourceMapClicked(id, coordinate)
{ {
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
/** /**
* Collects the input data into Json that conforms to the DSS model's Json schema * Collects the input data into Json that conforms to the DSS model's Json schema
* Also collects weather data (which goes into the input data Json) * Also collects weatherdata (which goes into the input data Json)
*/ */
async function submitData(){ async function submitData(){
...@@ -425,11 +425,11 @@ ...@@ -425,11 +425,11 @@
// Input check // Input check
if(currentWeatherDatasource == undefined && currentForecastWeatherDatasource == undefined) if(currentWeatherDatasource == undefined && currentForecastWeatherDatasource == undefined)
{ {
alert("ERROR: No weather datasource(s) selected"); alert("ERROR: No weatherdatasource(s) selected");
return; return;
} }
let forecastData = undefined; let forecastData = undefined;
// 1. Historic weather data // 1. Historic weatherdata
if(currentWeatherDatasource != undefined) if(currentWeatherDatasource != undefined)
{ {
if(currentWeatherDatasource.access_type == "stations") if(currentWeatherDatasource.access_type == "stations")
...@@ -497,7 +497,7 @@ ...@@ -497,7 +497,7 @@
} }
} }
// 2. Forecast weather data // 2. Forecast weatherdata
if(currentForecastWeatherDatasource != undefined && moment(inputData.optionalData.endDate).add(1,"days").isAfter(moment())) if(currentForecastWeatherDatasource != undefined && moment(inputData.optionalData.endDate).add(1,"days").isAfter(moment()))
{ {
coordinate = getLatLon(); coordinate = getLatLon();
...@@ -547,7 +547,7 @@ ...@@ -547,7 +547,7 @@
} }
else else
{ {
alert("ERROR: Could not get weather data. Please check if your datasource covers your location."); alert("ERROR: Could not get weatherdata. Please check if your datasource covers your location.");
return; return;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment