Skip to content

Commit bca830b

Browse files
authored
1.update readme 2.fix QA style 3.fix query project list (vmware-archive#395)
1 parent 7060eb8 commit bca830b

File tree

4 files changed

+36
-19
lines changed

4 files changed

+36
-19
lines changed

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Core features include:
1616
- Tabular classification and regresion
1717
- Images recognition with bounding boxes and polygons
1818
- Log labeling
19+
- Question answer
1920
- Active learning with uncertainly sampling to query unlabeled data
2021
- Project tracking with real time data aggregation and review process
2122
- User management panel with role-based access control
@@ -33,15 +34,8 @@ Core features include:
3334
- [DAML medium article](https://medium.com/vmware-data-ml-blog/introducing-data-annotator-for-machine-learning-e8af2f19497a)
3435
- [User guide](https://github.com/vmware/data-annotator-for-machine-learning/wiki/DAML-User-Guide)
3536
- [Tutorial](https://github.com/vmware/data-annotator-for-machine-learning/wiki/Tutorial:-Using-DAML-to-Label-the-Sentiment-of--VMware-Reddit-and-Twitter-Comments)
37+
- [DAML release note](https://github.com/vmware/data-annotator-for-machine-learning/releases)
3638

37-
## DAML upgrade
38-
39-
- DAML upgrade to v3.0.0 that mainly raise UI/UX to a higher standard
40-
- [DAML v3.0.0 release note](https://github.com/vmware/data-annotator-for-machine-learning/releases/tag/v3.0.0). The latest code saved in branch master.
41-
- [DAML versions older than v3.0.0 releases](https://github.com/vmware/data-annotator-for-machine-learning/releases). The last version v2.1.0 (which still keep our old UI style) before v3.0.0 is saved in branch DAML-v2.1.0.
42-
- As for DAML UI upgrade, our e2e code also updated
43-
- The latest e2e code saved in branch e2e-test.
44-
- The old UI e2e code saved in branch DAML-v2.1.0-e2e.
4539

4640
## What is included
4741

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ <h3 style="word-break: break-all">{{ projectInfo?.ticketDescription }}</h3>
326326
<!-- here is QA annotation content -->
327327
<div
328328
*ngIf="projectType === 'qa'"
329-
class="txtBox"
329+
class="qaBox"
330330
[ngStyle]="{ height: textBoxResizedHeight }"
331331
(mousedown)="resizeBox()"
332332
(onmousedown)="resizeBox()"
@@ -713,15 +713,15 @@ <h4 style="margin-top: 2rem; margin-left: 0.5rem; margin-bottom: 1rem; font-weig
713713
<ng-container *ngFor="let spanText of mapCurrentAnswerList(item)">
714714
<ul
715715
class="list spanSelected"
716-
style="display: flex; margin-top: -0.2rem; margin-bottom: -0.5rem"
716+
style="display: flex; margin-top: -0.2rem; margin-bottom: -0.3rem"
717717
*ngIf="spanText.label == item"
718718
(mouseenter)="mouseenterMark($event, spanText)"
719719
(mouseleave)="mouseleaveMark($event, spanText)"
720720
>
721721
<li (click)="clickShowMark($event, spanText)">
722722
{{ spanText.text }}
723723
</li>
724-
<span class="clear" style="position: static" (click)="clickClearMark($event, spanText)"
724+
<span class="qaClear" style="position: static" (click)="clickClearMark($event, spanText)"
725725
>x
726726
</span>
727727
</ul>

annotation-app/src/app/component/projects/project-analyze/project-analyze.component.scss

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,23 @@ label .label-leftBoard {
441441
z-index: 1000;
442442
}
443443

444+
.qaClear {
445+
position: absolute;
446+
margin-top: 0.2rem;
447+
margin-left: 0.2rem;
448+
background-color: transparent;
449+
color: transparent;
450+
width: 18px;
451+
height: 18px;
452+
text-align: center;
453+
line-height: 15px;
454+
user-select: none;
455+
border-radius: 50%;
456+
font-size: 1.5em;
457+
transition: opacity 0.1s ease;
458+
z-index: 1000;
459+
}
460+
444461
.invalidAlert {
445462
position: absolute;
446463
top: -0.9rem;
@@ -512,6 +529,13 @@ label .label-leftBoard {
512529
resize: vertical;
513530
}
514531

532+
.qaBox {
533+
overflow: auto;
534+
padding-bottom: 3rem;
535+
height: 10rem;
536+
resize: vertical;
537+
}
538+
515539
::ng-deep .textBox {
516540
overflow: auto;
517541
max-height: 50vh;
@@ -1000,8 +1024,7 @@ label .label-leftBoard {
10001024

10011025
.answerList {
10021026
overflow: auto;
1003-
min-height: 2em;
1004-
max-height: 5em;
1027+
height: 5em;
10051028
resize: vertical;
10061029
font-size: 0.77em;
10071030
padding: 1px;

annotation-service/services/project.service.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ async function getProjects(req) {
3030

3131
if (src == SRCS.ANNOTATE) {
3232
console.log(`[ PROJECT ] Service query current annotator project list`);
33-
const annotateConditions = { annotator: { $regex: email } };
34-
const logReviewConditions = { creator: { $regex: email }, annotator: { $not: { $size: 0 } } };
33+
const annotateConditions = { annotator: email };
34+
const logReviewConditions = { creator: email, annotator: { $not: { $size: 0 } } };
3535
condition = { $or: [annotateConditions, logReviewConditions] };
3636
} else if (src == SRCS.PROJECTS && user.role != "Annotator") {
37-
condition = { creator: { $regex: email } };
37+
condition = { creator: email };
3838
} else if (src == SRCS.ADMIN && user.role == "Admin") {
3939
condition = {};
4040
} else if (src == SRCS.COMMUNITY) {
@@ -56,7 +56,7 @@ async function getProjects(req) {
5656

5757
async function getProjectByAnnotator(req) {
5858
console.log(`[ PROJECT ] Service query project name by annotator: ${req.auth.email}`);
59-
const condition = { annotator: { $regex: req.auth.email } };
59+
const condition = { annotator: req.auth.email };
6060
const columns = "projectName";
6161
return mongoDb.findByConditions(ProjectModel, condition, columns);
6262
}
@@ -559,7 +559,7 @@ async function getReviewList(req) {
559559
const user = req.auth.email;
560560
await validator.checkAnnotator(user);
561561

562-
const conditions = { creator: { $regex: user }, projectType: PROJECTTYPE.LOG };
562+
const conditions = { creator: user, projectType: PROJECTTYPE.LOG };
563563
const options = { sort: { updatedDate: -1 } };
564564
return mongoDb.findByConditions(ProjectModel, conditions, null, options);
565565
}
@@ -1052,7 +1052,7 @@ async function getProjectsTextTabular(email) {
10521052
{ projectType: PROJECTTYPE.TABULAR }
10531053
];
10541054
condition.$or = [
1055-
{ annotator: { $regex: email } },
1055+
{ annotator: email },
10561056
{ assignSlackChannels: { $exists: true } }
10571057
];
10581058
return mongoDb.findByConditions(ProjectModel, condition, project, options);

0 commit comments

Comments
 (0)