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:59:09 UTC

[incubator-dlab] branch DLAB-1534 created (now 1663aee)

This is an automated email from the ASF dual-hosted git repository.

dgnatyshyn pushed a change to branch DLAB-1534
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


      at 1663aee  [DLAB-1534]: Added possibility to choose the same endpoint after edge termination on UI

This branch includes the following new commits:

     new 1663aee  [DLAB-1534]: Added possibility to choose the same endpoint after edge termination on UI

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 01/01: [DLAB-1534]: Added possibility to choose the same endpoint after edge termination on UI

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dgnatyshyn pushed a commit to branch DLAB-1534
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 1663aee38f1c360bc5e3167c4c9efd67362453dc
Author: Dmytro Gnatyshyn <di...@ukr.net>
AuthorDate: Wed Feb 12 12:58:52 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