Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: new mock setup floods AB#26812 #1484

Merged
merged 117 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
2381855
fix: new mock setup floods AB#26812
jannisvisser Mar 8, 2024
f1f1cb6
fix: multiple adminLevels mock AB#26812
jannisvisser Mar 8, 2024
2650822
fix: add trigger-per-leadtime to mock + process AB#26812 AB#26802
jannisvisser Mar 8, 2024
796ffcd
fix: mock glofas stations + flood extent AB#26812
jannisvisser Mar 8, 2024
ce935b1
fix: make timeline non-interactive AB#26927
jannisvisser Mar 8, 2024
2123937
fix: not multiple timeline-btns for multi-event with same leadtime AB…
jannisvisser Mar 11, 2024
8975f58
fix: highlight 1st leadTime of event on select AB#26927
jannisvisser Mar 11, 2024
440de85
feat: distinguish firstLeadTime & firstTriggerLeadTime AB#26926
jannisvisser Mar 11, 2024
1a28abd
feat: make epidemics event-based AB#26933
jannisvisser Mar 11, 2024
674640e
undo comment-out
jannisvisser Mar 11, 2024
c7c43f7
feat: ongoing flood event mock + setup AB#26935
jannisvisser Mar 11, 2024
25a2cb4
fix: use first trigger leadTime over first warning leadTime if availa…
jannisvisser Mar 11, 2024
c3dabfb
refactor: create mockService AB#26812
arsforza Mar 11, 2024
e50fbd0
refactor: add scenarios json AB#26812
arsforza Mar 11, 2024
c80d89f
WIP use mockService in floods endpoint AB#26812
arsforza Mar 11, 2024
f3432fd
fix: show ongoing timeline-btn AB#26935
jannisvisser Mar 11, 2024
7c8a941
Merge branch 'feat.floods-leadtime-event' of https://github.com/rodek…
jannisvisser Mar 11, 2024
6b037e2
feat: add epidemics mock + restructure AB#26812
jannisvisser Mar 11, 2024
85a0bf4
fix: also ongoing for epidemics AB#26935
jannisvisser Mar 11, 2024
f3045ab
fix: no trigger floods AB#26802
jannisvisser Mar 11, 2024
af34089
feat: flash-floods new mock approach AB#26938
jannisvisser Mar 11, 2024
fa94212
Merge branch 'master' of https://github.com/rodekruis/IBF-system into…
jannisvisser Mar 12, 2024
27f2bd6
refactor: mock glofas stations AB#26938
arsforza Mar 14, 2024
a0e2df2
refactor: add perc to trigger scenario AB#26938
arsforza Mar 14, 2024
d515ea2
feat: add twoWarnings scenario AB#26938
arsforza Mar 14, 2024
f93a0d4
fix: handle warning leadtime in chat AB#26938
arsforza Mar 14, 2024
87253dd
fix: add all api calls AB#26938
arsforza Mar 14, 2024
f2e4cdf
fix: update twoWarning scenarios AB#26938
arsforza Mar 15, 2024
ce2f60a
fix: add evolving scenario to floods AB#26926
arsforza Mar 15, 2024
5757e0c
fix: cleanup AB#26938
jannisvisser Mar 15, 2024
7308a19
fix: revert incorrect fix AB#26926
jannisvisser Mar 15, 2024
4fe121e
fix: move glofas mock to scenarios AB#26938
arsforza Mar 15, 2024
c95eef8
feat: remove old event functionality AB#26940
jannisvisser Mar 18, 2024
c64e582
refactor: rm 'activeTrigger' from frontend AB#26940
jannisvisser Mar 18, 2024
5fb3127
fix: call get trigger-per-lead-time only once AB#26940
jannisvisser Mar 18, 2024
d5372ae
fix: ongoing header malaria AB#26935
jannisvisser Mar 18, 2024
5158c49
AB#26925 Sync stores and layers to geoserver
Mar 18, 2024
d9d72b4
fix: breadcrumb behavior AB#27047
jannisvisser Mar 18, 2024
1c8ee32
Only sync in DEBUG AB#26925
Mar 18, 2024
54c1462
AB#26925 Generated xml config for geoserver UGA floods
Mar 18, 2024
89fa72d
Merge branch 'feat.dynamic-stores-layers-geoserver' of https://github…
jannisvisser Mar 18, 2024
2d9a804
fix: add no-trigger scenario AB#26938
arsforza Mar 18, 2024
8b7481a
Merge branch 'feat.floods-leadtime-event' of https://github.com/rodek…
jannisvisser Mar 18, 2024
3032eb8
Merge pull request #1486 from rodekruis/feat.drop-old-event
jannisvisser Mar 18, 2024
480694b
fix: no-trigger flash-floods/epidemics AB#26938
jannisvisser Mar 18, 2024
e452254
fix: disable breadcrumb for epidemics + month in header AB#26933
jannisvisser Mar 20, 2024
6883bf0
fix: disable national view if just 1 event AB#27047
jannisvisser Mar 20, 2024
71464ad
feat: mock data SSD AB#26938
jannisvisser Mar 20, 2024
13922e3
fix: test ssd whatsapp AB#27085
jannisvisser Mar 20, 2024
c5170e0
fix: own leadTime per station AB#27137
jannisvisser Mar 20, 2024
89d2bcf
fix: fill epidemics eventName in API instead of pipeline temporarily …
jannisvisser Mar 22, 2024
f61b10d
fix: hide first warning dates AB#26926
arsforza Mar 22, 2024
0354295
fix: add check for floods AB#26926
arsforza Mar 22, 2024
ccb971a
fix: mock changes glofas + raster + no-trigger AB#26938
jannisvisser Mar 22, 2024
2f024af
Merge branch 'feat.floods-leadtime-event' of https://github.com/rodek…
jannisvisser Mar 22, 2024
db8affb
feat: set up mock data ZMB AB#27175
jannisvisser Mar 25, 2024
3de961d
feat: improve geoserver setup based on ZMB AB#27175
jannisvisser Mar 25, 2024
b06ef69
fix: show eventName in chat header AB#27166
jannisvisser Mar 25, 2024
884538c
feat: geoserver SSD AB#27175
jannisvisser Mar 25, 2024
7304251
lint
jannisvisser Mar 25, 2024
2b20d03
lint
jannisvisser Mar 25, 2024
dc3fd01
feat: mock floods MWI AB#27175
jannisvisser Mar 25, 2024
fdfb44c
feat: mock floods KEN AB#27175
jannisvisser Mar 25, 2024
f4de6ca
fix: KEN mock AB#27175
jannisvisser Mar 25, 2024
e10d1e8
feat: mock floods ETH AB#27175
jannisvisser Mar 25, 2024
8c3be9c
feat: PHL floods mock AB#27175
jannisvisser Mar 25, 2024
3ca9b47
fix: mock all AB#27175
jannisvisser Mar 25, 2024
1c17e02
lint
jannisvisser Mar 25, 2024
ce8a24a
lint
jannisvisser Mar 25, 2024
29bd22c
fix: allow stationName also as eventName AB#27166
jannisvisser Mar 25, 2024
350fc3b
chore: clean up AB#26922
jannisvisser Mar 25, 2024
edcc903
fix: update event actionsValue with null AB#26922
jannisvisser Mar 26, 2024
41d8c6f
fix: close events once per pipeline run instead of per event AB#27228
jannisvisser Mar 27, 2024
1a49fe9
fix: add close-events stop in mock endpoints AB#27228
jannisvisser Mar 27, 2024
c2b8927
feat: use N/A in middle column AB#27254
arsforza Mar 28, 2024
76c52c3
refactor: move event eapAlertClass to be AB#27284
arsforza Apr 5, 2024
a3a624a
Merge pull request #1490 from rodekruis/refactor.move-event-alertclas…
arsforza Apr 8, 2024
81eff91
refactor: update fiveten-colors AB#27277
arsforza Apr 8, 2024
d146b64
style: update chat header colors AB#27277
arsforza Apr 8, 2024
f50f682
style: make bubbles grey AB#27278
arsforza Apr 8, 2024
d104a20
fix: prettier
arsforza Apr 8, 2024
1893f6e
fix: rm actor AB#27277
arsforza Apr 8, 2024
f4cdda0
style: add class color on hover+select AB#27277
arsforza Apr 8, 2024
1040a67
fix: prettier
arsforza Apr 8, 2024
d887a01
style: update event switcher color AB#27277
arsforza Apr 9, 2024
6792f1a
style: show border on hover AB#27277
arsforza Apr 9, 2024
c317077
feat: add tooltip to bubble AB#27279
arsforza Apr 9, 2024
3fbae7f
style: update colors in chat 27277
arsforza Apr 15, 2024
a364092
feat: add aggregate population AB#27281
arsforza Apr 15, 2024
3b53664
fix: duplicate events AB#27464
arsforza Apr 15, 2024
f2005d0
feat: update copy AB#27280
arsforza Apr 15, 2024
ba758f0
fix: prettier
arsforza Apr 15, 2024
bf52e2f
feat: use N/A in middle column AB#27254
arsforza Mar 28, 2024
a7b945e
fix: handle null correctly AB#27254
arsforza Apr 16, 2024
d0a4d98
Merge branch 'feat.improve-no-data' of https://github.com/rodekruis/I…
arsforza Apr 16, 2024
6611318
style: align glofas popup colors AB#27487
arsforza Apr 18, 2024
3c6dd7e
fix: show pointer in list: AB#27463
arsforza Apr 18, 2024
0f30175
fix: make hovered area bold again AB#27463
arsforza Apr 19, 2024
cb708ea
refactor: use camelCase instead of lowercase
gulfaraz Apr 29, 2024
d3f43a6
refactor: use ngOnInit instead of ngAfterViewInit
gulfaraz Apr 29, 2024
10dec03
Revert "refactor: move event eapAlertClass to be AB#27284"
gulfaraz Apr 29, 2024
b9bb8ec
Merge pull request #1489 from rodekruis/feat.improve-no-data
gulfaraz Apr 29, 2024
7932426
Merge branch 'feat.floods-leadtime-event' into feat.improve-chat-floods
gulfaraz Apr 29, 2024
623a7f3
refactor: move event eapAlertClass to be AB#27284
arsforza Apr 5, 2024
b58b613
refactor: typo
gulfaraz Apr 29, 2024
01e3ab0
fix: use better filter for double events AB#27464
arsforza May 2, 2024
525fddf
fix: align status to design AB#27280
arsforza May 6, 2024
88ee3ac
feat: add exposed population AB#27281
arsforza May 6, 2024
b9ec795
fix: prettier
arsforza May 6, 2024
e19c44e
fix: rm duplicate no-data when selected AB#27281
arsforza May 6, 2024
8b892c2
fix: show exposed pop only for trigger AB#27281
arsforza May 13, 2024
68e6cd9
fix: format dates AB#27280
arsforza May 13, 2024
e7ef0e9
fix: prettier
arsforza May 13, 2024
594087f
Revert "fix: format dates AB#27280"
arsforza May 16, 2024
ac61d02
style: rm padding bottom from chat cards AB#28151
arsforza May 17, 2024
761b7da
Merge pull request #1491 from rodekruis/feat.improve-chat-floods
RubenGeo May 21, 2024
8d03823
Merge branch 'master' into feat.floods-leadtime-event
RubenGeo May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
environment:
- NODE_ENV=development
- LOCAL_PORT_IBF_SERVICE=${LOCAL_PORT_IBF_SERVICE}
- GEOSERVER_ADMIN_PASSWORD=${GEOSERVER_ADMIN_PASSWORD}
ports:
- ${LOCAL_PORT_IBF_SERVICE}:3000
depends_on:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
restart: unless-stopped

