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

hshpak pushed a commit to branch 
fix/DATALAB-2842/button-visibility-of-edge-node-recreation
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 7b15ec11aca47e4fcd1fc4aee4eab5bf2ecc7707
Author: Hennadii_Shpak <[email protected]>
AuthorDate: Mon Jul 11 16:44:46 2022 +0300

    fixed condition for disable recreate btn
---
 .../administration/project/project-list/project-list.component.html    | 2 +-
 .../src/main/resources/webapp/src/app/core/util/checkEndpointList.ts   | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html
 
b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html
index ce81d953a..912a660f4 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html
+++ 
b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html
@@ -94,7 +94,7 @@
               </a>
             </li>
             <li
-                *ngIf="(element.areTerminatedNode || element.areStoppedNode) 
&& isEndpointAvailable"
+                *ngIf="element.areTerminatedNode && isEndpointAvailable"
                 (click)="openEdgeDialog('recreate', element)"
 
             >
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/util/checkEndpointList.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/util/checkEndpointList.ts
index b2a3cb683..4e2e0bfd9 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/util/checkEndpointList.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/util/checkEndpointList.ts
@@ -20,8 +20,7 @@
 import { ModifiedEndpoint } from '../../administration/project/project.model';
 
 export const checkEndpointList = (endpointList: ModifiedEndpoint[]): boolean 
=> {
-  const isAllEdgeNodeInactive = endpointList.every(({status}) => status === 
'TERMINATED' || status === 'FAILED');
   const isAllInactiveEdgeNodeHaveInactiveEndpoint =  
endpointList.filter(({status}) => status === 'TERMINATED' || status === 
'FAILED')
     .every(({endpointStatus}) => !endpointStatus || endpointStatus === 
'INACTIVE');
-  return !isAllEdgeNodeInactive || isAllInactiveEdgeNodeHaveInactiveEndpoint;
+  return isAllInactiveEdgeNodeHaveInactiveEndpoint;
 };


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to