Skip to content

Commit 7060eb8

Browse files
authored
Add button MARK ALL FOR REVIEW (vmware-archive#394)
* MARK ALL FOR REVIEW button operate * 'MARK ALL FOR REVIEW' button apply it to all types of projects * qa、ner should has it' s own Annotation Question
1 parent 18cae1e commit 7060eb8

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

annotation-app/src/app/component/projects/create-project/create-project.component.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ export class CreateProjectComponent implements OnInit {
320320
createForm(): void {
321321
if (!this.dataset) {
322322
this.dataset = DatasetUtil.init();
323-
}
323+
}
324324
this.dsDialogForm = this.formBuilder.group({
325325
projectName: [this.dataset.name || '', DatasetValidator.modelName()],
326326
projectType: [this.dataset.projectType, DatasetValidator.required()],
@@ -329,14 +329,7 @@ export class CreateProjectComponent implements OnInit {
329329
assignmentLogic: [this.dataset.assigmentLogic, ''],
330330
totalRow: [this.dataset.totalRow, DatasetValidator.validRow()],
331331
annotationDisplayName: [this.dataset.annotationDisplayName, DatasetValidator.required()],
332-
annotationQuestion: [
333-
this.dataset.projectType == 'ner'
334-
? 'Label all entity types in the given text corpus.'
335-
: this.dataset.projectType == 'qa'
336-
? 'Label all answers in the given text corpus according to the question.'
337-
: this.dataset.annotationQuestion,
338-
DatasetValidator.required(),
339-
],
332+
annotationQuestion: [this.dataset.annotationQuestion,DatasetValidator.required()],
340333
selectedDataset: ['', DatasetValidator.required()],
341334
selectedClassifier: [null, DatasetValidator.required()],
342335
selectedqueryStrategy: [null, DatasetValidator.required()],
@@ -527,6 +520,12 @@ export class CreateProjectComponent implements OnInit {
527520

528521
changeProjectType() {
529522
this.clearFormdata(1);
523+
let questesion={
524+
qa:'Label all answers in the given text corpus according to the question.',
525+
ner:'Label all entity types in the given text corpus.'
526+
}
527+
let questionTex = Object.keys(questesion).includes(this.dsDialogForm.value.projectType) ? questesion[this.dsDialogForm.value.projectType]:'What label does this ticket belong to ?'
528+
this.dsDialogForm.get('annotationQuestion').setValue(questionTex)
530529
this.getMyDatasets(this.dsDialogForm.get('projectType').value).then((res) => {});
531530
}
532531

annotation-app/src/app/component/projects/project-analyze/latest-annotation-data/latest-annotation-data.component.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h4 style="margin-bottom: 1rem">Assigned Labels Data</h4>
3131
<clr-tab>
3232
<button clrTabLink id="link1">Annotation</button>
3333
<clr-tab-content id="content1" *clrIfActive="msg.labelType == 'numericLabel'">
34-
<div *ngIf="msg.projectType === 'log'" style="margin-top: 0.5rem">
34+
<div style="margin-top: 0.5rem">
3535
<div class="btn-group btn-primary btn-icon">
3636
<button class="btn" (click)="modify(data, 'multiple')">
3737
<cds-icon shape="note" title="To modify the annotated tickets" style="margin-right: 0.3rem"></cds-icon
@@ -41,7 +41,7 @@ <h4 style="margin-bottom: 1rem">Assigned Labels Data</h4>
4141
</div>
4242
<div style="margin-bottom: 2rem">
4343
<clr-datagrid #dataGird [clrDgLoading]="loading" (clrDgRefresh)="refresh($event)" *ngIf="!firstLoadTable">
44-
<clr-dg-column *ngIf="msg.projectType === 'log'" class="ellipsis-datagrid" style="max-width: 90px">
44+
<clr-dg-column class="ellipsis-datagrid" style="max-width: 90px">
4545
<clr-checkbox-wrapper>
4646
<input
4747
type="checkbox"
@@ -67,7 +67,6 @@ <h4 style="margin-bottom: 1rem">Assigned Labels Data</h4>
6767
<ng-container>
6868
<clr-dg-row *ngFor="let dataset of previewSrs; let i = index" [clrDgItem]="dataset">
6969
<clr-dg-cell
70-
*ngIf="dataset.projectType == 'log'"
7170
class="ellipsis-datagrid previewHeight"
7271
style="max-width: 90px"
7372
>

0 commit comments

Comments
 (0)