You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by of...@apache.org on 2020/01/29 15:33:03 UTC

[incubator-dlab] branch develop updated: [DLAB-1489] - Fixed issue with notebooks which are not conveyed to Resource list page

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 2cca395  [DLAB-1489] - Fixed issue with notebooks which are not conveyed to Resource list page
2cca395 is described below

commit 2cca395aef95bf7f531a1b878d605010d12570cc
Author: Oleh Fuks <ol...@gmail.com>
AuthorDate: Wed Jan 29 17:32:43 2020 +0200

    [DLAB-1489] - Fixed issue with notebooks which are not conveyed to Resource list page
---
 .../backendapi/service/impl/InfrastructureInfoServiceImpl.java     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
index 91306af..ecfe6cf 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
@@ -45,6 +45,7 @@ import org.bson.Document;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.stream.Collectors;
 import java.util.stream.StreamSupport;
 
@@ -129,15 +130,16 @@ public class InfrastructureInfoServiceImpl implements InfrastructureInfoService
 
 	private Map<String, String> getSharedInfo(EdgeInfo edgeInfo) {
 		Map<String, String> shared = new HashMap<>();
+		if (Objects.isNull(edgeInfo)) {
+			return shared;
+		}
 		shared.put("edge_node_ip", edgeInfo.getPublicIp());
 		if (edgeInfo instanceof EdgeInfoAws) {
 			EdgeInfoAws edgeInfoAws = (EdgeInfoAws) edgeInfo;
-
 			shared.put("user_own_bicket_name", edgeInfoAws.getUserOwnBucketName());
 			shared.put("shared_bucket_name", edgeInfoAws.getSharedBucketName());
 		} else if (edgeInfo instanceof EdgeInfoAzure) {
 			EdgeInfoAzure edgeInfoAzure = (EdgeInfoAzure) edgeInfo;
-
 			shared.put("user_container_name", edgeInfoAzure.getUserContainerName());
 			shared.put("shared_container_name", edgeInfoAzure.getSharedContainerName());
 			shared.put("user_storage_account_name", edgeInfoAzure.getUserStorageAccountName());
@@ -147,7 +149,6 @@ public class InfrastructureInfoServiceImpl implements InfrastructureInfoService
 			shared.put("datalake_shared_directory_name", edgeInfoAzure.getDataLakeSharedDirectoryName());
 		} else if (edgeInfo instanceof EdgeInfoGcp) {
 			EdgeInfoGcp edgeInfoGcp = (EdgeInfoGcp) edgeInfo;
-
 			shared.put("user_own_bucket_name", edgeInfoGcp.getUserOwnBucketName());
 			shared.put("shared_bucket_name", edgeInfoGcp.getSharedBucketName());
 		}


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