Skip to main content

Week 12

Goals for the week

Sl. No.Initial GoalsCompleted
1.Solve requested changes on existing PRsDone
2.Update the GSOC progress report repositoryDone
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'

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)

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.
  • 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.