You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by bh...@apache.org on 2019/06/27 11:02:10 UTC

[incubator-dlab] branch feature/projects updated: DLAB-746 fixed bug connected with project resource creation

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

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


The following commit(s) were added to refs/heads/feature/projects by this push:
     new 2581895  DLAB-746 fixed bug connected with project resource creation
2581895 is described below

commit 258189519cc976abe9057a664d340b25cc6eb6a5
Author: bhliva <bo...@epam.com>
AuthorDate: Thu Jun 27 12:36:39 2019 +0300

    DLAB-746 fixed bug connected with project resource creation
---
 .../epam/dlab/dto/exploratory/ExploratoryBaseDTO.java   |  2 +-
 .../epam/dlab/dto/exploratory/ExploratoryCreateDTO.java | 17 +++++++++--------
 .../backendapi/service/impl/ExploratoryServiceImpl.java |  2 +-
 .../project/project-form/project-form.component.ts      |  2 +-
 4 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java
index 1c68c75..6550320 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java
@@ -28,7 +28,7 @@ public class ExploratoryBaseDTO<T extends ExploratoryBaseDTO<?>> extends Resourc
 	private final T self = (T) this;
 	@JsonProperty("notebook_image")
 	private String notebookImage;
-	@JsonProperty("project")
+	@JsonProperty("project_name")
 	private String project;
 
 	public String getNotebookImage() {
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryCreateDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryCreateDTO.java
index 0a4c407..7f87951 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryCreateDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryCreateDTO.java
@@ -39,9 +39,7 @@ public class ExploratoryCreateDTO<T extends ExploratoryCreateDTO<?>> extends Exp
 	private List<ClusterConfig> clusterConfig;
 	@JsonProperty("tags")
 	private Map<String, String> tags;
-	@JsonProperty("project")
-	private String project;
-	@JsonProperty("endpoint")
+	@JsonProperty("endpoint_name")
 	private String endpoint;
 
 	/**
@@ -84,11 +82,6 @@ public class ExploratoryCreateDTO<T extends ExploratoryCreateDTO<?>> extends Exp
 		return self;
 	}
 
-	public T withProject(String project) {
-		this.project = project;
-		return self;
-	}
-
 	public String getImageName() {
 		return imageName;
 	}
@@ -102,6 +95,14 @@ public class ExploratoryCreateDTO<T extends ExploratoryCreateDTO<?>> extends Exp
 		return self;
 	}
 
+	public String getEndpoint() {
+		return endpoint;
+	}
+
+	public void setEndpoint(String endpoint) {
+		this.endpoint = endpoint;
+	}
+
 	public List<ClusterConfig> getClusterConfig() {
 		return clusterConfig;
 	}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImpl.java
index a043b52..9ce4a48 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImpl.java
@@ -103,7 +103,7 @@ public class ExploratoryServiceImpl implements ExploratoryService {
 			isAdded = true;
 			final ExploratoryGitCredsDTO gitCreds = gitCredsDAO.findGitCreds(userInfo.getName());
 			log.debug("Created exploratory environment {} for user {}", exploratory.getName(), userInfo.getName());
-			final String uuid = provisioningService.post(EXPLORATORY_CREATE, userInfo.getAccessToken(),
+				final String uuid = provisioningService.post(EXPLORATORY_CREATE, userInfo.getAccessToken(),
 					requestBuilder.newExploratoryCreate(exploratory, userInfo, gitCreds, userInstanceDTO.getTags()),
 					String.class);
 			requestId.put(userInfo.getName(), uuid);
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
index 3c2627b..c3f7297 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
@@ -102,7 +102,7 @@ export class ProjectFormComponent implements OnInit {
 
     if ($event.target.files && $event.target.files.length) {
       const [file] = $event.target.files;
-      reader.readAsDataURL(file);
+      reader.readAsBinaryString(file);
 
       reader.onload = () => {
         this.projectForm.patchValue({


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