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/07 11:40:24 UTC
[incubator-datalab] branch fix/DATALAB-2842/button-visibility-of-edge-node-recreation created (now beca36b82)
This is an automated email from the ASF dual-hosted git repository.
hshpak pushed a change to branch fix/DATALAB-2842/button-visibility-of-edge-node-recreation
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
at beca36b82 fixed condition for disable recreate btn
This branch includes the following new commits:
new beca36b82 fixed condition for disable recreate btn
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@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org
[incubator-datalab] 01/01: fixed condition for disable recreate btn
Posted by hs...@apache.org.
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 beca36b82079707df8ba4cc0c729153cf6bc2dcc
Author: Hennadii_Shpak <bo...@gmail.com>
AuthorDate: Thu Jul 7 14:40:12 2022 +0300
fixed condition for disable recreate btn
---
.../resources/webapp/src/app/core/util/checkEndpointList.ts | 11 ++++-------
1 file changed, 4 insertions(+), 7 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 721521abe..b2a3cb683 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,11 +20,8 @@
import { ModifiedEndpoint } from '../../administration/project/project.model';
export const checkEndpointList = (endpointList: ModifiedEndpoint[]): boolean => {
- return endpointList.every(({status, endpointStatus}) => {
- const isEdgeNodeInactive = status === 'TERMINATED' || status === 'FAILED';
- const isEndpointInactive = !endpointStatus || endpointStatus === 'INACTIVE';
- console.log('isEdgeNodeInactive', isEdgeNodeInactive, 'isEndpointInactive', isEndpointInactive, 'isEdgeNodeInactive && isEndpointInactive', isEdgeNodeInactive && isEndpointInactive);
- return isEdgeNodeInactive && isEndpointInactive;
- }
- );
+ 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;
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org