Week 12
Goals for the week
Sl. No. | Initial Goals | Completed |
---|---|---|
1. | Solve requested changes on existing PRs | Done |
2. | Update the GSOC progress report repository | Done |
3. | Design the show jobs API in openapi.yaml | Done |
4. | Implementing the show jobs page in the react UI (with API) | Done |
Designing GET uploads/{id}/history
The API design is something like mentioned below
/jobs/{id}/history:
parameters:
- name: id
required: true
description: Id of the upload
in: path
schema:
type: integer
get:
operationId: getJobsHistory
tags:
- Job
summary: Get the history of all the jobs queued based on an upload
description: Returns the history of all the jobs queued based on an upload
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ShowJob'
'403':
description: Upload is not accessible
content:
application/json:
schema:
$ref: '#/components/schemas/Info'
'404':
description: Upload does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/Info'
default:
$ref: '#/components/responses/defaultResponse'
API PR Link : feat(API): /jobs/{id}/history GET route to get the history of all the jobs queued based on an upload #2307
Testing GET jobs/{id}/history
-
Use any API platform like postman.
-
Pull the changes from the above PR.
-
If the upload id exists, you, can expect a response like this
[
{
"jobId": "7",
"jobName": "Nirjas-master.zip",
"jobQueue": [
{
"jq_pk": "11",
"jq_job_fk": "7",
"jq_type": "ununpack",
"jq_args": "3",
"jq_starttime": "2022-08-17 11:50:07",
"jq_endtime": "2022-08-17 11:50:08",
"jq_endtext": "Completed",
"jq_itemsprocessed": "88",
"jdep_jq_depends_fk": null,
"depends": [
null
],
"itemsPerSec": 88,
"canDoActions": true,
"isInProgress": false,
"isReady": true,
"download": ""
},
{
"jq_pk": "12",
"jq_job_fk": "7",
"jq_type": "adj2nest",
"jq_args": "3",
"jq_starttime": "2022-08-17 11:50:08",
"jq_endtime": "2022-08-17 11:50:08",
"jq_endtext": "Completed",
"jq_itemsprocessed": "88",
"jdep_jq_depends_fk": "11",
"depends": [
"11"
],
"itemsPerSec": 88,
"canDoActions": true,
"isInProgress": false,
"isReady": true,
"download": ""
},
{
"jq_pk": "13",
"jq_job_fk": "7",
"jq_type": "monk",
"jq_args": "3",
"jq_starttime": "2022-08-17 11:50:09",
"jq_endtime": "2022-08-17 11:50:12",
"jq_endtext": "Completed",
"jq_itemsprocessed": "77",
"jdep_jq_depends_fk": "12",
"depends": [
"12"
],
"itemsPerSec": 25.666666666666668,
"canDoActions": true,
"isInProgress": false,
"isReady": true,
"download": ""
},
{
"jq_pk": "14",
"jq_job_fk": "7",
"jq_type": "nomos",
"jq_args": "3",
"jq_starttime": "2022-08-17 11:50:09",
"jq_endtime": "2022-08-17 11:50:20",
"jq_endtext": "Completed",
"jq_itemsprocessed": "77",
"jdep_jq_depends_fk": "12",
"depends": [
"12"
],
"itemsPerSec": 7,
"canDoActions": true,
"isInProgress": false,
"isReady": true,
"download": ""
},
{
"jq_pk": "15",
"jq_job_fk": "7",
"jq_type": "ojo",
"jq_args": "3",
"jq_starttime": "2022-08-17 11:50:09",
"jq_endtime": "2022-08-17 11:50:09",
"jq_endtext": "Completed",
"jq_itemsprocessed": "77",
"jdep_jq_depends_fk": "12",
"depends": [
"12"
],
"itemsPerSec": 77,
"canDoActions": true,
"isInProgress": false,
"isReady": true,
"download": ""
}
],
"upload": {
"uploadName": "Nirjas-master.zip",
"uploadId": "3",
"uploadDesc": "Test Zip",
"uploadItem": "3",
"uploadEta": ""
}
}
]
Implementing the Show jobs
page in the react UI (with API)
UI PR Link : feat(UI): added show jobs page to view all the jobs queued for the upload #256
This PR contains two tasks
- Creation of a new page that will show all the jobs queued for an upload and all other useful information.
- Create the static UI using reusable components.
- Integrate the API from https://github.com/fossology/fossology/pull/2307
- Test Everything.
- Reading the main licenses and status parameter from the backend and showing it in the browse table for each upload.
Working Demo Show jobs Page
Conclusions and further plans
- Implement the report import functionality via REST API.
- Create the Report Import page in react UI.
- Write a blog decribing the journey of GSOC'2022 and contributions made during the tenure.