-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add edit sequence route (#550)
* feat: add use sequence by id hook * chore: add edit sequence page base * chore: add sequence edit form base * chore: add sequence edit route * chore: add sequence edit form container export * chore: update edit sequence form container * chore(translations): update translations * chore: add selected values to existing queueables * chore: collapse sequence order field to single component * style: fix formatting * chore: fix linting errors * chore: rename selectedValues * chore: remove placeholder tests * chore: simplify construction of options * fix: remove lifting of pristine state * chore: add update queue hook * fix: remove unnecessary test * chore: remove top back to overview button * test: add sequence edit test * test: add update queue test * test: add integration tests for edit route * chore: align sequence edit title with job edit title * chore: add delete sequence button * test: add delete sequence modal test * test: add delete sequence button test * test: add sequence edit form container test * chore: add translations * fix: add missing history import * fix: use correct endpoint for delete * refactor: simplify creation of initialValues * fix: use correct endpoint for update
- Loading branch information
Showing
73 changed files
with
1,456 additions
and
564 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
cypress/fixtures/edit-sequence/a-sequence-with-two-unqueued-jobs.json
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,65 @@ | ||
[ | ||
{ | ||
"name": "one", | ||
"type": "Sequence", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "RWcaltWoKuN", | ||
"name": "1", | ||
"type": "DATA_INTEGRITY", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED" | ||
}, | ||
{ | ||
"id": "p2HCjnAmSNE", | ||
"name": "2", | ||
"type": "MONITORING", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "3", | ||
"type": "DISABLE_INACTIVE_USERS", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "xkxSSOLKc7X", | ||
"name": "3", | ||
"type": "DISABLE_INACTIVE_USERS", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "4", | ||
"type": "MATERIALIZED_SQL_VIEW_UPDATE", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "RRKO5XbxBz4", | ||
"name": "4", | ||
"type": "MATERIALIZED_SQL_VIEW_UPDATE", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
} | ||
] |
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,27 @@ | ||
[ | ||
{ | ||
"name": "one", | ||
"type": "Sequence", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "RWcaltWoKuN", | ||
"name": "1", | ||
"type": "DATA_INTEGRITY", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED" | ||
}, | ||
{ | ||
"id": "p2HCjnAmSNE", | ||
"name": "2", | ||
"type": "MONITORING", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
} | ||
] |
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,40 @@ | ||
[ | ||
{ | ||
"name": "3", | ||
"type": "DISABLE_INACTIVE_USERS", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "xkxSSOLKc7X", | ||
"name": "3", | ||
"type": "DISABLE_INACTIVE_USERS", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "4", | ||
"type": "MATERIALIZED_SQL_VIEW_UPDATE", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "RRKO5XbxBz4", | ||
"name": "4", | ||
"type": "MATERIALIZED_SQL_VIEW_UPDATE", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-08-07T03:00:00.000", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
} | ||
] |
Large diffs are not rendered by default.
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
Large diffs are not rendered by default.
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
20 changes: 10 additions & 10 deletions
20
cypress/fixtures/network/41/users_should_be_able_to_create_jobs_that_take_parameters.json
Large diffs are not rendered by default.
Oops, something went wrong.
20 changes: 10 additions & 10 deletions
20
cypress/fixtures/network/41/users_should_be_able_to_create_jobs_without_parameters.json
Large diffs are not rendered by default.
Oops, something went wrong.
16 changes: 8 additions & 8 deletions
16
cypress/fixtures/network/41/users_should_be_able_to_delete_a_job.json
Large diffs are not rendered by default.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
cypress/fixtures/network/41/users_should_be_able_to_edit_a_sequence.json
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,35 @@ | ||
[ | ||
{ | ||
"path": "/api/41/systemSettings/helpPageLink", | ||
"featureName": "Users should be able to edit a sequence", | ||
"static": false, | ||
"count": 1, | ||
"nonDeterministic": false, | ||
"method": "GET", | ||
"requestBody": "", | ||
"requestHeaders": { | ||
"host": "debug.dhis2.org", | ||
"connection": "keep-alive", | ||
"accept": "application/json", | ||
"origin": "http://localhost:3000", | ||
"sec-fetch-site": "cross-site", | ||
"sec-fetch-mode": "cors" | ||
}, | ||
"statusCode": 200, | ||
"responseBody": "{\"helpPageLink\":\"https://dhis2.github.io/dhis2-docs/master/en/user/html/dhis2_user_manual_en.html\"}", | ||
"responseSize": 99, | ||
"responseHeaders": { | ||
"server": "nginx/1.23.0", | ||
"content-type": "application/json;charset=UTF-8", | ||
"transfer-encoding": "chunked", | ||
"connection": "keep-alive", | ||
"access-control-allow-credentials": "true", | ||
"access-control-allow-origin": "http://localhost:3000", | ||
"vary": "Origin", | ||
"access-control-expose-headers": "ETag, Location", | ||
"cache-control": "no-cache, private", | ||
"x-content-type-options": "nosniff", | ||
"x-xss-protection": "1; mode=block" | ||
} | ||
} | ||
] |
Oops, something went wrong.
d5fa50c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://dhis2-scheduler.netlify.app as production
🚀 Deployed on https://64d3ae26debf9d799fab5d01--dhis2-scheduler.netlify.app