diff --git a/frontend_v2/src/app/components/challenge/challengephases/editphasemodal/editphasemodal.component.html b/frontend_v2/src/app/components/challenge/challengephases/editphasemodal/editphasemodal.component.html index 924da573c7..8ac4ec51fb 100644 --- a/frontend_v2/src/app/components/challenge/challengephases/editphasemodal/editphasemodal.component.html +++ b/frontend_v2/src/app/components/challenge/challengephases/editphasemodal/editphasemodal.component.html @@ -172,23 +172,7 @@ - -
-
- -
-
- -
- +
diff --git a/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.html b/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.html index 3087f6dc6b..5e77dc921f 100644 --- a/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.html +++ b/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.html @@ -17,10 +17,10 @@
Challenge Settings
- + Upload New Image
@@ -28,7 +28,12 @@
Challenge Settings
{{ challenge['title'] }} - + @@ -44,7 +49,7 @@
Challenge Settings
- +
@@ -78,10 +83,10 @@
Challenge Settings

- - {{ publishChallenge.state }} - - + + {{ publishChallenge.state }} + +
Challenge Settings
- - + +
@@ -135,7 +140,7 @@
Challenge Settings
- +
Edit Phase @@ -151,29 +156,48 @@
Challenge Settings
#phaseselect >
- -
+ +
Phase Details - -      +      Is Public - -      +      Submission Visibility +

+ + Test Annotations + + + +
- -
+
+
+
+

+ Note: For test annotations > 100MB, please use + evalai-cli + to update the test annotations. + View Instructions +

