Skip to content

Commit

Permalink
Frontend_V2: Show error message when downloading submissions that has…
Browse files Browse the repository at this point in the history
… > 5k results (#3442)

* Show error message when submissions > 5k

* add card for results> 5k

* update card

* remove merge conflicts

Co-authored-by: Rishabh Jain <rishabhjain2018@gmail.com>
  • Loading branch information
gautamjajoo and RishabhJain2018 committed Jun 15, 2021
1 parent 21ea94c commit 2de6f8f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
<div class="challenge-card">
<div class="ev-card-panel card-bt-margin">

<!-- Card for submissions greater than 5000 -->
<div class="ev-md-container ev-card-panel card-bt-margin" *ngIf="submissionCount > 5000">
<div class="row">
<div class="col s12 m12 l12">
<p class="fs-16">
<strong> Note: </strong> Results are greater than 5k, please use the
<a href="https://eval.ai/api/docs/#operation/get_all_submissions_for_a_challenge"><strong class="blue-text"> get_all_submissions </strong></a> API to download results.
</p>
</div>
</div>
</div>

<div class="ev-card-panel card-bt-margin">
<div class="ev-md-container bottom-hr-line">
<div class="row row-lr-margin phase-title">
<div class="col-sm-12">
<h5 class="fw-light">All Submissions</h5>
</div>
</div>
</div>
<div class="row row-lr-margin">
<div class="col-sm-6 col-xs-12 col-lg-6 col-lr-pad phase-select-box">
<app-selectphase
Expand All @@ -28,7 +41,10 @@ <h5 class="fw-light">All Submissions</h5>
</mat-form-field>
</div>
<div class="col-md-2 col-sm-2 col-xs-6 col-lg-6 col-lr-pad download-submissions">
<a class="waves-effect waves-dark btn ev-btn-dark w-300 fs-16" (click)="downloadSubmission()">Download </a>
<button
class="btn ev-btn-dark btn-waves-effect waves-dark grad-btn grad-btn-dark fs-14"
(click)="downloadSubmission()"
[disabled]="submissionCount>5000">Download </button>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend_v2/src/app/services/endpoints.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ ${phase}/submission?participant_team__team_name=${participantTeamName}`;
}

/**
* Challenge Submission Counts
* Challenge Submission Counts of the participant Team
* @param challenge challenge id
* @param phase phase id
*/
Expand Down

0 comments on commit 2de6f8f

Please sign in to comment.