-
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: incorporate job queue in job list (#571)
* feat: add queue actions * chore: update translations * feat: add new queue button * refactor: update table headers to match design * chore: update translations * fix: ignore invalid jobs * refactor: separate table rows by job type * refactor: hardcode queue type for queues * feat: add toggleable row for queued jobs * fix: update job toggle to json patch * refactor: finish naming updates * test: add tests for queue components * style: add slight inset to distinguish expanded rows * style: refine expandable styles * refactor: adjust expandable row styles * refactor: use css module instead of inline styles * fix: use new endpoint to toggle tasks * chore: update caniuse db * test: add new queue test * refactor: update e2e test naming * test: add queue list test * test: add queue row expansion test * refactor: rename switch * test: add queue to filter test * test: add test for queue toggling * test: add test for queue actions * chore: simplify fixture naming * refactor: consolidate to single info link * chore: update translations * refactor: rely on cypress for jobswitch test * refactor: rename to namefilter * refactor: ensure all queries are static * refactor: align terms * chore: update fixtures * refactor: unify naming used in e2e tests * chore: update fixtures * chore: update modal confirmation text
- Loading branch information
ismay
authored
Jan 3, 2024
1 parent
c952231
commit 204173e
Showing
173 changed files
with
2,267 additions
and
1,373 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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": "Queue 1", | ||
"type": "Sequence", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-11-20T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": false, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "uvUPBToQHD9", | ||
"name": "Job 1", | ||
"type": "DATA_INTEGRITY", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-11-20T03:00:00.000", | ||
"status": "SCHEDULED" | ||
}, | ||
{ | ||
"id": "PPgVeqiSXpz", | ||
"name": "Job 2", | ||
"type": "DISABLE_INACTIVE_USERS", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
} | ||
] |
File renamed without changes.
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": "Queue 1", | ||
"type": "Sequence", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-11-20T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "uvUPBToQHD9", | ||
"name": "Job 1", | ||
"type": "DATA_INTEGRITY", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-11-20T03:00:00.000", | ||
"status": "SCHEDULED" | ||
}, | ||
{ | ||
"id": "PPgVeqiSXpz", | ||
"name": "Job 2", | ||
"type": "DISABLE_INACTIVE_USERS", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
} | ||
] |
File renamed without changes.
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": "Queue", | ||
"type": "Sequence", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-11-20T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "uvUPBToQHD9", | ||
"name": "Job 1", | ||
"type": "DATA_INTEGRITY", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-11-20T03:00:00.000", | ||
"status": "SCHEDULED" | ||
}, | ||
{ | ||
"id": "PPgVeqiSXpz", | ||
"name": "Job 2", | ||
"type": "DISABLE_INACTIVE_USERS", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
} | ||
] |
File renamed without changes.
34 changes: 34 additions & 0 deletions
34
cypress/fixtures/list/single-queue-job-configurations.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,34 @@ | ||
{ | ||
"pager": { | ||
"page": 1, | ||
"total": 11, | ||
"pageSize": 50, | ||
"pageCount": 1 | ||
}, | ||
"jobConfigurations": [ | ||
{ | ||
"name": "Job 1", | ||
"created": "2023-11-16T13:20:38.208", | ||
"jobType": "DATA_INTEGRITY", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"jobParameters": { | ||
"type": "REPORT" | ||
}, | ||
"lastExecutedStatus": "NOT_STARTED", | ||
"configurable": true, | ||
"id": "uvUPBToQHD9" | ||
}, | ||
{ | ||
"name": "Job 2", | ||
"created": "2023-11-16T13:20:48.433", | ||
"jobType": "DISABLE_INACTIVE_USERS", | ||
"jobParameters": { | ||
"inactiveMonths": 1, | ||
"reminderDaysBefore": 2 | ||
}, | ||
"lastExecutedStatus": "NOT_STARTED", | ||
"configurable": true, | ||
"id": "PPgVeqiSXpz" | ||
} | ||
] | ||
} |
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,5 @@ | ||
{ | ||
"name": "Queue", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"sequence": ["uvUPBToQHD9", "PPgVeqiSXpz"] | ||
} |
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": "Queue", | ||
"type": "Sequence", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-11-20T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "uvUPBToQHD9", | ||
"name": "Job 1", | ||
"type": "DATA_INTEGRITY", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-11-20T03:00:00.000", | ||
"status": "SCHEDULED" | ||
}, | ||
{ | ||
"id": "PPgVeqiSXpz", | ||
"name": "Job 2", | ||
"type": "DISABLE_INACTIVE_USERS", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
} | ||
] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
84 changes: 84 additions & 0 deletions
84
cypress/fixtures/list/some-user-jobs-and-queues-scheduler.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,84 @@ | ||
[ | ||
{ | ||
"name": "Job 1", | ||
"type": "DATA_INTEGRITY", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2021-03-01T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "lnWRZN67iDU", | ||
"name": "Job 1", | ||
"type": "DATA_INTEGRITY", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2021-03-01T03:00:00.000", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Job 2", | ||
"type": "MONITORING", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2021-03-01T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "HEUQRVwkSaB", | ||
"name": "Job 2", | ||
"type": "MONITORING", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2021-03-01T03:00:00.000", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Job 3", | ||
"type": "DISABLE_INACTIVE_USERS", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2021-03-01T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "thARpL8RTbe", | ||
"name": "Job 3", | ||
"type": "DISABLE_INACTIVE_USERS", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2021-03-01T03:00:00.000", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Queue 1", | ||
"type": "Sequence", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-11-20T03:00:00.000", | ||
"status": "SCHEDULED", | ||
"enabled": true, | ||
"configurable": true, | ||
"sequence": [ | ||
{ | ||
"id": "uvUPBToQHD9", | ||
"name": "Job 1", | ||
"type": "DATA_INTEGRITY", | ||
"cronExpression": "0 0 3 ? * MON", | ||
"nextExecutionTime": "2023-11-20T03:00:00.000", | ||
"status": "SCHEDULED" | ||
}, | ||
{ | ||
"id": "PPgVeqiSXpz", | ||
"name": "Job 2", | ||
"type": "DISABLE_INACTIVE_USERS", | ||
"status": "SCHEDULED" | ||
} | ||
] | ||
} | ||
] |
File renamed without changes.
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": "Queue actions", | ||
"static": false, | ||
"count": 3, | ||
"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/queueable", | ||
"featureName": "Queue actions", | ||
"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\":\"1\",\"type\":\"DATA_INTEGRITY\",\"status\":\"DISABLED\",\"enabled\":false,\"configurable\":true,\"sequence\":[{\"id\":\"sHmTcgoa5vB\",\"name\":\"1\",\"type\":\"DATA_INTEGRITY\",\"status\":\"DISABLED\"}]}]", | ||
"responseSize": 183, | ||
"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" | ||
} | ||
} | ||
] |
35 changes: 35 additions & 0 deletions
35
cypress/fixtures/network/41/queues_can_be_enabled_and_disabled.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": "Queues can be enabled and disabled", | ||
"static": false, | ||
"count": 2, | ||
"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" | ||
} | ||
} | ||
] |
2 changes: 1 addition & 1 deletion
2
...rs_should_be_able_to_edit_a_sequence.json → ...s/network/41/queues_should_be_listed.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
Oops, something went wrong.
204173e
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://659536076a766b89d75701c0--dhis2-scheduler.netlify.app