ibf-api-service:
container_name: ibf-api-service
build:
context: ./services/API-service
args:
Expand Down Expand Up @@ -88,6 +89,7 @@ services:
web-server-network:

ibf-geoserver:
container_name: ibf-geoserver
image: kartoza/geoserver:2.24.2
environment:
- GEOSERVER_ADMIN_PASSWORD=${GEOSERVER_ADMIN_PASSWORD}
Expand Down
127 changes: 56 additions & 71 deletions features/API-admin-user/Upload_mock_data.feature
Original file line number Diff line number Diff line change
@@ -1,82 +1,67 @@
@api-admin-user
Feature: Upload mock data

Background:
Given a logged-in user on the Swagger UI page
Background:
Given a logged-in user on the Swagger UI page

Scenario: Upload mock data for all countries & disaster-types at once
Given the user is using the `/api/scripts/mock-all` endpoint
Given the user has filled in the right `secret` (depends on server/environment)
Given the user has filled in 'true' or 'false' for 'triggered'
When the user clicks 'Execute'
Then mock data is uploaded for all countries and all disaster-types
And all are triggered if 'triggered=true' is chosen
And all are non-triggered if 'triggered=false' is chosen
And it includes data for all dynamic admin-area layers defined for that country & disaster-type
And it includes data for dynamic point layers ('Glofas stations' / 'Typhoon track')
And it includes dynamic raster data ('flood extent' / 'rainfall extent')
And only 1 event is uploaded per country and disaster-type (relevant for `typhoon` only)
And the dashboard should be opened/refreshed to check all of this
Scenario: Upload mock data for all countries & disaster-types at once
Given the user is using the `/api/scripts/mock-all` endpoint
Given the user has filled in the right `secret` (depends on server/environment)
Given the user has filled in 'true' or 'false' for 'triggered'
When the user clicks 'Execute'
Then mock data is uploaded for all countries and all disaster-types
And all are triggered if 'triggered=true' is chosen
And all are non-triggered if 'triggered=false' is chosen
And it includes data for all dynamic admin-area layers defined for that country & disaster-type
And it includes data for dynamic point layers ('Glofas stations' / 'Typhoon track')
And it includes dynamic raster data ('flood extent' / 'rainfall extent')
And only 1 event is uploaded per country and disaster-type (relevant for `typhoon` only)
And the dashboard should be opened/refreshed to check all of this

