-
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 add-sequence route * feat: add schedule field * feat: add sequence order form field * feat: use queueable as options for sequence order field * feat: handle order field selections * feat: handle error and loading state * feat: add filter placeholder * feat: show validation errors * chore: add missing translations * feat: add submit job queue hook * test(e2e): add tests for add-sequence route * test(submit-job-queue): add tests * test(use-queueables): add test * refactor(name-field): use same name field for both jobs and sequences * test(sequence-add-form): add tests * test(sequence-add-form-container): add tests * test(sequence-order-field): add tests * feat: add explanation to form * feat: add custom transfer option for sequences * feat: align transfer headers with design * chore: add missing translations * feat: add double click handler for transfer custom option * refactor(sequence-transfer-title): use css module instead of inline styles * fix(format-error): update to handle all error types * fix(job-queues): update job queues hook to format all errors * fix(job-queues): update remaining hooks to format all errors * refactor(format-error): simplify syntax * refactor(submit-hooks): accept onSuccess callback for submission hooks
- Loading branch information
Showing
58 changed files
with
1,415 additions
and
369 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[ | ||
{ | ||
"name": "1", | ||
"type": "PROGRAM_NOTIFICATIONS", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-06-26T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "TMddx5FxNgF", | ||
"name": "1", | ||
"type": "PROGRAM_NOTIFICATIONS", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-06-26T03:00:00.000", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "2", | ||
"type": "RESOURCE_TABLE", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-06-26T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "vFpCA8dV8cT", | ||
"name": "2", | ||
"type": "RESOURCE_TABLE", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-06-26T03: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
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
67 changes: 67 additions & 0 deletions
67
cypress/fixtures/network/41/users_should_be_able_to_create_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,67 @@ | ||
[ | ||
{ | ||
"path": "/api/41/systemSettings/helpPageLink", | ||
"featureName": "Users should be able to create 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" | ||
} | ||
}, | ||
{ | ||
"path": "/api/41/scheduler", | ||
"featureName": "Users should be able to create 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": "[{\"name\":\"User account expiry alert\",\"type\":\"ACCOUNT_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"fUWM1At1TUx\",\"name\":\"User account expiry alert\",\"type\":\"ACCOUNT_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"File resource clean up\",\"type\":\"FILE_RESOURCE_CLEANUP\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"pd6O228pqr0\",\"name\":\"File resource clean up\",\"type\":\"FILE_RESOURCE_CLEANUP\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Data statistics\",\"type\":\"DATA_STATISTICS\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"BFa3jDsbtdO\",\"name\":\"Data statistics\",\"type\":\"DATA_STATISTICS\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Remove expired or used reserved values\",\"type\":\"REMOVE_USED_OR_EXPIRED_RESERVED_VALUES\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"uwWCT2BMmlq\",\"name\":\"Remove expired or used reserved values\",\"type\":\"REMOVE_USED_OR_EXPIRED_RESERVED_VALUES\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Dataset notification\",\"type\":\"DATA_SET_NOTIFICATION\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"YvAwAmrqAtN\",\"name\":\"Dataset notification\",\"type\":\"DATA_SET_NOTIFICATION\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Remove lock exceptions older than 6 months\",\"type\":\"LOCK_EXCEPTION_CLEANUP\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":true,\"sequence\":[{\"id\":\"OQ9KeLgqy20\",\"name\":\"Remove lock exceptions older than 6 months\",\"type\":\"LOCK_EXCEPTION_CLEANUP\",\"cronExpression\":\"0 0 2 ? * *\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Credentials expiry alert\",\"type\":\"CREDENTIALS_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"sHMedQF7VYa\",\"name\":\"Credentials expiry alert\",\"type\":\"CREDENTIALS_EXPIRY_ALERT\",\"cronExpression\":\"0 0 2 * * ?\",\"nextExecutionTime\":\"2023-06-20T02:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"System version update check notification\",\"type\":\"SYSTEM_VERSION_UPDATE_CHECK\",\"cronExpression\":\"44 8 3 ? * *\",\"nextExecutionTime\":\"2023-06-20T03:08:44.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"vt21671bgno\",\"name\":\"System version update check notification\",\"type\":\"SYSTEM_VERSION_UPDATE_CHECK\",\"cronExpression\":\"44 8 3 ? * *\",\"nextExecutionTime\":\"2023-06-20T03:08:44.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Validation result notification\",\"type\":\"VALIDATION_RESULTS_NOTIFICATION\",\"cronExpression\":\"0 0 7 * * ?\",\"nextExecutionTime\":\"2023-06-20T07:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":false,\"sequence\":[{\"id\":\"Js3vHn2AVuG\",\"name\":\"Validation result notification\",\"type\":\"VALIDATION_RESULTS_NOTIFICATION\",\"cronExpression\":\"0 0 7 * * ?\",\"nextExecutionTime\":\"2023-06-20T07:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"2\",\"type\":\"RESOURCE_TABLE\",\"cronExpression\":\"0 0 3 ? * MON\",\"nextExecutionTime\":\"2023-06-26T03:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":true,\"sequence\":[{\"id\":\"vFpCA8dV8cT\",\"name\":\"2\",\"type\":\"RESOURCE_TABLE\",\"cronExpression\":\"0 0 3 ? * MON\",\"nextExecutionTime\":\"2023-06-26T03:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"1\",\"type\":\"PROGRAM_NOTIFICATIONS\",\"cronExpression\":\"0 0 3 ? * MON\",\"nextExecutionTime\":\"2023-06-26T03:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":true,\"sequence\":[{\"id\":\"TMddx5FxNgF\",\"name\":\"1\",\"type\":\"PROGRAM_NOTIFICATIONS\",\"cronExpression\":\"0 0 3 ? * MON\",\"nextExecutionTime\":\"2023-06-26T03:00:00.000\",\"status\":\"SCHEDULED\"}]},{\"name\":\"Queue\",\"type\":\"Sequence\",\"cronExpression\":\"0 0 3 ? * MON\",\"nextExecutionTime\":\"2023-06-26T03:00:00.000\",\"status\":\"SCHEDULED\",\"enabled\":true,\"configurable\":true,\"sequence\":[{\"id\":\"baeT2xCyDlW\",\"name\":\"123\",\"type\":\"LOCK_EXCEPTION_CLEANUP\",\"cronExpression\":\"0 0 3 ? * MON\",\"nextExecutionTime\":\"2023-06-26T03:00:00.000\",\"status\":\"SCHEDULED\"},{\"id\":\"Nx6d0HgSi5l\",\"name\":\"asdf\",\"type\":\"EVENT_PROGRAMS_DATA_SYNC\",\"status\":\"SCHEDULED\"}]}]", | ||
"responseSize": 4859, | ||
"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", | ||
"x-content-type-options": "nosniff", | ||
"x-xss-protection": "1; mode=block" | ||
} | ||
} | ||
] |
Oops, something went wrong.
bf1380a
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://64a6a097744e2616d049395c--dhis2-scheduler.netlify.app