giseldo/neodataset huggingface dataset:
BE: Add preset backend URL to serverless backend when deploying

Set the variable PRESET_BACKEND_URL in the config.json for TST, ACC and PRD

TST: `"PRESET_BACKEND_URL": "https://gwpresetsbe.geoweb.dev.knmi.cloud"`

ACC: `https://gwpresetsbe.geoweb.acc.knmi.cloud`

PRD: `https://gwpresetsbe.geoweb.knmi.cloud`


Merge request: https://gitlab.com/KNMI/geoweb/geoweb-serverless-backend/-/merge_requests/292

Story points: 2.0
Write US about Global notification for different modules of GeoWeb

Based on design, prepare meeting to create the US.
Schedule for week of June 13th

![Screenshot_2022-06-09_at_09.11.32](/uploads/58c5992065546f0e3969e27ebecf14a7/Screenshot_2022-06-09_at_09.11.32.png)

![Screenshot_2022-06-09_at_09.15.59](/uploads/68244b56e9797ee9c84cfa263e05d0dd/Screenshot_2022-06-09_at_09.15.59.png)
https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/5ecf926c9c931a2a11621c31

![Screenshot_2022-06-09_at_09.25.00](/uploads/4791f7c1894789ee7ddaf4a232c6b22e/Screenshot_2022-06-09_at_09.25.00.png)
https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/61f2bf652767ebb4431c32f0

Story points: 3.0
BE: Implement differenciation variable in /viewpresets

When listing presets, add a key to differentiate whether it's a system preset or a user preset. 

For example `scope: system/user`

Make sure that the call returns this new property (that will be required), ~~and that the README is updated.~~ (README will be updated after review of current API documentation by FMI and MetNorway)

