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 <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
