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

feat: incorporate job queue in job list #571

Merged
37 commits merged into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
caae917
feat: add queue actions
Oct 17, 2023
7c37050
chore: update translations
Oct 19, 2023
8ead6f6
feat: add new queue button
Oct 19, 2023
f0f3e08
refactor: update table headers to match design
Oct 19, 2023
09e679b
chore: update translations
Oct 19, 2023
da9d733
fix: ignore invalid jobs
Oct 19, 2023
438afa7
refactor: separate table rows by job type
Oct 24, 2023
1183316
refactor: hardcode queue type for queues
Oct 24, 2023
11898af
feat: add toggleable row for queued jobs
Oct 25, 2023
f0fb7fa
fix: update job toggle to json patch
Oct 26, 2023
5a90d5e
refactor: finish naming updates
Nov 2, 2023
4f8df2a
test: add tests for queue components
Nov 2, 2023
ef6baf0
style: add slight inset to distinguish expanded rows
Nov 8, 2023
16fab4d
style: refine expandable styles
Nov 8, 2023
9088945
refactor: adjust expandable row styles
Nov 14, 2023
2aabeb1
refactor: use css module instead of inline styles
Nov 14, 2023
218e5d1
fix: use new endpoint to toggle tasks
Nov 15, 2023
b05cf24
chore: update caniuse db
Nov 16, 2023
a77186d
test: add new queue test
Nov 16, 2023
fd8159f
refactor: update e2e test naming
Nov 16, 2023
6f3a899
test: add queue list test
Nov 16, 2023
26ef068
test: add queue row expansion test
Nov 16, 2023
69dcc12
refactor: rename switch
Nov 16, 2023
ea4d8ee
test: add queue to filter test
Nov 21, 2023
4310a21
test: add test for queue toggling
Nov 22, 2023
a9dd7c9
test: add test for queue actions
Nov 22, 2023
59869ae
chore: simplify fixture naming
Nov 23, 2023
ef681db
refactor: consolidate to single info link
Nov 29, 2023
9f5fe2a
chore: update translations
Nov 29, 2023
0796094
refactor: rely on cypress for jobswitch test
Nov 29, 2023
011ac56
refactor: rename to namefilter
Nov 29, 2023
f7acc29
refactor: ensure all queries are static
Nov 29, 2023
7940f0f
refactor: align terms
Nov 30, 2023
e88a0d0
chore: update fixtures
Dec 6, 2023
c76e763
refactor: unify naming used in e2e tests
Dec 6, 2023
049cbdd
chore: update fixtures
Dec 6, 2023
35b74ac
chore: update modal confirmation text
Jan 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions cypress/fixtures/list/disabled-queue-scheduler.json
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"
}
]
}
]
27 changes: 27 additions & 0 deletions cypress/fixtures/list/enabled-queue-scheduler.json
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"
}
]
}
]
27 changes: 27 additions & 0 deletions cypress/fixtures/list/list-queues-scheduler.json
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"
}
]
}
]
34 changes: 34 additions & 0 deletions cypress/fixtures/list/single-queue-job-configurations.json
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"
}
]
}
5 changes: 5 additions & 0 deletions cypress/fixtures/list/single-queue-queues.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Queue",
"cronExpression": "0 0 3 ? * MON",
"sequence": ["uvUPBToQHD9", "PPgVeqiSXpz"]
}
27 changes: 27 additions & 0 deletions cypress/fixtures/list/single-queue-scheduler.json
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"
}
]
}
]
84 changes: 84 additions & 0 deletions cypress/fixtures/list/some-user-jobs-and-queues-scheduler.json
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"
}
]
}
]
67 changes: 67 additions & 0 deletions cypress/fixtures/network/41/queue_actions.json
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"
}
}
]
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"
}
}
]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"path": "/api/41/systemSettings/helpPageLink",
"featureName": "Users should be able to edit a sequence",
"featureName": "Queues should be listed",
"static": false,
"count": 1,
"nonDeterministic": false,
Expand Down
Loading
Loading