+
+
+
@@ -199,8 +223,8 @@
Challenge Settings
Leaderboard Visibility - -      +     
@@ -232,11 +256,10 @@
Challenge Settings
- - +
@@ -251,8 +274,8 @@
Evaluation script
Evaluation Criteria - -    +    Evaluation Script @@ -303,7 +326,6 @@
Submission worker logs
-
diff --git a/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.scss b/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.scss index 1683fabdf0..a9a94dc65d 100644 --- a/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.scss +++ b/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.scss @@ -50,6 +50,10 @@ input { border-bottom: none; } +p { + margin:0px 0px 25px 0px; +} + :host ::ng-deep .mat-tab-label .mat-tab-label-content{ font-weight: $fw-light !important; font-size: $fs-16 !important; diff --git a/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts b/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts index ad99ad7f5d..c246aae9ff 100644 --- a/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts +++ b/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts @@ -111,26 +111,6 @@ export class ChallengesettingsComponent implements OnInit, OnDestroy { * 3 -> public */ isPhaseSplitLeaderboardPublic: number = 1; - - /** - * Leaderboard precision value - */ - leaderboardPrecisionValue = 2; - - /** - * Set leaderboard precision value - */ - setLeaderboardPrecisionValue = '1.2-2'; - - /** - * If leaderboard precision value is equal to 0 - */ - minusDisabled = false; - - /** - * If leaderboard precision value is equal to 20 - */ - plusDisabled = false; /** * store worker logs @@ -750,6 +730,19 @@ export class ChallengesettingsComponent implements OnInit, OnDestroy { }; } + showCliInstructions() { + const SELF = this; + /** + * Parameters of the modal + */ + const PARAMS = { + title: 'Instructions', + label: 'evaluation_details', + isCliInstructions: true + }; + SELF.globalService.showModal(PARAMS); + } + /** * Edit Phase Details function */ @@ -934,6 +927,52 @@ export class ChallengesettingsComponent implements OnInit, OnDestroy { } } + /** + * Edit test annotations of the phase + */ + editTestAnnotations() { + const SELF = this; + SELF.apiCall = (params) => { + const FORM_DATA: FormData = new FormData(); + FORM_DATA.append('test_annotation', params['test_annotation']); + SELF.apiService + .patchFileUrl( + SELF.endpointsService.updateChallengePhaseDetailsURL(SELF.selectedPhase['challenge'], SELF.selectedPhase['id']), + FORM_DATA + ) + .subscribe( + (data) => { + SELF.globalService.showToast('success', 'The test annotations are successfully updated!'); + }, + (err) => { + SELF.globalService.showToast('error', err); + }, + () => this.logger.info('EDIT-TEST-ANNOTATION-FINISHED') + ); + }; + + /** + * Parameters of the modal + */ + const PARAMS = { + title: 'Edit Test Annotations', + confirm: 'Submit', + deny: 'Cancel', + form: [ + { + name: 'testAnnotation', + isRequired: true, + label: 'test_annotation', + placeholder: '', + type: 'file', + value: '', + }, + ], + confirmCallback: SELF.apiCall, + }; + SELF.globalService.showModal(PARAMS); + } + // Edit Leaderboard Details -> /** @@ -952,17 +991,6 @@ export class ChallengesettingsComponent implements OnInit, OnDestroy { SELF.leaderboardVisibility.state = 'Private'; SELF.leaderboardVisibility.icon = 'fa fa fa-toggle-off grey-text text-darken-1'; } - const API_PATH = SELF.endpointsService.particularChallengePhaseSplitUrl(this.selectedPhaseSplit['id']); - SELF.apiService.getUrl(API_PATH).subscribe( - (data) => { - SELF.leaderboardPrecisionValue = data.leaderboard_decimal_precision; - SELF.setLeaderboardPrecisionValue = `1.${ SELF.leaderboardPrecisionValue }-${ SELF.leaderboardPrecisionValue }`; - }, - (err) => { - SELF.globalService.handleApiError(err); - }, - () => {} - ); } } @@ -1031,30 +1059,6 @@ export class ChallengesettingsComponent implements OnInit, OnDestroy { } } - /** - * Update leaderboard decimal precision value - * @param updatedLeaderboardPrecisionValue new leaderboard precision value - */ - updateLeaderboardDecimalPrecision(updatedLeaderboardPrecisionValue) { - const API_PATH = this.endpointsService.particularChallengePhaseSplitUrl(this.selectedPhaseSplit['id']); - const SELF = this; - SELF.leaderboardPrecisionValue = updatedLeaderboardPrecisionValue; - SELF.setLeaderboardPrecisionValue = '1.' + SELF.leaderboardPrecisionValue + '-' + SELF.leaderboardPrecisionValue; - const BODY = JSON.stringify({ - leaderboard_decimal_precision: SELF.leaderboardPrecisionValue, - }); - SELF.apiService.patchUrl(API_PATH, BODY).subscribe( - (data) => { - this.minusDisabled = SELF.leaderboardPrecisionValue === 0 ? true : false; - this.plusDisabled = SELF.leaderboardPrecisionValue === 20 ? true : false; - }, - (err) => { - SELF.globalService.handleApiError(err, true); - }, - () => this.logger.info('EDIT-LEADERBOARD-PRECISION-VALUE-FINISHED') - ); - } - // Edit Evaluation Script and Criteria -> /** diff --git a/frontend_v2/src/app/components/challenge/challengeviewallsubmissions/challengeviewallsubmissions.component.html b/frontend_v2/src/app/components/challenge/challengeviewallsubmissions/challengeviewallsubmissions.component.html index b2afdd5a5f..71599b8c14 100644 --- a/frontend_v2/src/app/components/challenge/challengeviewallsubmissions/challengeviewallsubmissions.component.html +++ b/frontend_v2/src/app/components/challenge/challengeviewallsubmissions/challengeviewallsubmissions.component.html @@ -7,7 +7,7 @@

Note: Results are greater than 5k, please use the get_all_submissions API to download results. -

+

diff --git a/frontend_v2/src/app/components/utility/modal/modal.component.html b/frontend_v2/src/app/components/utility/modal/modal.component.html index 1fbafcaff5..28f390116c 100644 --- a/frontend_v2/src/app/components/utility/modal/modal.component.html +++ b/frontend_v2/src/app/components/utility/modal/modal.component.html @@ -1,10 +1,13 @@