Organisation π© FOSSOLOGY
Proposal : π Click Here
Hello, I am Krishna Mahato, an undergraduate student pursuing B.Tech in Computer Science Engineering at ITER, SOA University, Bhubaneswar. I love developing and working on full stack projects that leverage the power of new technologies and modern methodologies. Iβm more aligned towards web technologies and I strongly believe that there is a huge amount of βtypes and techβ one can explore on the web. In this GSoC period I worked on a complex web project called fossology. FOSSology is an open-source license compliance software system and toolkit. As a toolkit, it can run license, copyright, and export control scans from the command line, and as a system, it provides a database and web UI to give a compliance workflow.
Project - π "REST API and UI improvements for FOSSologyUI"
Over the summer of 2022, I worked on the development of the FOSSologyUI project and the fossology backend project (in terms of implementing WebAPIs). During the tenure, I exposed the native functionalities of fossology into REST API services and simultaneously integrating these APIs on the UI project by adding the corresponding pages (using React.js's component based architecture).
-
For FOSSologyUI project :
- Refactoring existing parts of code and implement better UI approaches wherever possible.
- Solve existing issues
- Create new pages and implement the APIs.
-
For fossology backend project :
- Introduce new REST API endpoints.
- Document the APIs in OpenAPI.
For the FOSSologyUI project
-
A warning in the console stated an error like below,
Warning: Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components select
This occured when we used
value
anddefaultValue
prop inside a select tag simultaneously.Solution : Removing one of the
value
ordefaultValue
prop fixed the issue. -
Disabled deletion of the "fossy" and "Delete user" by greying out these options from the dropdown.
ss2.mov
-
The below error appeared in the console when we navigate to the delete user page. Looking at the error say there is some cors issue.
Removing the
credentials
from the request header fixed the issue. -
There were design related bugs in the Navbar and browse page.
The icons were in column alignment which took more space in tablet or mobile view.
By default the height was
50rem
for the folders navigation which gave extra space for no reason and didn't look good from UI perspectiveScreen.Recording.2022-06-06.at.12.09.11.AM.mov
This change contains dynamic height value assignment based on number of folders and subfolders which solves this issue.
Screen.Recording.2022-06-06.at.12.08.42.AM.mov
-
Creation of the
Add User
page. Below is the full working demo of the add user page which is available atAdmin > Users > Add User
.Screen.Recording.2022-09-04.at.3.29.00.PM.mov
-
Creation of the
Edit User Account
page. Below is the full working demo of the Edit user page which is available atAdmin > Users > Edit User Account
.final.mp4
-
Creation of the
Upload Permissions
page. Below is the full working demo of the Upload Permissions page which is available atAdmin > Upload Permissions
.final.mp4
-
In this change, there were two tasks that followed
- 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.
Below is the working demo,
Screen.Recording.2022-09-01.at.12.05.32.PM.2.mov
-
Implemented functionality to import an existing report to an upload from the UI.
Below is the working demo,
Screen.Recording.2022-09-14.at.4.14.33.PM.mp4
Pull Requests
PR | Brief Description | Status |
---|---|---|
#187 | Fix Warning while loading delete user page | β Merged |
#196 | Disabled deletion of default users | β Merged |
#209 | Removed credentials from api request module | β Merged |
#215 | Design related fixes (Navbar and browse page) | β Merged |
#229 | UI and formdata implementation for the add user page | β Merged |
#236 | UI and styling for the edit user page | β Merged |
#251 | Upload permissions page UI and API Implementation done | π‘ In Review |
#256 | added show jobs page to view all the jobs queued for the upload | π‘ In Review |
#265 | Added logical components to the report import page and Integrated the API | π‘ In Review |
For the fossology backend project
-
POST users/
for creating new users. Refer to the below example -
PUT users/{id}
for modifying user details. Refer to the below example -
POST /users/tokens
for creating a new REST API Token. Refer to the below example -
GET /users/tokens/{type}
for fetching all the REST API tokens based on the type specified (active | expired). Refer to the example below -
PUT /uploads/{id}/permissions
for setting permissions for a upload for different groups. Refer to the example below -
GET /uploads/{id}/perm-groups
for fetching all the groups with their respective permissions for a upload along with the respective public permission. Refer to the example below -
GET /jobs/history?upload={id}
for fetching the history of all the jobs queued based on an upload. Refer to the example below- Response
[ { "jobId": 8, "jobName": "hotels.json", "jobQueue": [ { "jobQueueId": 16, "jobQueueType": "ununpack", "startTime": "2022-08-22 14:17:48", "endTime": "2022-08-22 14:17:48", "status": "Completed", "itemsProcessed": 1, "dependencies": [ null ], "itemsPerSec": 1, "canDoActions": true, "isInProgress": false, "isReady": true, "download": "" },.... .... .. ], "upload": { "uploadName": "hotels.json", "uploadId": "4", "uploadDesc": "", "uploadItem": "91", "uploadEta": "" } },.... .... .. ]
-
POST /report/import?upload={id}
for importing an existing report and initiating a reportImport job for a given upload. Refer to the example below
Pull Requests
PR | Brief Description | Status |
---|---|---|
#2256 | POST users/ route for adding a new user |
β Merged |
#2262 | Added PUT users/{id} route to modify user details |
β Merged |
#2266 | Added POST /users/tokens Route and GET /users/tokens/{type} Route |
β Merged |
#2275 | PUT api to Set permissions for a upload and GET API to fetch respective permissions of groups |
β Merged |
#2307 | GET /jobs/history?upload={id} route to get the history of all the jobs queued based on an upload |
π‘ In Review |
#2317 | POST report/import?upload={id} route to import an existing report to an upload |
π‘ In Review |
(21st May - 12th June)
Timeline | Link |
---|---|
N/A | https://fossology.github.io/gsoc/docs/2022/ui/updates/krishna/2022-06-02 |
(13th June - 24th July)
(25th July - 4th September)
First I need to give a big shout out to my mentors Gaurav Mishra and Shaheem Azmal M MD, who have been extremely passionate and supportive mentors. They have been continuously providing assistance to me from high level architectural design to the lower level bug fixes suggestions, I would also like to thank the FOSSology team for arranging the program and the assistance provided!
Moreover, It was only possible because of FOSSology that I witnessed the power of open-source softwares for the first time. In this GSoC, due to limited time span there were tasks that I couldn't accomplish but planned initially. I'll be trying to complete those milestones past the GSoC period as it would also be good way to remain connected with the community by being an active contributor to the project.