Scenario: Upload mock data for TRIGGERED state (active event) for specific country & disaster-types
Given the user is using the `/api/scripts/mock-dynamic-data` endpoint
Given the user has filled in the right `secret` (depends on server/environment)
Given the user has filled in 'triggered = true'
Given the user has filled in 'removeEvents = true'
Given the user has filled in 'country' and 'disaster-type' (exact right formats)
When the user clicks 'Execute'
Then mock data is uploaded for the chosen 'country' and 'disaster-type'
And it is in triggered state
And all the data as described in previous scenario is uploaded
And the dashboard should be opened/refreshed to check all of this
Scenario: Upload mock data for TRIGGERED state (active event) for specific country & disaster-types
Given the user is using the `/api/scripts/mock-dynamic-data` endpoint
Given the user has filled in the right `secret` (depends on server/environment)
Given the user has filled in 'triggered = true'
Given the user has filled in 'removeEvents = true'
Given the user has filled in 'country' and 'disaster-type' (exact right formats)
When the user clicks 'Execute'
Then mock data is uploaded for the chosen 'country' and 'disaster-type'
And it is in triggered state
And all the data as described in previous scenario is uploaded
And the dashboard should be opened/refreshed to check all of this

Scenario: Upload mock data for NON-TRIGGERED state (no event) for specific country & disaster-types
Given everything the same as previous scenario
Given the user has filled in 'triggered = false'
When the user clicks 'Execute'
Then mock data is uploaded for the chosen 'country' and 'disaster-type'
And it is in non-triggered state
And all the data as described in previous scenario is uploaded
And the dashboard should be opened/refreshed to check all of this
Scenario: Upload mock data for NON-TRIGGERED state (no event) for specific country & disaster-types
Given everything the same as previous scenario
Given the user has filled in 'triggered = false'
When the user clicks 'Execute'
Then mock data is uploaded for the chosen 'country' and 'disaster-type'
And it is in non-triggered state
And all the data as described in previous scenario is uploaded
And the dashboard should be opened/refreshed to check all of this

