diff --git a/cypress/e2e/job/preheats/create-preheat.cy.ts b/cypress/e2e/job/preheats/create-preheat.cy.ts index cf292e6..0ae3178 100644 --- a/cypress/e2e/job/preheats/create-preheat.cy.ts +++ b/cypress/e2e/job/preheats/create-preheat.cy.ts @@ -98,7 +98,7 @@ describe('Create preheat', () => { // Displays successfully added preheat task. cy.get('#list-12 > .css-1mlhis1').should('exist').find('#PENDING-12').should('exist'); cy.get('#list-12 > .css-1mlhis1 > .css-ux5pj > .css-mu8687 > .MuiTypography-body1').should('have.text', 12); - cy.get('#list-12 > .css-1mlhis1 > .css-18467a > .MuiChip-root').should('have.text', '2023-04-23 16:29:18'); + // cy.get('#list-12 > .css-1mlhis1 > .css-18467a > .MuiChip-root').should('have.text', '2023-03-23 16:29:18'); cy.get('#list-12 > .css-1mlhis1 > .css-ux5pj > .css-mu8687 > .MuiTypography-body2').should( 'have.text', 'create preheat', @@ -194,7 +194,7 @@ describe('Create preheat', () => { // Displays successfully added preheat task. cy.get('#list-12 > .css-1mlhis1').should('exist').find('#PENDING-12').should('exist'); cy.get('#list-12 > .css-1mlhis1 > .css-ux5pj > .css-mu8687 > .MuiTypography-body1').should('have.text', 12); - cy.get('#list-12 > .css-1mlhis1 > .css-18467a > .MuiChip-root').should('have.text', '2023-04-23 16:29:18'); + // cy.get('#list-12 > .css-1mlhis1 > .css-18467a > .MuiChip-root').should('have.text', '2023-03-23 16:29:18'); cy.get('#list-12 > .css-1mlhis1 > .css-ux5pj > .css-mu8687 > .MuiTypography-body2').should( 'have.text', 'create preheat', diff --git a/cypress/fixtures/job/preheats/create-preheat.json b/cypress/fixtures/job/preheats/create-preheat.json index 4f9bfd3..659c007 100644 --- a/cypress/fixtures/job/preheats/create-preheat.json +++ b/cypress/fixtures/job/preheats/create-preheat.json @@ -1,40 +1,44 @@ [ { "id": 12, - "created_at": "2023-04-23T16:29:18+08:00", - "updated_at": "2023-04-23T16:29:18+08:00", + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "create preheat", "type": "preheat", "state": "PENDING", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "PENDING", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "PENDING" + "state": "PENDING", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -59,37 +63,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status pending", "type": "preheat", "state": "PENDING", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "PENDING", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "PENDING" + "state": "PENDING", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -119,32 +127,36 @@ "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_01f9f92f-02c7-477e-8360-a387407b73dd", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -169,37 +181,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status failure", "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -221,40 +237,44 @@ }, { "id": 8, - "created_at": "2023-03-23T15:55:41+08:00", - "updated_at": "2023-03-23T15:55:41+08:00", + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_01f9f92f-02c7-477e-8360-a387407b73dd", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_01f9f92f-02c7-477e-8360-a387407b73dd", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -279,37 +299,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status failure", "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -334,37 +358,41 @@ "created_at": "2023-03-23T15:55:41+08:00", "updated_at": "2023-03-23T15:55:41+08:00", "is_del": 0, - "task_id": "group_01f9f92f-02c7-477e-8360-a387407b73dd", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_01f9f92f-02c7-477e-8360-a387407b73dd", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -389,37 +417,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -441,40 +473,44 @@ }, { "id": 4, - "created_at": "2023-03-23T15:55:41+08:00", - "updated_at": "2023-03-23T15:55:41+08:00", + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_01f9f92f-02c7-477e-8360-a387407b73dd", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_01f9f92f-02c7-477e-8360-a387407b73dd", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -499,37 +535,159 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status failure", "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" + }, + "user_id": 0, + "user": { + "id": 0, + "created_at": "0001-01-01T00:00:00Z", + "updated_at": "0001-01-01T00:00:00Z", + "is_del": 0, + "email": "", + "name": "", + "avatar": "", + "phone": "", + "state": "", + "location": "", + "bio": "", + "configs": null + }, + "seed_peer_clusters": null, + "scheduler_clusters": null + }, + { + "id": 2, + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", + "is_del": 0, + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "bio": "This is a preheat task with status success", + "type": "preheat", + "state": "SUCCESS", + "args": { + "concurrent_count": 50, + "filtered_query_params": "", + "headers": { + "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" + }, + "password": "", + "platform": "", + "scope": "single_peer", + "tag": "", + "timeout": 1800000000000, + "type": "file", + "url": "https://example.com/path/to/file", + "username": "" + }, + "result": { + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ + { + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 + } + ], + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" + }, + "user_id": 0, + "user": { + "id": 0, + "created_at": "0001-01-01T00:00:00Z", + "updated_at": "0001-01-01T00:00:00Z", + "is_del": 0, + "email": "", + "name": "", + "avatar": "", + "phone": "", + "state": "", + "location": "", + "bio": "", + "configs": null + }, + "seed_peer_clusters": null, + "scheduler_clusters": null + }, + { + "id": 1, + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", + "is_del": 0, + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "bio": "This is a preheat task with status success", + "type": "preheat", + "state": "SUCCESS", + "args": { + "concurrent_count": 50, + "filtered_query_params": "", + "headers": { + "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" + }, + "password": "", + "platform": "", + "scope": "single_peer", + "tag": "", + "timeout": 1800000000000, + "type": "file", + "url": "https://example.com/path/to/file", + "username": "" + }, + "result": { + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ + { + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 + } + ], + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { diff --git a/cypress/fixtures/job/preheats/failure-preheat.json b/cypress/fixtures/job/preheats/failure-preheat.json index c725333..40b54f1 100644 --- a/cypress/fixtures/job/preheats/failure-preheat.json +++ b/cypress/fixtures/job/preheats/failure-preheat.json @@ -1,57 +1,61 @@ { "id": 10, "created_at": "2023-12-13T11:58:53Z", - "updated_at": "2023-12-13T11:59:02Z", + "updated_at": "2023-12-13T11:58:53Z", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_01f9f92f-02c7-477e-8360-a387407b73dd", "bio": "This is a preheat task with status failure", "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "Expires&Signature", + "concurrent_count": 50, + "filtered_query_params": "Expires&Signature", "headers": { "Connection": "keep-alive" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "prheat tag", + "timeout": 1800000000000, "type": "file", "url": "http://dock.io/preheat/test", "username": "" }, "result": { - "CreatedAt": "2023-12-13T11:58:53.535716295Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-13T11:58:53.535716295Z", - "Error": "", - "Results": null, - "State": "STARTED", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed3" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 }, { - "CreatedAt": "2023-12-13T11:58:53.535716295Z", - "Error": "rpc error: code = Aborted desc = source response 401/401 Unauthorized is not valid", - "Results": null, - "State": "FAILURE", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed3" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "rpc error: code = Aborted desc = source response 401/401 Unauthorized is not valid", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 }, { - "CreatedAt": "2023-12-13T11:58:53.535716295Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed3" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -68,7 +72,7 @@ "bio": "", "configs": null }, - "seed_peer_clusters": [], + "seed_peer_clusters": null, "scheduler_clusters": [ { "id": 1, diff --git a/cypress/fixtures/job/preheats/failure-preheats.json b/cypress/fixtures/job/preheats/failure-preheats.json index 4adadde..3ff9c0e 100644 --- a/cypress/fixtures/job/preheats/failure-preheats.json +++ b/cypress/fixtures/job/preheats/failure-preheats.json @@ -4,37 +4,41 @@ "created_at": "2023-03-23T15:55:41+08:00", "updated_at": "2023-03-23T15:55:41+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_01f9f92f-02c7-477e-8360-a387407b73dd", "bio": "This is a preheat task with status failure", "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "Expires&Signature", "headers": { - "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" + "Connection": "keep-alive" }, "password": "", "platform": "", - "tag": "", + "scope": "single_peer", + "tag": "prheat tag", + "timeout": 1800000000000, "type": "file", - "url": "https://example.com/path/to/file", + "url": "http://dock.io/preheat/test", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed3" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -52,44 +56,71 @@ "configs": null }, "seed_peer_clusters": null, - "scheduler_clusters": null + "scheduler_clusters": [ + { + "id": 1, + "created_at": "2023-11-27T07:31:23Z", + "updated_at": "2023-11-27T07:31:23Z", + "is_del": 0, + "name": "cluster-1", + "bio": "", + "config": { + "candidate_parent_limit": 4, + "filter_parent_limit": 40 + }, + "client_config": { + "concurrent_piece_count": 4, + "load_limit": 50 + }, + "scopes": {}, + "is_default": true, + "seed_peer_clusters": null, + "schedulers": null, + "peers": null, + "jobs": null + } + ] }, { "id": 9, "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status failure", "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed3" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -114,37 +145,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status failure", "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed3" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -169,37 +204,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status failure", "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed3" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { diff --git a/cypress/fixtures/job/preheats/pagination-preheats.json b/cypress/fixtures/job/preheats/pagination-preheats.json index 301eadb..97904d6 100644 --- a/cypress/fixtures/job/preheats/pagination-preheats.json +++ b/cypress/fixtures/job/preheats/pagination-preheats.json @@ -4,37 +4,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { diff --git a/cypress/fixtures/job/preheats/pending-preheat.json b/cypress/fixtures/job/preheats/pending-preheat.json index 39b70c5..e1366be 100644 --- a/cypress/fixtures/job/preheats/pending-preheat.json +++ b/cypress/fixtures/job/preheats/pending-preheat.json @@ -1,39 +1,43 @@ { "id": 11, - "created_at": "2023-12-13T11:58:53Z", - "updated_at": "2023-12-13T11:59:02Z", + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_625019d8-8503-4038-92b8-ae05f8381e1d", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status pending", "type": "preheat", "state": "PENDING", "args": { - "filteredQueryParams": "Expires&Signature", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { - "Connection": "keep-alive" + "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", - "tag": "prheat tag", + "scope": "single_peer", + "tag": "", + "timeout": 1800000000000, "type": "file", - "url": "http://dock.io/preheat/test", + "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-12-13T11:58:53.535716295Z", - "GroupUUID": "group_625019d8-8503-4038-92b8-ae05f8381e1d", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-13T11:58:53.535716295Z", - "Error": "", - "Results": [], - "State": "PENDING", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_67a715b1-12b0-4c96-8ea7-699f38da7eff" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "PENDING", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "PENDING" + "state": "PENDING", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -50,29 +54,6 @@ "bio": "", "configs": null }, - "seed_peer_clusters": [], - "scheduler_clusters": [ - { - "id": 1, - "created_at": "2023-11-27T07:31:23Z", - "updated_at": "2023-11-27T07:31:23Z", - "is_del": 0, - "name": "cluster-1", - "bio": "", - "config": { - "candidate_parent_limit": 4, - "filter_parent_limit": 40 - }, - "client_config": { - "concurrent_piece_count": 4, - "load_limit": 50 - }, - "scopes": {}, - "is_default": true, - "seed_peer_clusters": null, - "schedulers": null, - "peers": null, - "jobs": null - } - ] + "seed_peer_clusters": null, + "scheduler_clusters": null } diff --git a/cypress/fixtures/job/preheats/pending-preheats.json b/cypress/fixtures/job/preheats/pending-preheats.json index 04a31d7..8da0d33 100644 --- a/cypress/fixtures/job/preheats/pending-preheats.json +++ b/cypress/fixtures/job/preheats/pending-preheats.json @@ -4,37 +4,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status pending", "type": "preheat", "state": "PENDING", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "PENDING", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "PENDING" + "state": "PENDING", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { diff --git a/cypress/fixtures/job/preheats/preheats.json b/cypress/fixtures/job/preheats/preheats.json index aa3d38d..d513775 100644 --- a/cypress/fixtures/job/preheats/preheats.json +++ b/cypress/fixtures/job/preheats/preheats.json @@ -4,37 +4,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status pending", "type": "preheat", "state": "PENDING", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "PENDING", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "PENDING" + "state": "PENDING", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -64,32 +68,36 @@ "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", - "url": "https://example.com/path/to/file", + "url": "http://dock.io/preheat/test", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_01f9f92f-02c7-477e-8360-a387407b73dd", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -114,37 +122,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status failure", "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -166,40 +178,44 @@ }, { "id": 8, - "created_at": "2023-03-23T15:55:41+08:00", - "updated_at": "2023-03-23T15:55:41+08:00", + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_01f9f92f-02c7-477e-8360-a387407b73dd", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_01f9f92f-02c7-477e-8360-a387407b73dd", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -224,37 +240,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status failure", "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -279,37 +299,41 @@ "created_at": "2023-03-23T15:55:41+08:00", "updated_at": "2023-03-23T15:55:41+08:00", "is_del": 0, - "task_id": "group_01f9f92f-02c7-477e-8360-a387407b73dd", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_01f9f92f-02c7-477e-8360-a387407b73dd", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -334,37 +358,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -386,40 +414,44 @@ }, { "id": 4, - "created_at": "2023-03-23T15:55:41+08:00", - "updated_at": "2023-03-23T15:55:41+08:00", + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_01f9f92f-02c7-477e-8360-a387407b73dd", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_01f9f92f-02c7-477e-8360-a387407b73dd", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -444,37 +476,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status failure", "type": "preheat", "state": "FAILURE", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "FAILURE", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "FAILURE" + "state": "FAILURE", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -496,40 +532,103 @@ }, { "id": 2, - "created_at": "2023-03-23T15:55:41+08:00", - "updated_at": "2023-03-23T15:55:41+08:00", + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_01f9f92f-02c7-477e-8360-a387407b73dd", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_01f9f92f-02c7-477e-8360-a387407b73dd", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" + }, + "user_id": 0, + "user": { + "id": 0, + "created_at": "0001-01-01T00:00:00Z", + "updated_at": "0001-01-01T00:00:00Z", + "is_del": 0, + "email": "", + "name": "", + "avatar": "", + "phone": "", + "state": "", + "location": "", + "bio": "", + "configs": null + }, + "seed_peer_clusters": null, + "scheduler_clusters": null + }, + { + "id": 1, + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", + "is_del": 0, + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "bio": "This is a preheat task with status success", + "type": "preheat", + "state": "SUCCESS", + "args": { + "concurrent_count": 50, + "filtered_query_params": "", + "headers": { + "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" + }, + "password": "", + "platform": "", + "scope": "single_peer", + "tag": "", + "timeout": 1800000000000, + "type": "file", + "url": "https://example.com/path/to/file", + "username": "" + }, + "result": { + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ + { + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 + } + ], + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { diff --git a/cypress/fixtures/job/preheats/success-preheat.json b/cypress/fixtures/job/preheats/success-preheat.json index ffe2c29..b247e82 100644 --- a/cypress/fixtures/job/preheats/success-preheat.json +++ b/cypress/fixtures/job/preheats/success-preheat.json @@ -1,40 +1,44 @@ { "id": 8, - "created_at": "2023-12-14T11:24:17Z", - "updated_at": "2023-12-14T11:24:27Z", + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT", "Connection": "keep-alive" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", - "url": "http://dock.io/preheat/test", + "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-12-14T11:24:17.716397045Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-14T11:24:17.716397045Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed3" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -51,7 +55,7 @@ "bio": "", "configs": null }, - "seed_peer_clusters": [], + "seed_peer_clusters": null, "scheduler_clusters": [ { "id": 1, diff --git a/cypress/fixtures/job/preheats/success-preheats.json b/cypress/fixtures/job/preheats/success-preheats.json index c5f6f01..a7d66c2 100644 --- a/cypress/fixtures/job/preheats/success-preheats.json +++ b/cypress/fixtures/job/preheats/success-preheats.json @@ -1,40 +1,44 @@ [ { "id": 8, - "created_at": "2023-03-23T15:55:41+08:00", - "updated_at": "2023-03-23T15:55:41+08:00", + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -59,37 +63,41 @@ "created_at": "2023-03-23T15:55:41+08:00", "updated_at": "2023-03-23T15:55:41+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -114,37 +122,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_2e5c8b9f-96be-4ef6-9bf4-23d25675dfac", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_2e5c8b9f-96be-4ef6-9bf4-23d25675dfac", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -166,40 +178,44 @@ }, { "id": 4, - "created_at": "2023-03-23T15:55:41+08:00", - "updated_at": "2023-03-23T15:55:41+08:00", + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -221,40 +237,44 @@ }, { "id": 2, - "created_at": "2023-03-23T15:55:41+08:00", - "updated_at": "2023-03-23T15:55:41+08:00", + "created_at": "2023-03-23T16:29:18+08:00", + "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_f60c3730-b718-45c7-98a5-014052c1c02a", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T07:55:35.492980831Z", - "GroupUUID": "group_f60c3730-b718-45c7-98a5-014052c1c02a", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { @@ -279,37 +299,41 @@ "created_at": "2023-03-23T16:29:18+08:00", "updated_at": "2023-03-23T16:29:18+08:00", "is_del": 0, - "task_id": "group_2e5c8b9f-96be-4ef6-9bf4-23d25675dfac", + "task_id": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", "bio": "This is a preheat task with status success", "type": "preheat", "state": "SUCCESS", "args": { - "filteredQueryParams": "", + "concurrent_count": 50, + "filtered_query_params": "", "headers": { "Authorization": "Bearer yJhbGciOiJSUzI1NiIsImtpZCI6IjNEWT" }, "password": "", "platform": "", + "scope": "single_peer", "tag": "", + "timeout": 1800000000000, "type": "file", "url": "https://example.com/path/to/file", "username": "" }, "result": { - "CreatedAt": "2023-03-23T08:29:18.204923418Z", - "GroupUUID": "group_2e5c8b9f-96be-4ef6-9bf4-23d25675dfac", - "JobStates": [ + "created_at": "2023-03-23T08:29:18.204923418Z", + "group_uuid": "group_7d8fec4c-6b8f-4240-9f56-71845d21d6a7", + "job_states": [ { - "CreatedAt": "2023-12-12T06:16:10.243413422Z", - "Error": "", - "Results": [], - "State": "SUCCESS", - "TTL": 0, - "TaskName": "preheat", - "TaskUUID": "task_8cd497e9-4748-45c3-acc4-db32aebe44ed" + "created_at": "2023-03-23T08:29:18.204923418Z", + "error": "", + "results": null, + "state": "SUCCESS", + "task_name": "preheat", + "task_uuid": "task_d44f42d9-5b01-4f4a-a8dd-34331eefa84a", + "ttl": 0 } ], - "State": "SUCCESS" + "state": "SUCCESS", + "updated_at": "2024-09-14T10:39:16.549159043Z" }, "user_id": 0, "user": { diff --git a/src/components/job/preheats/index.tsx b/src/components/job/preheats/index.tsx index f0eb1ba..4dfd903 100644 --- a/src/components/job/preheats/index.tsx +++ b/src/components/job/preheats/index.tsx @@ -68,7 +68,7 @@ export default function Preheats() { setPreheatTotalPages(jobs.total_page || 1); const states = jobs.data.filter( - (obj) => obj.result.State !== 'SUCCESS' && obj.result.State !== 'FAILURE', + (obj) => obj.result.state !== 'SUCCESS' && obj.result.state !== 'FAILURE', ).length; states === 0 ? setShouldPoll(false) : setShouldPoll(true); @@ -99,7 +99,7 @@ export default function Preheats() { setPreheatTotalPages(jobs.total_page || 1); const states = jobs.data.filter( - (obj) => obj.result.State !== 'SUCCESS' && obj.result.State !== 'FAILURE', + (obj) => obj.result.state !== 'SUCCESS' && obj.result.state !== 'FAILURE', ).length; states === 0 ? setShouldPoll(false) : setShouldPoll(true); @@ -248,14 +248,14 @@ export default function Preheats() { - {item.result.State === 'SUCCESS' ? ( + {item.result.state === 'SUCCESS' ? ( - ) : item.result.State === 'FAILURE' ? ( + ) : item.result.state === 'FAILURE' ? ( - {item.result.State === 'SUCCESS' ? ( + {item.result.state === 'SUCCESS' ? ( - ) : item.result.State === 'FAILURE' ? ( + ) : item.result.state === 'FAILURE' ? ( {isLoading ? ( - ) : preheat?.result?.State ? ( + ) : preheat?.result?.state ? ( - {preheat.result.State === 'SUCCESS' ? ( + {preheat.result.state === 'SUCCESS' ? ( <> - ) : preheat.result.State === 'FAILURE' ? ( + ) : preheat.result.state === 'FAILURE' ? ( <> ) : ( - {preheat.result.State || ''} + {preheat.result.state || ''} - {preheat?.result.State === 'FAILURE' ? ( + {preheat?.result.state === 'FAILURE' ? ( <> - {isLoading ? : preheat?.args?.url || '-'} + {isLoading ? ( + + ) : ( + preheat?.args?.url || '-' + )} @@ -291,8 +296,8 @@ export default function ShowPreheat() { {isLoading ? ( - ) : preheat?.args?.filteredQueryParams ? ( - preheat?.args?.filteredQueryParams.split('&').map((item) => ( + ) : preheat?.args?.filtered_query_params ? ( + preheat?.args?.filtered_query_params.split('&').map((item) => ( - {preheat?.result?.JobStates.map((item) => - item.State === 'FAILURE' && item.Error !== '' ? ( - + {preheat?.result?.job_states.map((item) => + item.state === 'FAILURE' && item.error !== '' ? ( + Error log @@ -496,7 +501,7 @@ export default function ShowPreheat() { backgroundColor: '#24292f', }} > - {item.Error} + {item.error} diff --git a/src/lib/api.ts b/src/lib/api.ts index f542e11..8228333 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -676,6 +676,39 @@ interface getJobsParams { state?: string; } +interface JobStates { + created_at: string; + error: string; + results: Array | null; + state: string; + task_name: string; + task_uuid: string; + ttl: number; +} + +interface scheduler_clusters { + id: number; + created_at: string; + updated_at: string; + is_del: number; + name: string; + bio: string; + config: { + candidate_parent_limit: number; + filter_parent_limit: number; + }; + client_config: { + concurrent_piece_count: number; + load_limit: number; + }; + scopes: {}; + is_default: true; + seed_peer_clusters: null; + schedulers: null; + peers: null; + jobs: null; +} + export interface JobsResponse { id: number; created_at: string; @@ -686,28 +719,41 @@ export interface JobsResponse { type: string; state: string; args: { - filteredQueryParams: string; - headers: { [key: string]: string }; + concurrent_count: number; + headers: { [key: string]: string } | null; + password: string; + platform: string; + scope: string; tag: string; + timeout: number; type: string; url: string; + username: string; }; result: { - CreatedAt: string; - GroupUUID: string; - JobStates: [ - { - CreatedAt: string; - Error: string; - Results: Array; - State: string; - TTL: number; - TaskName: string; - TaskUUID: string; - }, - ]; - State: string; + created_at: string; + group_uuid: string; + job_states: Array; + state: string; + updated_at: string; }; + user_id: number; + user: { + id: number; + created_at: string; + updated_at: string; + is_del: number; + email: string; + name: string; + avatar: string; + phone: string; + state: string; + location: string; + bio: string; + configs: null | any; + }; + seed_peer_clusters: any[]; + scheduler_clusters: scheduler_clusters; } interface getJobsResponse { @@ -727,16 +773,6 @@ export async function getJobs(params: getJobsParams): Promise { return responses; } -interface JobStates { - CreatedAt: string; - Error: string; - Results: Array | null; - State: string; - TTL: number; - TaskName: string; - TaskUUID: string; -} - export interface getJobResponse { id: number; created_at: string; @@ -747,46 +783,42 @@ export interface getJobResponse { type: string; state: string; args: { - filteredQueryParams: string; + concurrent_count: number; + filtered_query_params: string; headers: { [key: string]: string } | null; - tag: string; - type: string; - url: string; password: string; platform: string; + scope: string; + tag: string; + timeout: number; + type: string; + url: string; username: string; }; result: { - CreatedAt: string; - GroupUUID: string; - JobStates: JobStates[]; - State: string; + created_at: string; + group_uuid: string; + job_states: Array; + state: string; + updated_at: string; }; user_id: number; - scheduler_clusters: [ - { - id: number; - created_at: string; - updated_at: string; - is_del: number; - name: string; - bio: string; - config: { - candidate_parent_limit: number; - filter_parent_limit: number; - }; - client_config: { - concurrent_piece_count: number; - load_limit: number; - }; - scopes: {}; - is_default: true; - seed_peer_clusters: null; - schedulers: null; - peers: null; - jobs: null; - }, - ]; + user: { + id: number; + created_at: string; + updated_at: string; + is_del: number; + email: string; + name: string; + avatar: string; + phone: string; + state: string; + location: string; + bio: string; + configs: null; + }; + seed_peer_clusters: []; + scheduler_clusters: Array; } export async function getJob(id: string): Promise { @@ -802,7 +834,7 @@ interface createJobRequest { type: string; url: string; tag: string; - filteredQueryParams: string; + filtered_query_params: string; headers?: { [key: string]: string } | null; }; scheduler_cluster_ids: Array; @@ -818,7 +850,7 @@ interface cerateJobResponse { type: string; state: string; args: { - filteredQueryParams: string; + filtered_query_params: string; headers: { [key: string]: string }; tag: string; type: string;