diff --git a/package-lock.json b/package-lock.json index d3b3e19ab..4faa1ef35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "flood-app", - "version": "5.8.0", + "version": "5.9.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "flood-app", - "version": "5.8.0", + "version": "5.9.0", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index 8166e6444..f44a366a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flood-app", - "version": "5.8.0", + "version": "5.9.0", "description": "Flood risk app", "main": "index.js", "repository": "github:defra/flood-app", diff --git a/release-docs/CFF-5.9.0.txt b/release-docs/CFF-5.9.0.txt new file mode 100644 index 000000000..38e0b261b --- /dev/null +++ b/release-docs/CFF-5.9.0.txt @@ -0,0 +1,38 @@ +# Check for flooding 5.9.0 Wednesday 25th May 2022 + +# Release + +https://eaflood.atlassian.net/projects/FSR/versions/15906/tab/release-report-all-issues + +# Tickets + +FSR-583 - TA Area update May 2022 + +FSR-558 - Update station list + +FSR-559 - Update Rainfall icons + +FSR-426 - Footer - Privacy Notice + +# Instructions + +!Important for webops + +This release includes 2 data updates: target area and the river-station data set + +Steps + +1 - Execute LFW_{STAGE}_99_LOAD_RIVERS + +2 - Update LFW_{STAGE}_99_LOAD_FLOOD_ALERT_AREAS jenkins job with the following properties update for the updated database name for production: + +DB_NAME=floodprdg +###### OR ######## +DB_NAME=floodprdb + +3 - Execute LFW_{STAGE}_99_LOAD_FLOOD_ALERT_AREAS ##NOTE if above property update not made this job will fail. + +4 - Execute LFW_{stage}_04_UPDATE_FLOOD_APP_AND_SERVICE_PIPELINE + +Execute smoke tests and forward results + diff --git a/server/models/views/river-and-sea-levels.js b/server/models/views/river-and-sea-levels.js index 6b3f83cb4..aaebca14d 100644 --- a/server/models/views/river-and-sea-levels.js +++ b/server/models/views/river-and-sea-levels.js @@ -44,6 +44,7 @@ class ViewModel { station.oneHourTotal = this.formatValue(station, station.one_hr_total) station.sixHourTotal = this.formatValue(station, station.six_hr_total) station.dayTotal = this.formatValue(station, station.day_total) + station.valueState = parseFloat(station.dayTotal) > 0 ? 'wet' : station.valueState station.external_name = this.formatName(station.external_name) } station.cols = this.getStationColumns(station) diff --git a/server/src/images/map-symbols-2x.png b/server/src/images/map-symbols-2x.png index a38d371db..0c32545ee 100644 Binary files a/server/src/images/map-symbols-2x.png and b/server/src/images/map-symbols-2x.png differ diff --git a/server/src/images/map-symbols-2x.png-old b/server/src/images/map-symbols-2x.png-old deleted file mode 100644 index abd1843c6..000000000 Binary files a/server/src/images/map-symbols-2x.png-old and /dev/null differ diff --git a/server/src/js/components/map/live.js b/server/src/js/components/map/live.js index c128651ff..372103b33 100644 --- a/server/src/js/components/map/live.js +++ b/server/src/js/components/map/live.js @@ -156,16 +156,7 @@ function LiveMap (mapId, options) { } } else if (props.type === 'R') { // Rainfall - state = 'rain' - if (props.one_hr_total) { - if (props.one_hr_total > 4) { - state = 'rainHeavy' - } else if (props.one_hr_total > 0.5) { - state = 'rainModerate' - } else if (props.one_hr_total > 0) { - state = 'rainLight' - } - } + state = props.day_total && props.day_total > 0 ? 'rain' : 'rainDry' } // WebGl: Feature properties must be strings or numbers feature.set('state', state) diff --git a/server/src/js/components/map/styles.js b/server/src/js/components/map/styles.js index 55d236bb1..55a879184 100644 --- a/server/src/js/components/map/styles.js +++ b/server/src/js/components/map/styles.js @@ -119,16 +119,10 @@ window.flood.maps.styles = { const isSelected = feature.get('isSelected') const isSymbol = resolution <= window.flood.maps.liveMaxBigZoom switch (state) { - case 'rainHeavy': - return isSelected ? (isSymbol ? styleCache.rainHeavySelected : styleCache.measurementAlertSelected) : (isSymbol ? styleCache.rainHeavy : styleCache.measurementAlert) - case 'rainModerate': - return isSelected ? (isSymbol ? styleCache.rainModerateSelected : styleCache.measurementSelected) : (isSymbol ? styleCache.rainModerate : styleCache.measurement) - case 'rainLight': - return isSelected ? (isSymbol ? styleCache.rainLightSelected : styleCache.measurementSelected) : (isSymbol ? styleCache.rainLight : styleCache.measurement) - case 'rainError': - return isSelected ? (isSymbol ? styleCache.rainErrorSelected : styleCache.measurementErrorSelected) : (isSymbol ? styleCache.rainError : styleCache.measurementError) case 'rain': return isSelected ? (isSymbol ? styleCache.rainSelected : styleCache.measurementSelected) : (isSymbol ? styleCache.rain : styleCache.measurement) + case 'rainDry': + return isSelected ? (isSymbol ? styleCache.rainDrySelected : styleCache.measurementNoneSelected) : (isSymbol ? styleCache.rainDry : styleCache.measurementNone) } }, @@ -461,23 +455,19 @@ const styleCache = { groundError: createIconStyle({ offset: [0, 1200], zIndex: 1 }), groundErrorSelected: createIconStyle({ offset: [100, 1200], zIndex: 10 }), // Rainfall - rain: createIconStyle({ offset: [0, 1600], zIndex: 3 }), - rainSelected: createIconStyle({ offset: [100, 1600], zIndex: 10 }), - rainHeavy: createIconStyle({ offset: [0, 1300], zIndex: 3 }), - rainHeavySelected: createIconStyle({ offset: [100, 1300], zIndex: 10 }), - rainModerate: createIconStyle({ offset: [0, 1400], zIndex: 3 }), - rainModerateSelected: createIconStyle({ offset: [100, 1400], zIndex: 10 }), - rainLight: createIconStyle({ offset: [0, 1500], zIndex: 3 }), - rainLightSelected: createIconStyle({ offset: [100, 1500], zIndex: 10 }), - rainError: createIconStyle({ offset: [0, 1700], zIndex: 3 }), - rainErrorSelected: createIconStyle({ offset: [100, 1700], zIndex: 10 }), + rain: createIconStyle({ offset: [0, 1300], zIndex: 3 }), + rainSelected: createIconStyle({ offset: [100, 1300], zIndex: 10 }), + rainDry: createIconStyle({ offset: [0, 1400], zIndex: 3 }), + rainDrySelected: createIconStyle({ offset: [100, 1400], zIndex: 10 }), // Measurements - measurement: createIconStyle({ offset: [0, 1900], zIndex: 2 }), - measurementSelected: createIconStyle({ offset: [100, 1900], zIndex: 10 }), - measurementAlert: createIconStyle({ offset: [0, 1800], zIndex: 3 }), - measurementAlertSelected: createIconStyle({ offset: [100, 1800], zIndex: 10 }), - measurementError: createIconStyle({ offset: [0, 2000], zIndex: 1 }), - measurementErrorSelected: createIconStyle({ offset: [100, 2000], zIndex: 10 }), + measurementAlert: createIconStyle({ offset: [0, 1600], zIndex: 3 }), + measurementAlertSelected: createIconStyle({ offset: [100, 1600], zIndex: 10 }), + measurement: createIconStyle({ offset: [0, 1700], zIndex: 2 }), + measurementSelected: createIconStyle({ offset: [100, 1700], zIndex: 10 }), + measurementError: createIconStyle({ offset: [0, 1800], zIndex: 1 }), + measurementErrorSelected: createIconStyle({ offset: [100, 1800], zIndex: 10 }), + measurementNone: createIconStyle({ offset: [0, 1900], zIndex: 1 }), + measurementNoneSelected: createIconStyle({ offset: [100, 1900], zIndex: 10 }), text: createTextStyle(), textLarge: createTextStyle({ font: 'Bold 16px GDS Transport, Arial, sans-serif', offsetY: -13, radius: 3 }) } diff --git a/server/src/js/core.js b/server/src/js/core.js index 522f2f795..453814d4d 100755 --- a/server/src/js/core.js +++ b/server/src/js/core.js @@ -124,11 +124,14 @@ Array.prototype.forEach.call(jsElements, function (element) { if (cookieButtons) { const settingsButton = document.getElementById('cookie-settings') const acceptButton = document.createElement('button') + const rejectButton = document.createElement('button') + + // Accept button acceptButton.className = 'defra-cookie-banner__button-accept' acceptButton.innerText = 'Accept analytics cookies' cookieButtons.insertBefore(acceptButton, cookieButtons.childNodes[0]) - // First button in banner + // First button in banner (Accept) acceptButton.addEventListener('click', function (e) { e.preventDefault() window.flood.utils.setCookie('set_cookie_usage', 'true', 30) @@ -138,12 +141,27 @@ if (cookieButtons) { document.getElementById('cookie-message').style.display = 'none' document.getElementById('cookie-confirmation-type').innerText = 'accepted' + document.getElementById('cookie-confirmation').style.display = '' }) - // Second button in banner - settingsButton.addEventListener('click', function (e) { + // Reject Button + rejectButton.className = 'defra-cookie-banner__button-reject' + rejectButton.innerText = 'Reject analytics cookies' + cookieButtons.insertBefore(rejectButton, cookieButtons.childNodes[1]) + + // Second button in banner (Reject) + rejectButton.addEventListener('click', function (e) { e.preventDefault() window.flood.utils.setCookie('seen_cookie_message', 'true', 30) + + document.getElementById('cookie-message').style.display = 'none' + document.getElementById('cookie-confirmation-type').innerText = 'rejected' + document.getElementById('cookie-confirmation').style.display = '' + }) + + // Third button in banner (Settings) + settingsButton.addEventListener('click', function (e) { + e.preventDefault() window.location.href = settingsButton.getAttribute('href') }) diff --git a/server/src/sass/components/_cookies.scss b/server/src/sass/components/_cookies.scss index 2db20ce82..799349beb 100755 --- a/server/src/sass/components/_cookies.scss +++ b/server/src/sass/components/_cookies.scss @@ -22,12 +22,6 @@ .defra-cookie-banner__confirmation { @extend .defra-cookie-banner__message; padding:5px 0px; - p { - @include mq ($from: tablet) { - max-width: 85%; - margin-bottom:0px; - } - } } .defra-cookie-banner__button-accept, @@ -54,12 +48,8 @@ } .defra-cookie-banner__button-hide { - @extend .defra-button-text; - @include mq ($from: tablet) { - position:absolute; - top:5px; - right:0px; - } + @extend .govuk-button; + margin-bottom: 10px; } @include govuk-media-query($media-type: print) { diff --git a/server/src/sass/components/_flood-list.scss b/server/src/sass/components/_flood-list.scss index aebdef231..2e67488ff 100644 --- a/server/src/sass/components/_flood-list.scss +++ b/server/src/sass/components/_flood-list.scss @@ -146,9 +146,14 @@ &--C-error &__title:after { background-image: svg-url(''); } + // New rainfall icons wet and dry &--R &__title:after { background-image: svg-url(''); } + &--R-wet &__title:after { + background-image: svg-url(''); + } + // Current icons to be removed &--R-heavy &__title:after { background-image: svg-url(''); } diff --git a/server/src/sass/components/map/_map-key.scss b/server/src/sass/components/map/_map-key.scss index 123ccc218..1dc59a820 100644 --- a/server/src/sass/components/map/_map-key.scss +++ b/server/src/sass/components/map/_map-key.scss @@ -114,7 +114,7 @@ background-image: svg-url(''); } &--rainfall { - background-image: svg-url(''); + background-image: svg-url(''); } // Outlook &--high { diff --git a/server/views/partials/cookie-banner.html b/server/views/partials/cookie-banner.html index 6856de280..0db3e716e 100644 --- a/server/views/partials/cookie-banner.html +++ b/server/views/partials/cookie-banner.html @@ -15,7 +15,7 @@
These are the standards you can expect from the Environment Agency when we collect, hold or use your - personal information when you use our service.
- -We do this in line with data protection law, including the General - Data Protection Regulation (GDPR) and the Data - Protection Act (DPA) 2018 .
- -We are a data controller – this means we determine how and why your personal data is processed. - You can learn more from our personal information charter.
- -When you use our GOV.UK service, we place small files called cookies onto your computer to collect - information about how you use it. - You can find out more about cookies and how to manage them.
- -When you submit feedback through our GOV.UK service, we collect:
-We are lawfully allowed to process your personal data because you consent to us doing so. You have - the right to withdraw this consent at any time by contacting us:
-Email: enquiries@environment-agency.gov.uk
-Telephone: 03708 506 506
- -We collect data to:
-We will not share or disclose your personal data to any party outside the Environment Agency without - your consent - unless we are lawfully able to do so.
- -After 24 months we delete all personal data. We may retain anonymised feedback longer than this.
- -We have procedures and security features in place to keep your data secure once we receive it. It’s - stored on secure servers in the European Economic Area - (EEA).
- -Sending information over the internet is generally not completely secure, and we can’t guarantee the - security of your data while it’s in transit.
- -You have rights under the General Data Protection Regulation (GDPR), including the right to access - your data and the right to complain to the Information - Commissioner’s Office.
-You have the right to withdraw consent. You can contact - us to do this.
-You can find out more about your rights in our personal Information - charter.
- -GOV.UK contains links to other websites. This privacy policy only applies to GOV.UK and doesn’t - cover other government services and transactions that we link to. These services, such as GOV.UK - Verify, have their own terms, conditions and privacy policies.
-If you go to another website directly from this one, read its privacy policy to find out what it - does with your information.
- -If you come to GOV.UK from another website, we may receive information from the other website. We - don’t use this data. You should read the privacy policy of the website you came from to find out - more about this.
- - +The Environment Agency is the controller for the personal data we process under the UK + General Data Protection Regulation (UK GDPR) and Data Protection Act 2018 (DPA 2018). Our contact details are available on GOV.UK. +
+Our personal information charter explains:
+Our purpose for processing your personal data is to improve the service.
+The lawful basis we rely on for processing your personal data is your consent under Article 6(1)(a) of the UK General Data Protection Regulation. To withdraw your consent for
+ processing at any time, contact:
+
Email: enquiries@environment-agency.gov.uk
+
Telephone: 03708 506 506
We collect personal data from you directly. The categories of personal data obtained are:
+We obtain your personal data by placing small files called cookies onto your computer to + collect information about how you use our GOV.UK service. Find out more about cookies + and how to manage them. The categories of personal data obtained are: +
+We use your personal data to:
+We do not use your personal information to make an automated decision or for automated profiling.
+We store and process your personal data on secure servers in the European Economic Area (EEA).
+Your data will not be transferred outside the European Economic Area.
+We keep your personal data for 24 months. We may retain anonymised feedback longer than this.
+We may change this privacy notice. In that case, the 'last updated' date at the bottom of this page will also change. Any changes to this privacy notice will immediately apply to you and your data.
+If these changes affect how your personal data is processed, we'll take reasonable steps to let you know.
+This notice was last updated on 17 March 2022.