-
Notifications
You must be signed in to change notification settings - Fork 803
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
Move test annotations to edit phase section #3570
Changes from 3 commits
4a69029
864110a
ba68584
6d2d3db
89be7db
5bc25ee
1a47a47
aeec81c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,6 +137,15 @@ <h5 class="fw-light">Challenge Settings</h5> | |
<!-- Edit Phase Details --> | ||
<mat-tab label="Phase and Leaderboard Details"> | ||
<div class="row settings-section"> | ||
<div class="col-md-11 col-sm-11 col-xs-10" *ngIf="isChallengeHost"> | ||
<div class="fw-light"> | ||
<p class="fs-16"> | ||
<strong> Note: </strong> For test annotations > 100MB, please use | ||
<a href=" https://cli.eval.ai/#challenge-annotations"><strong class="blue-text"> evalai-cli </strong></a> to update the test annotations. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we please use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated |
||
<a (click)="showCliInstructions()"><strong class="blue-text">View Instructions</strong></a> | ||
</p> | ||
</div> | ||
</div> | ||
<div class="col-lg-3 col-md-4 col-sm-3 col-xs-3"> | ||
<span class="fw-light fs-18">Edit Phase</span> | ||
</div> | ||
|
@@ -171,6 +180,13 @@ <h5 class="fw-light">Challenge Settings</h5> | |
<a class="pointer fs-20" (click)="toggleSubmissionVisibility()"> | ||
<i class="{{ submissionVisibility.icon }}" aria-hidden="true"> </i> | ||
</a> | ||
<br /><br /> | ||
<span class="fs-16 fw-light"> | ||
<strong class="text-light-black">Test Annotations </strong> | ||
</span> | ||
<a class="pointer fs-15" (click)="editTestAnnotations()"> | ||
<i class="fa fa-file" aria-hidden="true"> </i> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use the upload icon for test annotations There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
</a> | ||
</div> | ||
|
||
</div> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -730,6 +730,19 @@ export class ChallengesettingsComponent implements OnInit, OnDestroy { | |
}; | ||
} | ||
|
||
showCliInstructions() { | ||
const SELF = this; | ||
/** | ||
* Parameters of the modal | ||
*/ | ||
const PARAMS = { | ||
title: 'Cli Instructions for updating test annotations', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Title should be |
||
label: 'evaluation_details', | ||
isCliInstructions: true | ||
}; | ||
SELF.globalService.showModal(PARAMS); | ||
} | ||
|
||
/** | ||
* Edit Phase Details function | ||
*/ | ||
|
@@ -914,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 -> | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gautamjajoo the note should appear at the end of
Edit phase
section. It should be show below theTest annotaitons
upload optionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!