-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Amend feedback links - FSR-310 (#217) * FSR-310: Amend feedback survey links. * FSR-310: Only display feedback link fo active warnings/alerts. Co-authored-by: John Shields <[email protected]> * Feature/error test (#218) * Adding test error route * sonarcloud * slightly updating error logic for joi validations * sonarcloud * test for getError in server * spliting error log between log and error files * removing detail from log error * Fix json for mocked external location search. (#221) Co-authored-by: John Shields <[email protected]> * Feature/fsr 332 (#219) * added route and service data in broswer * added data for FFOI stations * fixed linting issues * sorted array of values * fine tuning * added unit tests and size of file on html * Sonar.....Cloud * made changes based on feedback from show and tell * removed unneeded npm package * removed code smells * Feature/fsr 333 fix (#222) * removed forecast values not shown on the map * csv now only has data shown on the graph * fixed failing unit-tests * fixed failing unit tests again * refactor for sonar cloud * refactored * Feature/fsr 333 (#223) * Accessibility amendments following from DAC review https://eaflood.atlassian.net/browse/FSR-333 * DAC-1 - Aside fix * DAC-2 Form label * DAC-4 - Visual headings * DAC-9 - Alt text removed * DAC-12 - Bleed through * DAC-16 - Title removed * DAC-18 - Visual only * OL-1 - Heading hidden and empty p tag removed * LST 1-4 - Predictable inpout and status message * LST 5-6 - Aria controls and urlencode * ST-4-7 - Station page * DAC-16 - mAOD fix * OL-1 - Empty p tag fix * NAV-3 - Repeatable content * DAC-1 - Aside fix * DAC-2 Form label * DAC-4 - Visual headings * DAC-9 - Alt text removed * DAC-12 - Bleed through * DAC-16 - Title removed * DAC-18 - Visual only * OL-1 - Heading hidden and empty p tag removed * LST 1-4 - Predictable inpout and status message * LST 5-6 - Aria controls and urlencode * ST-4-7 - Station page * DAC-16 - mAOD fix * OL-1 - Empty p tag fix * NAV-3 - Repeatable content * removal of back button * removed CS script casuing 404 * trying to stop sonar cloud seeing duplication * removing text in alt tag * removed duplicate block out to a partial * replaced partial with different part of page * added partial to second page to cut duplication * Changes to address testing feedback * updated unit test to look for historic river levels button * linting * added line at the end of file Co-authored-by: danleech-defra <[email protected]> Co-authored-by: John Shields <[email protected]> * Release 3.14.0 prep (#225) * Release 3.14.0 prep * Update version number in release doc. Co-authored-by: John Shields <[email protected]> Co-authored-by: John Shields <[email protected]> Co-authored-by: Tedd <[email protected]> Co-authored-by: nikiwycherley <[email protected]> Co-authored-by: danleech-defra <[email protected]>
- Loading branch information
1 parent
f902066
commit 4ec15aa
Showing
59 changed files
with
2,388 additions
and
471 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Service refresh release 3.14.0 Tuesday 10th August 2021 | ||
|
||
# Tickets | ||
|
||
https://eaflood.atlassian.net/projects/FSR/versions/15493/tab/release-report-all-issues | ||
|
||
|
||
## Release notes taken from Jira | ||
|
||
# Release notes - FIS Service Refresh - Version Release 7 | ||
|
||
### Bug | ||
|
||
[FSR-397] (https://eaflood.atlassian.net/browse/FSR-397) Prod issue - share links not working in live as expected | ||
|
||
### Story | ||
|
||
[FSR-310] (https://eaflood.atlassian.net/browse/FSR-310) Amendments to surveys on Beta service | ||
|
||
[FSR-332] (https://eaflood.atlassian.net/browse/FSR-332) Ability to download .csv output for river/sea/groundwater page | ||
|
||
[FSR-333] (https://eaflood.atlassian.net/browse/FSR-333) Accessibility amendments following from DAC review | ||
|
||
[FSR-334] (https://eaflood.atlassian.net/browse/FSR-334) Amendments to river/coastal/groundwater station page to meet accessibility | ||
|
||
[FSR-335] (https://eaflood.atlassian.net/browse/FSR-335) Amendments to river/sea/groundwater list page to meet accessibility | ||
|
||
[FSR-352] (https://eaflood.atlassian.net/browse/FSR-352) Amendments to navigation links on Beta service | ||
|
||
[FSR-353] (https://eaflood.atlassian.net/browse/FSR-353) Amendment to Outlook regional view | ||
|
||
[FSR-399] (https://eaflood.atlassian.net/browse/FSR-399) Accessibility - removing back button logic from the Beta | ||
|
||
|
||
# Webops Instructions | ||
|
||
Execute job: LFW_{stage}_04_UPDATE_FLOOD_APP_AND_SERVICE_PIPELINE | ||
|
||
Confirm with developers that deployment was successful. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const floodService = require('../services/flood') | ||
|
||
module.exports = { | ||
method: 'GET', | ||
path: '/error', | ||
handler: () => floodService.getError() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
const floodService = require('../services/flood') | ||
const moment = require('moment-timezone') | ||
|
||
module.exports = { | ||
method: 'GET', | ||
path: '/station-csv/{id}/{direction?}', | ||
handler: async (request, h) => { | ||
const { id } = request.params | ||
let { direction } = request.params | ||
|
||
direction = direction === 'downstream' ? 'd' : 'u' | ||
|
||
const station = await floodService.getStationById(id, direction) | ||
|
||
const stationName = station.external_name.replace(/\s/g, '-') | ||
|
||
const [telemetry, thresholds] = await Promise.all([ | ||
floodService.getStationTelemetry(id, direction), | ||
floodService.getStationForecastThresholds(id) | ||
]) | ||
|
||
this.telemetry = telemetry | ||
|
||
this.telemetry.forEach(function (item) { | ||
item.type = 'observed' | ||
item.ts = moment.utc(item.ts).format() | ||
}) | ||
|
||
// Forecast station | ||
if (thresholds.length) { | ||
const values = await floodService.getStationForecastData(station.wiski_id) | ||
|
||
const forecast = values.SetofValues[0].Value | ||
|
||
const forecastData = forecast.map(item => { | ||
const itemDate = item.$.date | ||
const itemTime = item.$.time | ||
const date = moment(`${itemDate} ${itemTime}`).format('YYYY-MM-DDTHH:mm') + 'Z' | ||
return { ts: date, _: item._, type: 'forecast' } | ||
}) | ||
|
||
// Truncate forecast data to be 36 hours from forecast creation | ||
const forecastStart = moment(this.telemetry[0].ts) | ||
|
||
this.truncateDate = moment(forecastStart).add(36, 'hours') | ||
|
||
forecastData.forEach(function (value) { | ||
value.ts = moment(value.ts) | ||
|
||
if (value.ts.isBefore(forecastStart) || value.ts.isAfter(this.truncateDate)) { | ||
return | ||
} | ||
value.ts = moment.utc(value.ts).format() | ||
|
||
this.telemetry.push(value) | ||
}, this) | ||
} | ||
|
||
this.telemetry.sort(function (a, b) { | ||
return new Date(a.ts) - new Date(b.ts) | ||
}) | ||
|
||
if (thresholds.length) { | ||
this.csvString = [ | ||
[ | ||
'Timestamp (UTC)', | ||
'Height (m)', | ||
'Type(observed/forecast)' | ||
], | ||
...this.telemetry.map(item => [ | ||
item.ts, | ||
item._, | ||
item.type | ||
]) | ||
] | ||
.map(e => e.join(',')) | ||
.join('\n') | ||
} else { | ||
this.csvString = [ | ||
[ | ||
'Timestamp (UTC)', | ||
'Height (m)' | ||
], | ||
...this.telemetry.map(item => [ | ||
item.ts, | ||
item._ | ||
]) | ||
] | ||
.map(e => e.join(',')) | ||
.join('\n') | ||
} | ||
|
||
const response = h.response(this.csvString) | ||
response.type('text/csv') | ||
response.header('Content-disposition', `attachment; filename=${stationName}-height-data.csv`) | ||
return response | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.