Scenario: Upload mock data for OLD-EVENT state for specific country & disaster-types
Given user has first created an active event (see scenario TRIGGERE state)
Given the user is subsquently using the `/api/scripts/mock-dynamic-data` endpoint a 2nd time
Given the user changes 'triggered' to 'false'
Given the user changes 'removeEvents' to 'false'
Given the user leaves all other input the same
When the user clicks 'Execute'
Then mock data is uploaded for the chosen 'country' and 'disaster-type'
And it is updating the existing event to become inactive, and thus an 'old event'
And the dashboard should be opened/refreshed to check all of this
And the dashboard is in NON-TRIGGERED state
And the map is showing no triggered areas
And the chat section is showing EAP-actions for all old triggered areas
And see other feature files to look for correct behaviour of old event, by Ctrl+F on 'OLD-EVENT'
Scenario: Upload Typhoon-specific events
Given the disaster-type is 'Typhoon'
Given the user uses the '/api/scripts/mock-typhoon-scenario' endpoint
Given the user fills in one of the available 'scenario' options
Given the user fills in 'eventNr = 1'
When the user clicks 'Execute'
Then the mock data is uploaded for the given 'scenario'
- eventTrigger: exact same result as using '/api/scripts/mock-dynamic-data' endpoint with 'triggered = true'
- noEvent: exact same result as using '/api/scripts/mock-dynamic-data' endpoint with 'triggered = false'
- eventNoTrigger: produces event that does not reach trigger threshold
- eventAfterLandfall: produces (triggered) event that has already made landfall (i.e. leadTime = '0-hour')
- eventNoLandafall: produces (triggered) event with a track that does not make landfall

Scenario: Upload Typhoon-specific events
Given the disaster-type is 'Typhoon'
Given the user uses the '/api/scripts/mock-typhoon-scenario' endpoint
Given the user fills in one of the available 'scenario' options
Given the user fills in 'eventNr = 1'
When the user clicks 'Execute'
Then the mock data is uploaded for the given 'scenario'
- eventTrigger: exact same result as using '/api/scripts/mock-dynamic-data' endpoint with 'triggered = true'
- noEvent: exact same result as using '/api/scripts/mock-dynamic-data' endpoint with 'triggered = false'
- eventNoTrigger: produces event that does not reach trigger threshold
- eventAfterLandfall: produces (triggered) event that has already made landfall (i.e. leadTime = '0-hour')
- eventNoLandafall: produces (triggered) event with a track that does not make landfall

