Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The project includes three components:

- [**_annotation-app_**](./annotation-app): Angular application built with [Angular 8.x](https://angular.io/guide/router-tutorial)
- [**_annotation-app_**](./annotation-app): Angular application built with [Angular v11](https://angular.io/docs)
- [**_annotation-service_**](./annotation-service): Backend services built with [Node](https://nodejs.org/en/), [mongodb](https://www.mongodb.com/download-center/community), [express](https://www.npmjs.com/package/express)
- [**_active-learning-service_**](./active-learning-service): Django application providing active learning api built with [Python](https://www.python.org/downloads/) and [Django](https://www.djangoproject.com/) and [modAL](https://modal-python.readthedocs.io/en/latest/#) library for pool-based uncertainty sampling to rank the unlabelled data

Expand Down
2 changes: 1 addition & 1 deletion annotation-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2021 VMware, Inc.
# Copyright 2019-2022 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

### STAGE 1: Build ###
Expand Down
2 changes: 1 addition & 1 deletion annotation-app/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# Copyright 2019-2021 VMware, Inc.
# Copyright 2019-2022 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

## Substitutes env variables in main.*.js bundle
Expand Down
2 changes: 1 addition & 1 deletion annotation-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion annotation-app/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2019-2021 VMware, Inc.
<!-- Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0 -->

<clr-main-container>
Expand Down
2 changes: 1 addition & 1 deletion annotation-app/src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/
2 changes: 1 addition & 1 deletion annotation-app/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
2 changes: 1 addition & 1 deletion annotation-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
2 changes: 1 addition & 1 deletion annotation-app/src/app/app.routing.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2019-2021 VMware, Inc.
<!-- Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0 -->

<div class="container mainArea">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
6 changes: 3 additions & 3 deletions annotation-app/src/app/components/admin/admin.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down Expand Up @@ -350,7 +350,7 @@ export class AdminComponent implements OnInit {
generateDoneTime: res.updateTime,
format: res.format,
downloadUrl: this.env.config.enableAWSS3
? new Buffer(res.file, 'base64').toString()
? Buffer.from(res.file, 'base64').toString()
: res.file,
datasets: this.datasets,
id: e.id,
Expand Down Expand Up @@ -542,7 +542,7 @@ export class AdminComponent implements OnInit {
this.infoMessage =
'Dataset with annotations is already been generated. Please refresh the page.';
this.downloadUrl = this.env.config.enableAWSS3
? new Buffer(e.Body.file, 'base64').toString()
? Buffer.from(e.Body.file, 'base64').toString()
: e.Body.file;
this.downloadProject();
this.getProjects();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2019-2021 VMware, Inc.
<!-- Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0 -->

<div class="spinner-container" style="text-align: center">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2019-2021 VMware, Inc.
<!-- Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0 -->

<div class="container mainArea">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down Expand Up @@ -137,7 +137,7 @@ export class DatasetsSharingComponent implements OnInit {
latestAnnotationTime: e.updatedDate,
generateDoneTime: res.updateTime,
downloadUrl: this.env.config.enableAWSS3
? new Buffer(res.file, 'base64').toString()
? Buffer.from(res.file, 'base64').toString()
: res.file,
datasets: this.datasets,
id: e.id,
Expand Down Expand Up @@ -187,7 +187,7 @@ export class DatasetsSharingComponent implements OnInit {
this.infoMessage =
'Dataset with annotations is already been generated. Please refresh the page.';
this.downloadUrl = this.env.config.enableAWSS3
? new Buffer(e.Body.file, 'base64').toString()
? Buffer.from(e.Body.file, 'base64').toString()
: e.Body.file;
this.downloadProject();
this.getProjects();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2019-2021 VMware, Inc.
<!-- Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0 -->

<div class="modal">
Expand Down Expand Up @@ -484,6 +484,24 @@ <h3 class="modal-title">Edit Project</h3>
</form>
</div>
<div>
<clr-tooltip *ngIf="inputLabelErrMsg">
<clr-icon
clrTooltipTrigger
shape="error-standard"
size="18"
style="color: red"
class="valid-tooltip"
>
</clr-icon>
<clr-tooltip-content
class="error-tooltip"
clrPosition="bottom-right"
clrSize="md"
*clrIfOpen
>
<span>{{inputLabelErrMsg}}</span>
</clr-tooltip-content>
</clr-tooltip>
<clr-tooltip *ngIf="labelType === 'numericLabel' && isMultipleLabel && inputIsNull">
<clr-icon
clrTooltipTrigger
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down Expand Up @@ -80,6 +80,7 @@ export class EditProjectComponent implements OnInit {
inputSlackChannels: any = [];
showLabel: boolean = true;
isShowSlack: boolean = false;
inputLabelErrMsg: string;

constructor(
private avaService: AvaService,
Expand Down Expand Up @@ -164,7 +165,7 @@ export class EditProjectComponent implements OnInit {
this.categoryList.push(flag);
});
}
if (this.msg.assignSlackChannels.length > 0) {
if (this.msg.assignSlackChannels && this.msg.assignSlackChannels.length > 0) {
this.slackList = this.msg.assignSlackChannels;
this.msg.assignSlackChannels.forEach((element) => {
this.inputSlackChannels.push(element.slackName);
Expand Down Expand Up @@ -541,8 +542,15 @@ export class EditProjectComponent implements OnInit {
}

onEnterLabel(e) {
if (e && this.inputLabelValidation == false) {
const flag = { status: 'new', originalLabel: e, editLabel: e };
// to check format comma
if (/[,,]/g.test(e.trim())) {
this.inputLabelErrMsg = 'Wrong format! Not allow comma.';
return;
} else {
this.inputLabelErrMsg = '';
}
if (e && this.inputLabelValidation == false && !this.inputLabelErrMsg) {
const flag = { status: 'new', originalLabel: e.trim(), editLabel: e.trim() };
this.categoryList.push(flag);
this.inputNewLabel = null;
}
Expand All @@ -554,7 +562,7 @@ export class EditProjectComponent implements OnInit {

onLabelKeyUp(e) {
for (let i = 0; i < this.categoryList.length; i++) {
if (this.categoryList[i].editLabel == e.target.value) {
if (this.categoryList[i].editLabel == e.target.value.trim()) {
this.inputLabelValidation = true;
return;
} else {
Expand All @@ -578,9 +586,10 @@ export class EditProjectComponent implements OnInit {
this.activeClickInput = null;
}

if (e.editLabel == '' || this.inputLabelValidation == true) {
if (e.editLabel == '' || this.inputLabelValidation == true || this.inputLabelErrMsg) {
this.activeClickInput = null;
e.editLabel = e.originalLabel;
this.inputLabelErrMsg = '';
}
}

Expand All @@ -595,7 +604,7 @@ export class EditProjectComponent implements OnInit {
});
let i = 0;
flag.forEach((element) => {
if (element == e) {
if (element == e.trim()) {
i = i + 1;
}
});
Expand All @@ -604,6 +613,13 @@ export class EditProjectComponent implements OnInit {
} else {
this.inputLabelValidation = false;
}
// to check format comma
if (/[,,]/g.test(e.trim())) {
this.inputLabelErrMsg = 'Wrong format! Not allow comma.';
return;
} else {
this.inputLabelErrMsg = '';
}
}

minUpdate(e) {
Expand Down
2 changes: 1 addition & 1 deletion annotation-app/src/app/components/faq/faq.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2019-2021 VMware, Inc.
<!-- Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0 -->

<div class="clr-row">
Expand Down
2 changes: 1 addition & 1 deletion annotation-app/src/app/components/faq/faq.component.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
2 changes: 1 addition & 1 deletion annotation-app/src/app/components/faq/faq.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2019-2021 VMware, Inc.
<!-- Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0 -->

<div class="footer">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2019-2021 VMware, Inc.
<!-- Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0 -->

<div class="container mainArea">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2019-2021 VMware, Inc.
<!-- Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0 -->

<clr-header>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/
clr-header {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
2 changes: 1 addition & 1 deletion annotation-app/src/app/components/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2019-2021 VMware, Inc.
<!-- Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0 -->

<div class="clr-row">
Expand Down
2 changes: 1 addition & 1 deletion annotation-app/src/app/components/home/home.component.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
2 changes: 1 addition & 1 deletion annotation-app/src/app/components/home/home.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2019-2021 VMware, Inc.
<!-- Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0 -->

<div class="spinner-container" style="text-align: center">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
2 changes: 1 addition & 1 deletion annotation-app/src/app/components/login/login.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019-2021 VMware, Inc.
Copyright 2019-2022 VMware, Inc.
SPDX-License-Identifier: Apache-2.0
*/

Expand Down
Loading