Fix: Remove debug logs and connect missing API calls#377
Open
Kasturijadhav14 wants to merge 2 commits into
Open
Fix: Remove debug logs and connect missing API calls#377Kasturijadhav14 wants to merge 2 commits into
Kasturijadhav14 wants to merge 2 commits into
Conversation
|
This pull request has conflicts, please rebase to resolve those before we can evaluate the pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey! This is my first contribution to FOSSologyUI. While exploring the codebase I found a few bugs where forms were not actually doing anything when submitted, and some errors were being silently swallowed. Here's what I fixed:
Bugs fixed:
Add License form (admin/license/create) — The form was completely disconnected from the backend. Clicking "Add License" only printed to the browser console. Now it actually calls the API, shows a success message, and resets the form.
Edit Upload form (organize/uploads/edit) — The submit button was showing a fake success message saying "Upload properties updated (not implemented)". Now it calls the real API to update the upload name and description.
Delete Uploads page (organize/uploads/delete) — Errors when fetching folders and uploads were being silently swallowed with console.error, so users had no idea something went wrong. Now errors are shown as alerts on screen.
One Shot Analysis page (upload/oneShotAnalysis) — Had two TODO comments with console.logs as placeholders. Added proper file state tracking so the selected file is available when the form submits.
Other changes:
updateUploadApitosrc/api/upload.jsupdateUploadtosrc/services/upload.jsupdateendpoint tosrc/constants/endpoints.jsupdatedUploadPropsmessage tosrc/constants/messages.jsLet me know if anything needs to be changed!