Scenario: Upload 2nd/3rd/etc. Typhoon event
Given the disaster-type is 'Typhoon'
Given user has already created an event (see above)
Given the user is subsquently using the `/api/scripts/mock-typhoon-scenario`
Given the user fills in 'eventNr' as 2/3/etc
When the user clicks 'Execute'
Then mock data is uploaded for a 2nd/3rd/etc event
And the dashboard should be opened/refreshed to check all of this
And the chat-section should show 2/3/etc event buttons in the 2nd speech-bubble
And the timeline-section should show 2/3/etc active lead-time buttons
Scenario: Upload 2nd/3rd/etc. Typhoon event
Given the disaster-type is 'Typhoon'
Given user has already created an event (see above)
Given the user is subsquently using the `/api/scripts/mock-typhoon-scenario`
Given the user fills in 'eventNr' as 2/3/etc
When the user clicks 'Execute'
Then mock data is uploaded for a 2nd/3rd/etc event
And the dashboard should be opened/refreshed to check all of this
And the chat-section should show 2/3/etc event buttons in the 2nd speech-bubble
And the timeline-section should show 2/3/etc active lead-time buttons



Expand Down
72 changes: 36 additions & 36 deletions features/IBF-portal-admin-user/Use_dev_menu.feature
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
@ibf-portal-admin-user
Feature: Use dev menu section

Background:
Given a logged-in "admin" user on the dashboard page
Background:
Given a logged-in "admin" user on the dashboard page

Scenario: Open and view Dev Menu
When the user clicks on menu-icon in the top left of Dashboard page
Then the menu section open up
And it contains a menu list
And the menu list contains 'Version', 'Country', 'Load Mock Scenario', 'Activation Report'
Scenario: Open and view Dev Menu
When the user clicks on menu-icon in the top left of Dashboard page
Then the menu section open up
And it contains a menu list
And the menu list contains 'Version', 'Country', 'Load Mock Scenario', 'Activation Report'

Scenario: Click on Version
When the user clicks "Version"
Then a new tab opens on the IBF Github repository, specifically to the version tag
Scenario: Click on Version
When the user clicks "Version"
Then a new tab opens on the IBF Github repository, specifically to the version tag

Scenario: Switch Country
When the user clicks "country" dropdown of menu section
Then the Country's dropdown section open up
And it contains list of different countries with radio button
And the user select any of the country from the list
When the user selects a country
Then the Dashboard page switches to that country
Scenario: Switch Country
When the user clicks "country" dropdown of menu section
Then the Country's dropdown section open up
And it contains list of different countries with radio button
And the user select any of the country from the list
When the user selects a country
Then the Dashboard page switches to that country

Scenario: View Load Mock Data popup
When the user clicks on "Load Mock Scenario" from menu
Then the 'Load Mock Scenario' popup open up
And it generates a question whether the user wants to mock the situation for selected country
And it contains 3 buttons "cancel", "Old event", "No Trigger", "Trigger" buttons
And it ask user to 'enter the secret' to switch to mock mode
Scenario: View Load Mock Data popup
When the user clicks on "Load Mock Scenario" from menu
Then the 'Load Mock Scenario' popup open up
And it generates a question whether the user wants to mock the situation for selected country
And it contains 3 buttons "cancel", "No Trigger", "Trigger" buttons
And it ask user to 'enter the secret' to switch to mock mode

Scenario: Load mock data successfully
Given the user has opened the mock data popup
And the user has filled in the correct secret
And clicks "Old event" or "No Trigger" or "Trigger"
Then the mock data is loaded in the back-end
And it appears also in the dashboard
And the mock data popup closes
Scenario: Load mock data unsuccessfully
Given the user has opened the mock data popup
And the user has filled in an incorrect secret
And clicks "Old event" or "No Trigger" or "Trigger"
Then a message appears that says 'Failed to set mock scenario'
Scenario: Load mock data successfully
Given the user has opened the mock data popup
And the user has filled in the correct secret
And clicks "No Trigger" or "Trigger"
Then the mock data is loaded in the back-end
And it appears also in the dashboard
And the mock data popup closes

Scenario: Load mock data unsuccessfully
Given the user has opened the mock data popup
And the user has filled in an incorrect secret
And clicks "No Trigger" or "Trigger"
Then a message appears that says 'Failed to set mock scenario'
Loading
Loading