You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/10/01 10:08:46 UTC
[incubator-dlab] 03/08: [DLAB-1163]: fixed validation of endpoints
selection on edit
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch DLAB-terraform
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 2f573a228f01ecc3b72a6049ed3669bbdcac12a0
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Tue Oct 1 12:52:19 2019 +0300
[DLAB-1163]: fixed validation of endpoints selection on edit
---
.../administration/project/project-form/project-form.component.ts | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
index 6823de3..009456c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
@@ -152,18 +152,22 @@ export class ProjectFormComponent implements OnInit {
}
public editSpecificProject(item: Project) {
+ let endpoints = item.endpoints.map((item: any) => item.name);
this.projectForm = this._fb.group({
'key': [''],
'name': [item.name, Validators.required],
- 'endpoints': [item.endpoints.map((item: any) => item.name)],
+ 'endpoints': [endpoints],
'tag': [item.tag, Validators.required],
'groups': [item.groups, Validators.required]
});
}
isDisabled(endpoint: any): boolean {
- return this.item && this.item.endpoints.includes(endpoint);
+ if (this.item) {
+ const endpoints = this.item.endpoints.map((item: any) => item.name);
+ return endpoints.includes(endpoint);
+ }
}
private getLabel(file: File): string {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org