You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dg...@apache.org on 2020/02/12 10:43:51 UTC
[incubator-dlab] branch develop updated: [DLAB-1534]: Added
possibility to choose the same endpoint after edge termination on UI
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/develop by this push:
new 1f2b68b [DLAB-1534]: Added possibility to choose the same endpoint after edge termination on UI
1f2b68b is described below
commit 1f2b68bd41e1d3fe4c424f42e770e689d9d2aa61
Author: Dmytro Gnatyshyn <di...@ukr.net>
AuthorDate: Wed Feb 12 12:43:36 2020 +0200
[DLAB-1534]: Added possibility to choose the same endpoint after edge termination on UI
---
.../project/project-form/project-form.component.ts | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 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 683e7d7..6c095bd 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
@@ -29,7 +29,7 @@ import { CheckUtils, FileUtils, PATTERNS } from '../../../core/util';
import { Project } from '../project.component';
import { DICTIONARY } from '../../../../dictionary/global.dictionary';
-export interface GenerateKey { privateKey: string, publicKey: string };
+export interface GenerateKey { privateKey: string; publicKey: string; }
@Component({
selector: 'project-form',
@@ -139,7 +139,7 @@ export class ProjectFormComponent implements OnInit {
}
public selectOptions(list, key, select?) {
- let filter = key === 'endpoints' ? list.map(el => el.name) : list;
+ const filter = key === 'endpoints' ? list.map(el => el.name) : list;
this.projectForm.controls[key].setValue(select ? filter : []);
}
@@ -156,8 +156,7 @@ export class ProjectFormComponent implements OnInit {
}
public editSpecificProject(item) {
- const endpoints = item.endpoints.map((endpoint: any) => endpoint.name);
-
+ const endpoints = item.endpoints.filter(endpoint => endpoint.status !== 'TERMINATED').map((endpoint: any) => endpoint.name);
this.projectForm = this._fb.group({
'key': [''],
'name': [item.name, Validators.required],
@@ -170,7 +169,11 @@ export class ProjectFormComponent implements OnInit {
isDisabled(endpoint: any): boolean {
if (this.item) {
- const endpoints = this.item.endpoints.map((item: any) => item.name);
+ const endpoints = this.item.endpoints.map((item: any) => {
+ if (item.status !== 'TERMINATED') {
+ return item.name;
+ }
+ });
return endpoints.includes(endpoint);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org