You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by hs...@apache.org on 2022/07/01 15:33:00 UTC

[incubator-datalab] 01/01: fixed conition of disable recreate btn

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 94a47a797e7b0e0f757109fe6b825fa6610eb85d
Author: Hennadii_Shpak <bo...@gmail.com>
AuthorDate: Fri Jul 1 18:01:25 2022 +0300

    fixed conition of disable recreate btn
---
 .../main/resources/webapp/src/app/core/util/checkEndpointList.ts | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

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 99f927ddc..b50853293 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,6 +20,11 @@
 import { ModifiedEndpoint } from '../../administration/project/project.model';
 
 export const checkEndpointList = (endpointList: ModifiedEndpoint[]): boolean => {
-  return endpointList.every(({status, endpointStatus}) => (status === 'TERMINATED' || status === 'FAILED')
-    && endpointStatus === 'INACTIVE');
+  return endpointList.every(({status, endpointStatus}) => {
+      const isEdgeNodeInactive = status === 'TERMINATED' || status === 'FAILED';
+      const isEndpointInactive = !endpointStatus || endpointStatus === 'INACTIVE';
+
+      return isEdgeNodeInactive && isEndpointInactive;
+    }
+  );
 };


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