Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(upload): added the upload file page #46

Merged
merged 2 commits into from
Jul 1, 2021
Merged

Conversation

Shruti3004
Copy link
Collaborator

@Shruti3004 Shruti3004 commented Jun 28, 2021

Description

Added the upload file page.

Changes

  • Created the separate folder for uploads in Components that contains helper functions which will get reused in VCS, Url and server.
    • AccessLevel
    • Ignore Scm
    • License Decider
    • Optional Analysis
    • Upload Reuse
  • Added the Upload file page

How to test

visit to the route '/upload/file'

Screenshots

Screenshot from 2021-06-28 16-01-46
Screenshot from 2021-06-28 16-24-01
Screenshot from 2021-06-29 16-51-41
Screenshot from 2021-06-29 16-51-58
Screenshot from 2021-06-29 16-52-05

@Shruti3004 Shruti3004 requested a review from GMishx June 28, 2021 10:58
@Shruti3004
Copy link
Collaborator Author

@GMishx current implementation is perfectly creating a file, But there is one question regarding the dropdown of select folder, I have implemented it like the way I did with search as suggested by you, by default I have provided it with the Id, is it the right approach? And for the time being we decided to wrap with all the uploads api then we will work on jobs api for scanning the uploaded documents, What's your call on this?

@GMishx
Copy link
Member

GMishx commented Jun 28, 2021

@GMishx current implementation is perfectly creating a file, But there is one question regarding the dropdown of select folder, I have implemented it like the way I did with search as suggested by you, by default I have provided it with the Id, is it the right approach?

You can check #45, @Aman-Codes is loading them.

And for the time being we decided to wrap with all the uploads api then we will work on jobs api for scanning the uploaded documents, What's your call on this?

Okay, lets check the REST API and discuss this in the meeting. There is a possibility to do it in single call.

@Shruti3004
Copy link
Collaborator Author

@GMishx current implementation is perfectly creating a file, But there is one question regarding the dropdown of select folder, I have implemented it like the way I did with search as suggested by you, by default I have provided it with the Id, is it the right approach?

You can check #45, @Aman-Codes is loading them.

And for the time being we decided to wrap with all the uploads api then we will work on jobs api for scanning the uploaded documents, What's your call on this?

Okay, lets check the REST API and discuss this in the meeting. There is a possibility to do it in single call.

Okay Sure.

@Shruti3004
Copy link
Collaborator Author

@GMishx I have added the jobs api as well for scheduling analysis of uploaded files please review it.

@GMishx GMishx added needs review Need code review needs test Needs testing labels Jun 30, 2021
Comment on lines 15 to 19
>
Select an already uploaded package for reuse in specific folder
</InputContainer>
<select>
<option value="Software Repository">Software Repository</option>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be fetched with combination of /folders and /uploads endpoints.

@GMishx
Copy link
Member

GMishx commented Jun 30, 2021

The file got uploaded successfully but the uploadid for the jobs was undefined. Also, please clear the form once the form is submitted to prevent duplicate uploads.

image

@Shruti3004 Shruti3004 force-pushed the feat/upload-file branch 2 times, most recently from 903ec76 to df22b97 Compare June 30, 2021 19:34
Signed-off-by: Shruti3004 <mail2shruti.ag@gmail.com>
@Shruti3004 Shruti3004 added the urgent Needs an immediate review label Jun 30, 2021
@Shruti3004
Copy link
Collaborator Author

Shruti3004 commented Jul 1, 2021

@GMishx In yesterday meeting we had a discussion regarding creating the label named urgent, actually this pr has massive changes so when I rebase it yesterday, on rebasing it overwrites the code twice, then again i copy the file from my commit, this leads to increase the work and time wastage. So, unamously we reached to a conclusion that we can have this label for such prs.

@GMishx
Copy link
Member

GMishx commented Jul 1, 2021

@GMishx In yesterday meeting we had a discussion regarding creating the label named urgent, actually this pr has massive changes so when I rebase it yesterday, on rebasing it overwrites the code twice, then again i copy the file from my commit, this leads to increase the work and time wastage. So, unamously we reached to a conclusion that we can have this label for such prs.

Thank you for letting me know about the label but I can only do so much working as a single maintainer reviewing the PRs :-).

Also, there are many changes that needs to be done before I can merge this PR, so I left the review comments. You want to merge it now and resolve them in a separate issue?

@@ -36,4 +36,9 @@ export const endpoints = {
create: () => `${apiUrl}/folders`,
delete: (folderId) => `${apiUrl}/folders/${folderId}`,
},
upload: {
uploadCreate: () => `${apiUrl}/uploads`,
scheduleAnalysis: () => `${apiUrl}/jobs`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be part of jobs object?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we have to fix it once we hop on jobs section then we will keep all the related apis to it in that.

Signed-off-by: Shruti3004 <mail2shruti.ag@gmail.com>
@Shruti3004
Copy link
Collaborator Author

Shruti3004 commented Jul 1, 2021

@GMishx In yesterday meeting we had a discussion regarding creating the label named urgent, actually this pr has massive changes so when I rebase it yesterday, on rebasing it overwrites the code twice, then again i copy the file from my commit, this leads to increase the work and time wastage. So, unamously we reached to a conclusion that we can have this label for such prs.

Thank you for letting me know about the label but I can only do so much working as a single maintainer reviewing the PRs :-).

Also, there are many changes that needs to be done before I can merge this PR, so I left the review comments. You want to merge it now and resolve them in a separate issue?

Yes, I understand, @GMishx I have no issue adding the changes in this pr itself but the thing is on rebasing the coding is getting overwritten, is there is any other way to resolve that.

@GMishx
Copy link
Member

GMishx commented Jul 1, 2021

Yes, I understand, @GMishx I have no probblem resolving in this pr itself but the thing is on rebasing the coding is getting overwritten, is there is any other way to resolve tht

Only way to prevent this situation is I do not merge any other branch till the branch marked with urgent tags are merged.

Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good.
Tested, working fine.

Just a request if the form can be reloaded or cleaned once the "Upload" is done, I can merge this PR.

@GMishx GMishx added ready PR is ready for merge and removed needs review Need code review needs test Needs testing labels Jul 1, 2021
@Shruti3004
Copy link
Collaborator Author

Shruti3004 commented Jul 1, 2021

Changes looks good.
Tested, working fine.

Just a request if the form can be reloaded or cleaned once the "Upload" is done, I can merge this PR.

Sir I have set that wont it working for you? The checkmarks get clear and probably you are seeing that file name but it is just displaying if you try creating it without adding file it will fail.

@GMishx
Copy link
Member

GMishx commented Jul 1, 2021

Oh, my bad. Didn't pull the code.

@GMishx GMishx merged commit 1c5c66c into development Jul 1, 2021
@GMishx GMishx deleted the feat/upload-file branch July 1, 2021 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready PR is ready for merge urgent Needs an immediate review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants