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

Show error message when downloading submissions that has > 5k results #3442

Merged
merged 6 commits into from
Jun 15, 2021

Conversation

gautamjajoo
Copy link
Member

When downloading results for a phase that has > 5k results, an error is shown to use the get_all_submissions API to download the results.

Also, removed the code where we are fetching the number of submissions of the participant Team on all-submissions page since we do not need it here.

@Ram81 @Kajol-Kumari

Screenshot from 2021-05-31 00-39-39

@codecov-commenter
Copy link

Codecov Report

Merging #3442 (b8a6047) into master (96968d6) will decrease coverage by 0.49%.
The diff coverage is 34.80%.

@@            Coverage Diff             @@
##           master    #3442      +/-   ##
==========================================
- Coverage   72.93%   72.44%   -0.50%     
==========================================
  Files          83       20      -63     
  Lines        5368     3175    -2193     
==========================================
- Hits         3915     2300    -1615     
+ Misses       1453      875     -578     
Impacted Files Coverage Δ
frontend/src/js/controllers/authCtrl.js 53.91% <6.38%> (-12.95%) ⬇️
frontend/src/js/controllers/profileCtrl.js 79.76% <20.00%> (-13.10%) ⬇️
frontend/src/js/controllers/permissionCtrl.js 36.36% <22.22%> (-63.64%) ⬇️
frontend/src/js/controllers/challengeCtrl.js 65.17% <33.64%> (-8.52%) ⬇️
frontend/src/js/controllers/updateProfileCtrl.js 82.55% <44.44%> (-10.30%) ⬇️
frontend/src/js/controllers/challengeListCtrl.js 95.74% <50.00%> (+1.06%) ⬆️
...ntend/src/js/controllers/challengeHostTeamsCtrl.js 70.50% <66.66%> (-1.18%) ⬇️
frontend/src/js/controllers/teamsCtrl.js 71.17% <75.00%> (ø)
frontend/src/js/controllers/ChallengeInviteCtrl.js 100.00% <100.00%> (ø)
frontend/src/js/controllers/SubmissionFilesCtrl.js 95.45% <100.00%> (ø)
... and 30 more
Impacted Files Coverage Δ
frontend/src/js/controllers/authCtrl.js 53.91% <6.38%> (-12.95%) ⬇️
frontend/src/js/controllers/profileCtrl.js 79.76% <20.00%> (-13.10%) ⬇️
frontend/src/js/controllers/permissionCtrl.js 36.36% <22.22%> (-63.64%) ⬇️
frontend/src/js/controllers/challengeCtrl.js 65.17% <33.64%> (-8.52%) ⬇️
frontend/src/js/controllers/updateProfileCtrl.js 82.55% <44.44%> (-10.30%) ⬇️
frontend/src/js/controllers/challengeListCtrl.js 95.74% <50.00%> (+1.06%) ⬆️
...ntend/src/js/controllers/challengeHostTeamsCtrl.js 70.50% <66.66%> (-1.18%) ⬇️
frontend/src/js/controllers/teamsCtrl.js 71.17% <75.00%> (ø)
frontend/src/js/controllers/ChallengeInviteCtrl.js 100.00% <100.00%> (ø)
frontend/src/js/controllers/SubmissionFilesCtrl.js 95.45% <100.00%> (ø)
... and 30 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93e6c2d...b8a6047. Read the comment docs.

Copy link
Member

@Kajol-Kumari Kajol-Kumari left a comment

Choose a reason for hiding this comment

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

Minor changes required, rest Looks good to me 👍

@@ -309,7 +309,7 @@ ${phase}/submission?participant_team__team_name=${participantTeamName}`;
}

/**
* Challenge Submission Counts
* Challenge Submission Counts of the participant Team
Copy link
Member

Choose a reason for hiding this comment

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

Can we please revert this change as it's required for this PR

Copy link
Member Author

@gautamjajoo gautamjajoo Jun 2, 2021

Choose a reason for hiding this comment

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

We were using this url on the submissions page, but this was confusing whether it was for all submissions or submissions for a particular team that's why I have modified it to make it more descriptive.

@Ram81
Copy link
Member

Ram81 commented Jun 2, 2021

@gautamjajoo we should show this in a card on the All submissions page instead of a toast. You can highlight the card after the user clicks on the Download button. We will show the card on the page even if the download button is not clicked as a note if the number of submissions is > 5k. Let me know if you have doubts.

@gautamjajoo
Copy link
Member Author

@Ram81 The card would be like the Submission Guidelines one above the Make Submission which is on the submit page

@gautamjajoo
Copy link
Member Author

Results > 5k
Screenshot from 2021-06-02 23-17-53.png

Results < 5k
Screenshot from 2021-06-02 23-29-40.png

Copy link
Member

@Ram81 Ram81 left a comment

Choose a reason for hiding this comment

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

@gautamjajoo can you fix the message card style. It doesn't look consistent with other cards that we show to hosts on the challenge page.

@gautamjajoo
Copy link
Member Author

@Ram81 Updated card:

Screenshot from 2021-06-04 22-24-30

@gautamjajoo gautamjajoo requested a review from Ram81 June 7, 2021 15:22
Copy link
Member

@Ram81 Ram81 left a comment

Choose a reason for hiding this comment

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

@gautamjajoo can you increase the top, bottom and left padding for the message. For style reference you can create a new challenge on frontend v1 and go to challenge overview page to see how we show instructions currently.

@gautamjajoo
Copy link
Member Author

@Ram81 @Kajol-Kumari
Screenshot from 2021-06-09 14-00-16

@gautamjajoo gautamjajoo requested a review from Ram81 June 10, 2021 05:53
Copy link
Member

@Ram81 Ram81 left a comment

Choose a reason for hiding this comment

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

LGTM

@RishabhJain2018 RishabhJain2018 merged commit 2de6f8f into Cloud-CV:master Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants