From b32c3517aad60c5e614511b057731e130277f463 Mon Sep 17 00:00:00 2001 From: gautamjajoo Date: Mon, 30 Aug 2021 13:27:14 +0530 Subject: [PATCH 1/3] move test annotations outside the modal --- .../editphasemodal.component.html | 178 ++++++++---------- .../challengesettings.component.html | 82 +++++--- .../challengesettings.component.scss | 16 +- .../challengesettings.component.ts | 62 ++++++ .../utility/modal/modal.component.html | 65 ++++++- .../utility/modal/modal.component.scss | 8 + .../utility/modal/modal.component.ts | 46 ++++- 7 files changed, 323 insertions(+), 134 deletions(-) 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..de9de7325c 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 @@ -77,113 +77,99 @@
-
-
- Submissions/day - -
- {{ perDaySubmisionValidationMessage }} +
+
+ Submissions/day + +
+ {{ perDaySubmisionValidationMessage }} +
-
-
-
- Submissions/month - -
- {{ PerMonthSubmissionValidationMessage }} +
+
+ Submissions/month + +
+ {{ PerMonthSubmissionValidationMessage }} +
-
-
-
- Total submissions - +
+
+ Total submissions + +
-
-
-
-
- Max Concurrent Submissions Allowed - -
-
- -
-
-
Allowed Submission File Types
- +
+
+
+ Max Concurrent Submissions Allowed + +
-
-
-
-
- +
+
+
Allowed Submission File Types
+ +
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..45c85a34ad 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 - -      +     
@@ -216,14 +240,16 @@
Challenge Settings
{{ leaderboardPrecisionValue }}
@@ -232,11 +258,10 @@
Challenge Settings
- - +
@@ -251,8 +276,8 @@
Evaluation script
Evaluation Criteria - -    +    Evaluation Script @@ -303,7 +328,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..2d8d1b86c0 100644 --- a/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.scss +++ b/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.scss @@ -17,6 +17,10 @@ } } +p { + margin: 0px 0px 25px 0px; +} + .rangeslider { width: 50%; display: flex; @@ -50,13 +54,13 @@ input { border-bottom: none; } -:host ::ng-deep .mat-tab-label .mat-tab-label-content{ +:host ::ng-deep .mat-tab-label .mat-tab-label-content { font-weight: $fw-light !important; font-size: $fs-16 !important; } .phase-card { - width:50vw; + width: 50vw; } .phase-button { @@ -68,7 +72,7 @@ input { } .upload-container { - text-align:center; + text-align: center; } @media (max-width: 992px) { @@ -83,7 +87,7 @@ input { } } -@media (max-width: 600px) { +@media (max-width: 600px) { .settings-section { padding: 25px !important; } @@ -91,8 +95,8 @@ input { justify-content: space-evenly; } .btn-floating { - margin: 0% - } + margin: 0%; + } } .example-chip-list { 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 fcb7813f23..72293fb12e 100644 --- a/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts +++ b/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.ts @@ -929,6 +929,68 @@ 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 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 -> /** 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..19a311ec33 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 @@ -
-
-
-

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

-
+
+

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

From 47478b4bebeb011d8b28edb28a2a6c7aa65f46fc Mon Sep 17 00:00:00 2001 From: gautamjajoo Date: Tue, 7 Sep 2021 14:18:22 +0530 Subject: [PATCH 3/3] fix modal width --- .../challengesettings/challengesettings.component.scss | 2 +- .../app/components/utility/modal/modal.component.html | 7 +++---- .../app/components/utility/modal/modal.component.scss | 10 +++++++--- 3 files changed, 11 insertions(+), 8 deletions(-) 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 2d8d1b86c0..d2fc82b7d3 100644 --- a/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.scss +++ b/frontend_v2/src/app/components/challenge/challengesettings/challengesettings.component.scss @@ -18,7 +18,7 @@ } p { - margin: 0px 0px 25px 0px; + margin: 6px 0px 25px 0px; } .rangeslider { 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 19a311ec33..630291a705 100644 --- a/frontend_v2/src/app/components/utility/modal/modal.component.html +++ b/frontend_v2/src/app/components/utility/modal/modal.component.html @@ -1,11 +1,10 @@