How to check:
- `ListViewPresetItem` in `src\preset_schemas.py` updated to require `scope` with values "user" or "system"
- `scope` added in `staticpresets\viewpresets.json`
- column `scope` added in database setup (`src\dbactions.py`: `dbcreatetables` and `dbinsertviewpreset`)
- `scope` read from `viewpresets.json` and loaded in `src\app.py`
- test written to check contents of scope in `src\test_typing_schemas.py`)
- **Can test if everything works by setting up database in docker or locally (see [README](https://gitlab.com/opengeoweb/backend-services/presets-backend/-/blob/main/README.md))**
- Check presence of `scope`key by making a `\viewpreset` request: [Docker](https://0.0.0.0:4443/viewpreset) or [Local/Flask](http://127.0.0.1:8080/viewpreset)

Story points: 2.0
BE: Organising meeting on vulnerabilities with CPT

- Adapt CI/CD so vulnerabilities detected don't break dev deployments, but generate warnings or get logged.
- The outcome of https://gitlab.com/opengeoweb/opengeoweb/-/issues/1857 about deploying same versions of lambdas and containers to acc and prd is that there is still some work to be done. Lambdas are re-used, but the 2 containers are not re-used or are being re-built unnecessarily. Problem however is that changing CI/CD for deployment to PRD is risky and hard to test.

Story points: 1.0
FE: TAF import from tac overview is not overwriting all values

- make a taf with all base forecast fields filled in
- save or publish it
- now edit it again, and import a TAF from TAC overview that has some empty fields in the baseforecast

Expected: 
- the TAF is imported exactly as is, so including the empty fields

Actual:
- the old values remain for fields that were empty in the imported TAC. In your screen you now have a combination of 2 Tafs which is very confusing.

Possible solution: 
- When setting the form, also set empty values. It can probably remove some functionality when publishing the form or importing.

Story points: 3.0
FE: create a setMapPreset action for core and reuse for ConfigurableConnectedMap (part 1)

Create a new setMapPreset action in core. Fire it in ConfigurableConnectedMap, and let saga's handle all actions that are now in mount defined. All props in ConfigurableConnectedMap (but className) can be replaced with initialProps:
```
export const ConfigurableConnectedMap: React.FC<ConfigurableConnectedMapProps> =
  ({  
    className,
    ...initialProps
  }: ConfigurableConnectedMapProps) => {
```

For the initialProps type, check `MapPresetInitialProps ` in https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/1538/diffs#15e39b4ce825c58fc7ae1461d237abee5f6fe6eb_47_49

Story points: 3.0
FE: Presets fix active presetname in dialog

In the screenmanager when having the layermanager is open and switching from active layermanager, the active preset is getting reset. The active preset name does not corresponds on the chosen one. (do after https://gitlab.com/opengeoweb/opengeoweb/-/issues/2129)

Suggested solution (core can't import anything of `presets` lib):
- core: create a new action `activePresetId` for the `map` reducer in `core` lib, with param `mapId` and `presetId`
- core: create a new selector, getActivePresetId for `core` which takes a `mapId` as argument
- core: `map` reducer changes the `presetId` (or activePresetId) of the map
- presets: import this action + selector in `presets` lib and fire it with correct params, and remove the local state of presetId

Story points: 3.0
FE: Show mappreset dialog in knmi-geoweb

Show the mappreset dialog in knmi-geoweb based on whether a preset backend is defined in `config.json`

This affects only knmi-geoweb. If the property `PRESET_BACKEND_URL` is not defined, it simply does not do anything.

If MapPresetsDialog component is not ready, just render a div with a data-testid, which we can overwrite with the component when it's ready

Story points: 3.0
Display warning properties in GeoWeb application

Acceptance criteria / TODO:
- Dummy data is received from cap/src/lib/components/MapViewCap/geoJsonExamples.ts
- Implement functionality so that map can can be clicked to display warning properties --> example in core/src/lib/components/ReactMapView/AdagucMapDraw.stories.tst rows 182 - 211

Story points: 3.0
FE: Create Preset Dialog

Show the list of presets from the BE. No options for now, but we can show the icons. 

Do a separate storybook for it. Also do snapshot test with dummy layers. 

https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/60992c1ecde3bf10bec429d2

Story points: 2.0
BE: Define typing of presets using OpenAPI

Check that the matching is logical (and that it matches the FE, if it does not FE will be changed accordingly).

Ensure that the typing stays consistent over time and is robust.

Do it in the geoweb-serverless-backend repo (expand pre-existing spec).

Testing:
- Set up the presets backend in a Docker file ([readme.md](https://gitlab.com/opengeoweb/backend-services/presets-backend/-/blob/main/README.md))
- While building the Docker, tests are being run
- In the test valid and invalid responses from a mock database are tested
- All tests should pass

Story points: 3.0
Layer Select: Fix abstract max lenght on Layer Select layers on Safari (Mac)

Issue:

- Abstract texts are way too long in the UI of single layer in Layer Select when using Safari on Mac

Example:

![Screenshot_2022-05-17_at_15.50.48](/uploads/64846294839caf45d4d1b57594be84bb/Screenshot_2022-05-17_at_15.50.48.png)

Test Criteria:
- Abstract text should fit inside of the container of a single layer in the list

Story points: 5.0
CAP: Create storybook for CAP componentsLookUp

ToDO

- Create a storybook for CAP componentsLookUp for using dummy data more easily in the components (No need to update screenPresets to test different datasets)
- Create tests for storybook

Acceptance criteria
- Storybook should show layout where CAP map is left, and CAP list is on right (similarly to CAP-preset in geoweb staging)

Story points: 1.0
FE: Refactoring service store for FMI

Currently, services store and layerSelect stores activeServices array use services URL address as an id, this is a problem, as in LayerSelect it should be possible to edit services in the store, including URL and id should be the one variable that is never changed in order to keep everything correctly synced.

Solve in following order:
- https://gitlab.com/opengeoweb/opengeoweb/-/issues/1772
- https://gitlab.com/opengeoweb/opengeoweb/-/issues/1883
- https://gitlab.com/opengeoweb/geoweb-assets/-/issues/1864

Story points: 8.0
BE: Research authentication mechanism for presets backend

Research how authentication for presets can be arranged.

Plan is is to have the checking of authentication in the load balancer or proxy in front of the preset-backend. The load balancer or proxy should detect the OAuth2 JWT token and validate it. A flag via http headers can then be set for the presets backend, like a username. This can be used in the presets backend to know if someone is signed in.

- This should work with the AWS deployment, possibly in the ELB or the API GateWay
- This should work for the nginx container used in docker compose

Have a look at https://curity.io/resources/learn/token-sharing/. Sharing the JWT to other backends might not be a good idea.

Story points: 3.0
Update the GeoWeb version in the FMI environment

- [x] Test current FMI presets with the new GeoWeb version
  - https://gitlab.com/opengeoweb/fmi/fmi-aws-config/-/tree/master/env/fmi/presets
- [x] Create MR to update the version
  - https://gitlab.com/opengeoweb/fmi/fmi-aws-config/-/blob/master/.gitlab-ci.yml#L5 
- [x] Agree on an update schedule (FMI DE's/PO?)
  - Create a list (from release notes) of changes, bug fixes, etc. 
- [x] Notify users of the update through an internal Slack channel

Story points: 3.0
Warning area is highlighted when clicked on a map

Suggestion for solution:

1. Place original geoJson into a const, for example: `const dataNoHighlight = geoJson`
2. Create state for example const [dataInUse, setDataInUse] = React.useState()
3. use dataInUse as geojson prop, for example: `<MapViewLayer geojson={dataInUse}>`
4. Update onClickFeature function to have two cases

      1. if(selectedFeature) --> if necessary take deep clone of dataNoHighlight using lodash.cloneDeep() and edit it

for example:

const clonedGeoJson = _cloneDeep(dataNoHightlight)\
const editedGeoJson = clonedGeojson.find()...\
setDataInUse(editedGeoJson)

This should set show hightlights on map and switch hightlights between clicking polygons, while leaving dataNoHighlight untouched


      2. else --> set dataNoHightlight to dataInUse. For example :  `setDataInUse(dataNoHighlight)` 
(This should clear all highlights when clicking outside of polygon)

Story points: 3.0
Display warning properties on map when clicking polygon

Acceptance criteria / TODO:
- Storybook to be used is: http://localhost:5000/?path=/story/components-reactmapview-adagucmapdraw--map-6
- Properties are displayed in separate section on top of map
- If no polygon is selected (by default) no info section is shown
- When warning area is selected, info section is shown
- If warning are is already selected, info section details are updated
- If user clicks map section where there is no warning area, info section is closed

Example of properties in geojson that can be passed to map component
```
  type: 'FeatureCollection',
  features: [
    {
      type: 'Feature',
      properties: {
        stroke: '#8F8',
        'stroke-width': 4,
        'stroke-opacity': 1,
        fill: '#33ccFF',
        'fill-opacity': 0.5,
        country: 'Norway',
        warning: 'Wind',
        details: [
          {
            Event: 'Gale',
            Sent: '2022-04-06T06:42:09+00:00',
            Expires: '2022-04-06T14:00:00+00:00',
            Area: 'Andenes - Hekkingen',
            Web: 'https://www.met.no/vaer-og-klima/Ekstremvaervarsler-og-andre-farevarsler',
            Sender: 'noreply@met.no',
            Identifier: '2.49.0.1.578.0.220406064209738.1298',
          },
        ],
      },
      geometry: {
        type: 'Polygon',
        coordinates: [
          [
            [16.062667, 69.332167],
            [16.458667, 69.425667],
            [17.759667, 69.687167],
            [17.799667, 69.650167],
            [18.099667, 69.516667],
            [16.8645, 69.316333],
            [16.333, 69.233],
            [16.062667, 69.332167],
          ],
        ],
      },
    },
```

Story points: 5.0
FE: map zoom action is not updating the mapstore when the map is not part of any sync group

When zooming or panning a map view in screen manager, the action GENERIC_SYNC_SETBBOX is triggered. This should update the map store, but that only works if the map is part of a sync group. You can check this in the Redux devtools.

Currently zooming the map only updates the syncronizationGroupStore when the map is not part of any sync groups. This causes the map store to not be up to date with the actual bbox of the map, and then splitting a view results in a new map with an old bbox.

TODO: 
- make sure zooming the map updates the map store also when the map is not part of any sync groups.
- add test

Story points: 2.0
FE: update TAC in form after importing from TAC Overview

After importing a taf from TAC Overview into the edit form, the TAC in the form should be updated so it matches with the new form content.

It should update the TAC after every import.

Once it works, add this check to the TAF import e2e test in Geoweb and knmi-geoweb
![image](/uploads/c057c0c6108f58f129da5df17556c05c/image.png)

Story points: 3.0
Design review TAF implementation

When all TAF implementation is finished and deployed to Knmi tst or acc environment, Didier can go through it to check if we missed anything.

Devs will provide valid TAF data for testing. --> you can find some real life example TAFs here: https://www.knmi.nl/nederland-nu/luchtvaart/vliegveldverwachtingen

url for ACC environment: https://geoweb.acc.knmi.cloud/

Story points: 2.0
Import TAF from TAC overview into edit form (part 2)

Should only copy data to not-disabled and non-hidden fields (Actually import as if user typed in the values and then do the normal validation)

* Clicking ![image](https://gitlab.com/opengeoweb/geoweb-assets/uploads/562554c112f509342a57a8ebf112e5c5/image.png) the TAC is imported in the Edit mode.
* After importing the validation should be trigger and errors displayed in the Edit mode as usual.

Story points: 4.0
FE: Taf change tooltip position

The tooltip is blocking some buttons, would be better to place it to the right side of the location on hover

![Screenshot_2022-04-20_at_10.48.25](/uploads/024a3c62cd10dffd6eef1749b6d5f5e5/Screenshot_2022-04-20_at_10.48.25.png)

Story points: 2.0
FE: Bug with TAF headers (one timeslot ahead)

The headers showing the timeslots are one timeslot ahead (that is, 6 hours ahead). 
The following image was taken at around 13:30 UTC, yet the header states the current timeslot is 18:00 instead of 12:00. 

![image](/uploads/82903b34354ca9437cd4978adf68b505/image.png)

Story points: 2.0
FE: Taf issues button briefly shows '1 issue' when user switches taf locations

see https://gitlab.com/opengeoweb/opengeoweb/uploads/1e3b5066e1d702773c65327571371c3e/test-2022-04-14_17.48.20.mp4

Solution as discussed with Marcel: start the form in draft mode instead of publish mode, so the required field errors are not shown when switching location

Story points: 3.0
FE: TAF confirmation dialog is still showing after changes are saved

- edit a taf form
- do not save
- click the tab for a different location
- confirmation dialog shows -> this is correct
- click GO BACK in the confirmation dialog
- click SAVE
- now click the tab for a different location
- confirmation dialog shows **-> should not show since you just saved the changes**

also add a test for this scenario

Story points: 2.0
FE: show confirmation dialog when closing the TAF screen in screenmanager when there are unsaved changes part 1

When user has changed a TAF and not saved yet, and then closes the TAF screen or selects a different screenpreset, currently the TAF screen will be gone and the changes are lost, without warning the user.

It would be good to show a confirmation dialog before continuing if there are unsaved changes.

Use the same message we have for switching tabs.

Story points: 8.0
Create UI component for single warning in CAP warning list

Acceptance criteria / TODO:
- Same or similar layout is used as Sigmet/Airmet
- By default, properties are not shown for an alert
- Picture is for reference and should not be applied as is
- Warning list item contains fields: Event, Severity, Expires
- Severity color is applied as warning background color

![CAP](/uploads/7c1276adf09c37587708c6f4fa844b4b/CAP.PNG)

Story points: 5.0
FE: adjust confirmationDialog component to match design

https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/5ecf926a6dcae148dfbb7e7f

https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/6093e69605f5e03497c1132d

The confirmation dialog in shared should be updated to match design:
- button text should not be uppercased
- the space between title and text should be smaller
- there should be a max width
- the Go back button should be tertiary

Story points: 2.0
FE: Add close button to alert banner

When an error happens in the BE and the alert banner is displayed, users cannot close the banner, they need to close the whole TAF screen first, which is not convenient. 

It would be desirable to have a close button. 
The close button should be optional. 

see design [here](https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/5ecf926cd694dd45fb5dcec9)

Story points: 4.0
Adjusting column values by scrolling with mouse in Mac

* User scrolls over a column cell and holds a keyboard button down at the same time
  * column cell values will change
* User scrolls over a column cell but **doesn't** hold the keyboard button down at the same time
  * column cell values will not change
  * layer manager rows scrolls up or down

Extra info (still missing):
In Mac Chrome:
* select in reference application Satellite preset
* open layer manager and scale it so that not all layers do not fit window
* click title of layer manager
* hover mouse over first layer name and try to scroll, most of the time it does not work
* scrolling does work between the rows 100% of time

Story points: 2.0
Implement saving WMS-services to local storage

Added WMS should be remembered
- redux-persist usage is verified from KNMI & Met Norway before implementation
- Service is added to local storage
- At least service url is added to local storage
- Services are not remembered between different browsers or different local computer user
- Login or logout from GeoWeb does not affect to services available in local storage

Notes:
- redux-persist library is most potential for this task based on the investigation

Story points: 3.0
BE: Implement map presets read api

Goal of this issue is to produce current mappresets from backend (derived from the current existing workspace presets). No saving, just listing and getting the existing presets from the database.

- have a few mappresets as json files in this repo
- these will be used to initialise the database
- api will list all the mappresets from the database and get 1 mappreset

Story points: 8.0
FE: Change default area when splitting a mapview in screenmanager

* when using the spilt window horizontally or split window vertically (![Schermafbeelding_2022-03-30_om_13.15.03](https://gitlab.com/opengeoweb/geoweb-assets/uploads/6533ed47091820817ec8b65203284d0f/Schermafbeelding_2022-03-30_om_13.15.03.png)) a new map view will appear
* the new map view will show the area similar to the one have the same bounding box as the originating one from which I clicked the icon.

Story points: 4.0
Earthquake data should be read from the Production SNS topic

Earthquake data should be read from the Production SNS topic arn:aws:sns:eu-west-1:368462435992:rdsa-bes-dashboard-topic-prd. Needs a change in cloudformation; TOPIC arn for cloudformation should be set from .gitlab-ci.yml (possibly in one of the properties files).

One for PRD and one for dta

Story points: 4.0
FE: show confirmation dialog when switching TAF location when form is changed and not saved yet

When the user switches to a different TAF location while editing a TAF, the behavior should be the same as in the current application: if the editing TAF is not saved a message for the user should pop up to remember him/her to save it manually.

This still needs to be implemented in the new TAF interface.


Example in old taf module:

![image](/uploads/e5ef353d6ebd9cf8050f1d6d3583b35b/image.png)

Story points: 4.0
FE: TAF IssuesPane should stay open and update when selecting a different TAF part 1

As stated in design: `Users can also decide to keep the issue detail container open all the time, and switch from TAF to TAF.` Content should be updated to show the TAF

https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/61f2bfb7f296e5b460ed7dde

Currently when you select a different TAF the issuesPane is closed, it should stay open until the user decides to close it

Story points: 8.0
FE: TAF update TAC Overview after saving a TAF

- open a new TAF
- notice that the TAC Overview section shows `No TAC available` for this TAF
- enter valid data and publish this TAF
- the TAC Overview section still shows `No TAC available` for this TAF
- after switching tabs in the TAC Overview the TAC is shown correctly

Would be nice to have it update automatically

Story points: 4.0
FE: Taf scrollbar container

Move TAF scrollbar so the top timeslots are always visible: (locations and taf rows can cause scrollbar to appear)



![Screenshot_2022-04-04_at_09.52.02](/uploads/8962cdfee6fbfaae2ee72b98f86efd53/Screenshot_2022-04-04_at_09.52.02.png)

Story points: 4.0
Study/revise Common Alerting Protocol (CAP)

Preliminary study/revise what CAP is and how CAP warnings could be implemented on GeoWeb

#### Study
- Think how CAP warnings could be parsed from the CAP feed and listed on GeoWeb
- Think how to parse polygons from CAP warnings and how to display polygons on a GeoWeb map

#### References
* CAP 1.2 Standard http://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2.html
* MetCoop CAP
  - Project: https://git.smhi.se/metcoop/metcoop-cap-profile/-/tree/master
  - Profile (defined by SMHI, FMI and MET Norway): https://git.smhi.se/metcoop/metcoop-cap-profile/-/blob/master/metcoop-cap-profile.md
* CAP feeds
  - OASIS: https://docs.oasis-open.org/emergency-adopt/cap-feeds/v1.0/cap-feeds-v1.0.html
  - MET Norway: https://api.met.no/weatherapi/metalerts/1.1?lang=en
* Google Labs Common Alerting Protocol Validator: https://cap-validator.appspot.com/
  * Copy and paste "Input feed" from: https://api.met.no/weatherapi/metalerts/1.1?lang=en
  * Select "Validate"
  * Click on a warning on the map to see the details

* CAP 101 tutorial video on youtube\
https://www.youtube.com/watch?v=vKFbqZYD9Mw

#### Done
- [x] Kristian  
- [x] Esa  
- [x] Pauli  
- [x] Alvar  
- [x] Karoliina  
- [x] Viljami

Story points: 2.0
FE: replace old dialog with new one

Spaceweather, Sigmet Airmet and Taf are using the old dialog which causes JS errors in the console. We should replace it with the ToolContainer and make sure it behaves like the old one.

To test, make sure when opening the dialog won't show an error. 

Include it in:
- knmi-geoweb
- geoweb
- taf
- spaceweather
- sigmet/airmet

![Screenshot_2022-03-28_at_10.45.37](/uploads/0571097fd01728de5fcfb8614c2ac00f/Screenshot_2022-03-28_at_10.45.37.png)

Story points: 8.0
BE: Satcomp Color overlay option preset

Add new color options to overlays, so each layer has options to choose color. Make all color options available. The options should be visible in the front-end. In the preset we currently have one setting but needs multiple.

The options should follow the colors and thickness described in the design https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/6241ed3c186b9713c94ce99f

Story points: 4.0
FE: TAf Tac OVerview mobile

Tac Overview should be hidden on mobile, and be accessed with a button that will trigger a dialog. Active TAF should be on top (should be srolled to like the rest). 

![Screenshot_2022-03-28_at_09.26.35](/uploads/c88fe4fc820b1c76c42fef6447065cab/Screenshot_2022-03-28_at_09.26.35.png)

Story points: 8.0