Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSWeb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPSWeb
Commits
6588aec6
Commit
6588aec6
authored
1 year ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Fix typos
parent
844e6957
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ipmd/templates/ipmd/saddlegallmidgeform.html
+14
-14
14 additions, 14 deletions
ipmd/templates/ipmd/saddlegallmidgeform.html
with
14 additions
and
14 deletions
ipmd/templates/ipmd/saddlegallmidgeform.html
+
14
−
14
View file @
6588aec6
...
@@ -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
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment