[incubator-dlab] 01/01: Merge pull request #489 from apache/integration-tests-ofuks-1
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch feature-integration-tests in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 96bff5e9f4b4eff97965275815d6cb16adf75204 Merge: ec176b4 c7710c6 Author: bhliva AuthorDate: Fri Dec 13 16:03:57 2019 +0200 Merge pull request #489 from apache/integration-tests-ofuks-1 Added project feature .../java/org/apache/dlab/dto/CreateProjectDTO.java | 19 .../org/apache/dlab/dto/EndpointStatusDTO.java | 24 + .../java/org/apache/dlab/dto/ProjectKeyDTO.java| 15 +++ .../java/org/apache/dlab/dto/ProjectStatusDTO.java | 13 +++ .../src/test/java/dlab/Constants.java | 1 + .../src/test/java/dlab/project/ProjectSteps.java | 115 ++--- .../src/test/resources/dlab/project.feature| 13 ++- 7 files changed, 184 insertions(+), 16 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch feature-integration-tests updated (ec176b4 -> 96bff5e)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch feature-integration-tests in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from ec176b4 DLAB-000 added project feature add 006ad74 Added project feature add c7710c6 Code review new 96bff5e Merge pull request #489 from apache/integration-tests-ofuks-1 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. Summary of changes: .../java/org/apache/dlab/dto/CreateProjectDTO.java | 19 .../org/apache/dlab/dto/EndpointStatusDTO.java | 24 + .../dto/{EndpointDTO.java => ProjectKeyDTO.java} | 10 +- .../java/org/apache/dlab/dto/ProjectStatusDTO.java | 13 +++ .../src/test/java/dlab/Constants.java | 1 + .../src/test/java/dlab/project/ProjectSteps.java | 115 ++--- .../src/test/resources/dlab/project.feature| 13 ++- 7 files changed, 172 insertions(+), 23 deletions(-) create mode 100644 integration-tests-cucumber/src/main/java/org/apache/dlab/dto/CreateProjectDTO.java create mode 100644 integration-tests-cucumber/src/main/java/org/apache/dlab/dto/EndpointStatusDTO.java copy integration-tests-cucumber/src/main/java/org/apache/dlab/dto/{EndpointDTO.java => ProjectKeyDTO.java} (57%) create mode 100644 integration-tests-cucumber/src/main/java/org/apache/dlab/dto/ProjectStatusDTO.java - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch feature-integration-tests updated: DLAB-000 added project feature
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch feature-integration-tests in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/feature-integration-tests by this push: new ec176b4 DLAB-000 added project feature ec176b4 is described below commit ec176b45e5750d19dd9e5c77889ffeb3e85db467 Author: bhliva AuthorDate: Tue Dec 10 16:16:57 2019 +0200 DLAB-000 added project feature --- .../src/test/java/dlab/project/ProjectSteps.java | 35 ++ .../src/test/resources/dlab/project.feature| 6 ++-- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/integration-tests-cucumber/src/test/java/dlab/project/ProjectSteps.java b/integration-tests-cucumber/src/test/java/dlab/project/ProjectSteps.java new file mode 100644 index 000..ed1b207 --- /dev/null +++ b/integration-tests-cucumber/src/test/java/dlab/project/ProjectSteps.java @@ -0,0 +1,35 @@ +package dlab.project; + +import cucumber.api.java.en.And; +import cucumber.api.java.en.Given; +import cucumber.api.java.en.Then; +import cucumber.api.java.en.When; + +import static org.junit.Assert.fail; + +public class ProjectSteps { + + @Then("User wait maximum {string} minutes while project is creating") + public void userWaitMaximumMinutesWhileProjectIsCreating(String arg0) { + fail("Not implemented"); + } + + @When("User send create new project request") + public void userSendCreateNewProjectRequest() { + } + + @And("User try to create new project with name {string}, endpoints {string}, groups {string} " + + "and key {string}") + public void userTryToCreateNewProjectWithNameEndpointsGroupsAndKey(String arg0, String arg1, String arg2, + String arg3) { + } + + @Given("There is no project with name {string} in DLab") + public void thereIsNoProjectWithNameInDLab(String arg0) { + } + + @Then("Status code is {int}") + public void statusCodeIs(int arg0) { + + } +} diff --git a/integration-tests-cucumber/src/test/resources/dlab/project.feature b/integration-tests-cucumber/src/test/resources/dlab/project.feature index 3694a2b..e717e63 100644 --- a/integration-tests-cucumber/src/test/resources/dlab/project.feature +++ b/integration-tests-cucumber/src/test/resources/dlab/project.feature @@ -6,8 +6,8 @@ Feature: Project management in DLab Given There is no project with name "" in DLab And User try to create new project with name "", endpoints "", groups "" and key "" When User send create new project request -Then User wait maximum minutes while project is creating -Then Response status code is 200 +Then User wait maximum "" minutes while project is creating +Then Status code is 200 Examples: | name | endpoints | groups | key | timeout | - | prj1 | test | $anyyser | publicKeyContent | 10 \ No newline at end of file + | prj1 | test | $anyyser | publicKeyContent | 10 | \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch feature-integration-tests updated: DLAB-000 added project feature
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch feature-integration-tests in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/feature-integration-tests by this push: new f99f07a DLAB-000 added project feature f99f07a is described below commit f99f07ab16adfc2e6471a4f81198d3be03df2bc3 Author: bhliva AuthorDate: Tue Dec 10 16:16:57 2019 +0200 DLAB-000 added project feature --- .../src/test/resources/dlab/project.feature | 13 + 1 file changed, 13 insertions(+) diff --git a/integration-tests-cucumber/src/test/resources/dlab/project.feature b/integration-tests-cucumber/src/test/resources/dlab/project.feature new file mode 100644 index 000..3694a2b --- /dev/null +++ b/integration-tests-cucumber/src/test/resources/dlab/project.feature @@ -0,0 +1,13 @@ +Feature: Project management in DLab + Such feature allowed to manage projects inside DLab + + Scenario Outline: Create new project when it does not exist + +Given There is no project with name "" in DLab +And User try to create new project with name "", endpoints "", groups "" and key "" +When User send create new project request +Then User wait maximum minutes while project is creating +Then Response status code is 200 +Examples: + | name | endpoints | groups | key | timeout | + | prj1 | test | $anyyser | publicKeyContent | 10 \ No newline at end of file - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: DLAB-000 removed mongo dependency fron DLab
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch feature-integration-tests in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 84e7a536866b2d55177a565ee9800227f1475f74 Author: bhliva AuthorDate: Tue Dec 10 16:01:47 2019 +0200 DLAB-000 removed mongo dependency fron DLab --- integration-tests-cucumber/pom.xml | 5 - .../main/java/org/apache/dlab/mongo/MongoDBHelper.java | 14 -- .../src/test/java/dlab/endpoint/EndpointSteps.java | 14 +- .../src/test/resources/config.properties | 14 +++--- .../src/test/resources/dlab/endpoint.feature | 16 +++- 5 files changed, 27 insertions(+), 36 deletions(-) diff --git a/integration-tests-cucumber/pom.xml b/integration-tests-cucumber/pom.xml index d96a492..9e32c08 100644 --- a/integration-tests-cucumber/pom.xml +++ b/integration-tests-cucumber/pom.xml @@ -35,11 +35,6 @@ lombok 1.18.8 - -org.mongodb -mongo-java-driver -3.10.2 - diff --git a/integration-tests-cucumber/src/main/java/org/apache/dlab/mongo/MongoDBHelper.java b/integration-tests-cucumber/src/main/java/org/apache/dlab/mongo/MongoDBHelper.java deleted file mode 100644 index 11e4dea..000 --- a/integration-tests-cucumber/src/main/java/org/apache/dlab/mongo/MongoDBHelper.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.apache.dlab.mongo; - -import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoClients; -import org.apache.dlab.util.PropertyHelper; - -public class MongoDBHelper { - private static final MongoClient client = MongoClients - .create(PropertyHelper.read("mongo.connection.string")); - - public static void cleanCollection(String collection) { - client.getDatabase(PropertyHelper.read("mongo.db.name")).getCollection(collection).drop(); - } -} diff --git a/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java b/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java index 624b1ca..316e521 100644 --- a/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java +++ b/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java @@ -9,7 +9,6 @@ import cucumber.api.java.en.Then; import cucumber.api.java.en.When; import dlab.util.KeycloakUtil; import org.apache.dlab.dto.EndpointDTO; -import org.apache.dlab.mongo.MongoDBHelper; import org.apache.dlab.util.JacksonMapper; import java.net.URI; @@ -40,10 +39,9 @@ public class EndpointSteps { response = request.post(API_URI + "endpoint"); } - @Given("There is no endpoints in DLab") - public void thereIsNoEndpointsInDLab() { - MongoDBHelper.cleanCollection("endpoints"); - + @Given("There is no endpoint with name {string} in DLab") + public void thereIsNoEndpointWithNameInDLab(String name) throws URISyntaxException { + assertThat(authenticatedRequest().get(new URI(API_URI + "endpoint/" + name)).getStatusCode(), equalTo(404)); } @Then("Response status code is {int}") @@ -90,6 +88,12 @@ public class EndpointSteps { assertThat("test2", equalTo(endpoints[1].getName())); } + @And("Remove endpoint with name {string}") + public void removeEndpointWithName(String name) { + final Response response = authenticatedRequest().delete(API_URI + "endpoint/" + name); + assertThat(response.getStatusCode(), equalTo(200)); + } + private RequestSpecification authenticatedRequest() { return given() .auth() diff --git a/integration-tests-cucumber/src/test/resources/config.properties b/integration-tests-cucumber/src/test/resources/config.properties index 49933a9..1f113d9 100644 --- a/integration-tests-cucumber/src/test/resources/config.properties +++ b/integration-tests-cucumber/src/test/resources/config.properties @@ -1,7 +1,7 @@ -dlab.api.base.uri= -mongo.connection.string= -mongo.db.name= -keycloak.serverUrl= -keycloak.realm= -keycloak.clientId= -keycloak.clientSecret= \ No newline at end of file +dlab.api.base.uri=http://ec2-44-228-217-167.us-west-2.compute.amazonaws.com/api/ +mongo.connection.string=mongodb://admin:CVZ0vVMaL5@localhost:27018/dlabdb +mongo.db.name=dlabdb +keycloak.serverUrl=http://52.11.45.11:8080/auth +keycloak.realm=dlab +keycloak.clientId=bhliva1012a-ui +keycloak.clientSecret=83025cea-4121-42ea-9044-f5539fbe857f \ No newline at end of file diff --git a/integration-tests-cucumber/src/test/resources/dlab/endpoint.feature b/integration-tests-cucumber/src/test/resources/dlab/endpoint.feature
[incubator-dlab] branch feature-integration-tests updated (eb8c033 -> 84e7a53)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch feature-integration-tests in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. discard eb8c033 DLAB-000 removed mongo dependency fron DLab new 84e7a53 DLAB-000 removed mongo dependency fron DLab This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (eb8c033) \ N -- N -- N refs/heads/feature-integration-tests (84e7a53) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. 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. Summary of changes: .../src/test/java/dlab/endpoint/EndpointSteps.java| 4 ++-- integration-tests-cucumber/src/test/resources/dlab/endpoint.feature | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch feature-integration-tests updated: DLAB-000 removed mongo dependency fron DLab
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch feature-integration-tests in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/feature-integration-tests by this push: new eb8c033 DLAB-000 removed mongo dependency fron DLab eb8c033 is described below commit eb8c0338a2ea5796b5a879ecfc8266e56cb283ea Author: bhliva AuthorDate: Tue Dec 10 16:01:47 2019 +0200 DLAB-000 removed mongo dependency fron DLab --- integration-tests-cucumber/pom.xml | 5 - .../src/main/java/org/apache/dlab/mongo/MongoDBHelper.java | 14 -- .../src/test/java/dlab/endpoint/EndpointSteps.java | 14 +- .../src/test/resources/config.properties | 14 +++--- .../src/test/resources/dlab/endpoint.feature | 14 +- 5 files changed, 25 insertions(+), 36 deletions(-) diff --git a/integration-tests-cucumber/pom.xml b/integration-tests-cucumber/pom.xml index d96a492..9e32c08 100644 --- a/integration-tests-cucumber/pom.xml +++ b/integration-tests-cucumber/pom.xml @@ -35,11 +35,6 @@ lombok 1.18.8 - -org.mongodb -mongo-java-driver -3.10.2 - diff --git a/integration-tests-cucumber/src/main/java/org/apache/dlab/mongo/MongoDBHelper.java b/integration-tests-cucumber/src/main/java/org/apache/dlab/mongo/MongoDBHelper.java deleted file mode 100644 index 11e4dea..000 --- a/integration-tests-cucumber/src/main/java/org/apache/dlab/mongo/MongoDBHelper.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.apache.dlab.mongo; - -import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoClients; -import org.apache.dlab.util.PropertyHelper; - -public class MongoDBHelper { - private static final MongoClient client = MongoClients - .create(PropertyHelper.read("mongo.connection.string")); - - public static void cleanCollection(String collection) { - client.getDatabase(PropertyHelper.read("mongo.db.name")).getCollection(collection).drop(); - } -} diff --git a/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java b/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java index 624b1ca..5c2af2a 100644 --- a/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java +++ b/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java @@ -9,7 +9,6 @@ import cucumber.api.java.en.Then; import cucumber.api.java.en.When; import dlab.util.KeycloakUtil; import org.apache.dlab.dto.EndpointDTO; -import org.apache.dlab.mongo.MongoDBHelper; import org.apache.dlab.util.JacksonMapper; import java.net.URI; @@ -40,10 +39,9 @@ public class EndpointSteps { response = request.post(API_URI + "endpoint"); } - @Given("There is no endpoints in DLab") - public void thereIsNoEndpointsInDLab() { - MongoDBHelper.cleanCollection("endpoints"); - + @Given("There is no endpoint with name {string} in DLab") + public void thereIsNoEndpointsInDLab(String name) { + removeEndpointWithName(name); } @Then("Response status code is {int}") @@ -90,6 +88,12 @@ public class EndpointSteps { assertThat("test2", equalTo(endpoints[1].getName())); } + @And("Remove endpoint with name {string}") + public void removeEndpointWithName(String name) { + final Response response = authenticatedRequest().delete(API_URI + "endpoint/" + name); + assertThat(response.getStatusCode(), equalTo(200)); + } + private RequestSpecification authenticatedRequest() { return given() .auth() diff --git a/integration-tests-cucumber/src/test/resources/config.properties b/integration-tests-cucumber/src/test/resources/config.properties index 49933a9..1f113d9 100644 --- a/integration-tests-cucumber/src/test/resources/config.properties +++ b/integration-tests-cucumber/src/test/resources/config.properties @@ -1,7 +1,7 @@ -dlab.api.base.uri= -mongo.connection.string= -mongo.db.name= -keycloak.serverUrl= -keycloak.realm= -keycloak.clientId= -keycloak.clientSecret= \ No newline at end of file +dlab.api.base.uri=http://ec2-44-228-217-167.us-west-2.compute.amazonaws.com/api/ +mongo.connection.string=mongodb://admin:CVZ0vVMaL5@localhost:27018/dlabdb +mongo.db.name=dlabdb +keycloak.serverUrl=http://52.11.45.11:8080/auth +keycloak.realm=dlab +keycloak.clientId=bhliva1012a-ui +keycloak.clientSecret=83025cea-4121-42ea-9044-f5539fbe857f \ No newline at end of file diff --git a/integration-tests-cucumber/src/test/resources/dlab/endpoint.feature
[incubator-dlab] 01/01: DLAB-000 integration tests updated
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch feature-integration-tests in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 99d3364a0150fd8deeccc6d157c697cd12462f34 Author: bhliva AuthorDate: Tue Dec 10 15:36:53 2019 +0200 DLAB-000 integration tests updated --- .../java/org/apache/dlab/util/PropertyHelper.java | 2 + .../src/test/java/dlab/Constants.java | 4 +- .../src/test/java/dlab/endpoint/EndpointSteps.java | 5 ++- .../src/test/java/dlab/login/LoginSteps.java | 44 -- .../src/test/java/dlab/util/KeycloakUtil.java | 38 +++ .../src/test/resources/config.properties | 9 - .../src/test/resources/dlab/login.feature | 12 -- 7 files changed, 53 insertions(+), 61 deletions(-) diff --git a/integration-tests-cucumber/src/main/java/org/apache/dlab/util/PropertyHelper.java b/integration-tests-cucumber/src/main/java/org/apache/dlab/util/PropertyHelper.java index 48d7cca..6b4a60a 100644 --- a/integration-tests-cucumber/src/main/java/org/apache/dlab/util/PropertyHelper.java +++ b/integration-tests-cucumber/src/main/java/org/apache/dlab/util/PropertyHelper.java @@ -2,6 +2,7 @@ package org.apache.dlab.util; import java.io.FileInputStream; import java.io.InputStream; +import java.util.Optional; import java.util.Properties; public class PropertyHelper { @@ -10,6 +11,7 @@ public class PropertyHelper { static { PROPERTIES = new Properties(); + try (InputStream inputStream = new FileInputStream(System.getProperty("config.file"))) { PROPERTIES.load(inputStream); } catch (Exception e) { diff --git a/integration-tests-cucumber/src/test/java/dlab/Constants.java b/integration-tests-cucumber/src/test/java/dlab/Constants.java index 4e30e99..a27ed77 100644 --- a/integration-tests-cucumber/src/test/java/dlab/Constants.java +++ b/integration-tests-cucumber/src/test/java/dlab/Constants.java @@ -1,5 +1,7 @@ package dlab; +import org.apache.dlab.util.PropertyHelper; + public interface Constants { - String API_URI = "https://localhost:8443/api/;; + String API_URI = PropertyHelper.read("dlab.api.base.uri"); } diff --git a/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java b/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java index e66fc33..624b1ca 100644 --- a/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java +++ b/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java @@ -7,6 +7,7 @@ import cucumber.api.java.en.And; import cucumber.api.java.en.Given; import cucumber.api.java.en.Then; import cucumber.api.java.en.When; +import dlab.util.KeycloakUtil; import org.apache.dlab.dto.EndpointDTO; import org.apache.dlab.mongo.MongoDBHelper; import org.apache.dlab.util.JacksonMapper; @@ -29,7 +30,7 @@ public class EndpointSteps { this.name = name; request = given().body(JacksonMapper.marshall(new EndpointDTO(name, uri, account, tag))) .auth() - .oauth2("token123") + .oauth2(KeycloakUtil.getToken()) .contentType(ContentType.JSON); } @@ -92,6 +93,6 @@ public class EndpointSteps { private RequestSpecification authenticatedRequest() { return given() .auth() - .oauth2("token123"); + .oauth2(KeycloakUtil.getToken()); } } diff --git a/integration-tests-cucumber/src/test/java/dlab/login/LoginSteps.java b/integration-tests-cucumber/src/test/java/dlab/login/LoginSteps.java deleted file mode 100644 index 32b29cb..000 --- a/integration-tests-cucumber/src/test/java/dlab/login/LoginSteps.java +++ /dev/null @@ -1,44 +0,0 @@ -package dlab.login; - -import com.jayway.restassured.http.ContentType; -import com.jayway.restassured.response.Response; -import com.jayway.restassured.specification.RequestSpecification; -import cucumber.api.java.en.Given; -import cucumber.api.java.en.Then; -import cucumber.api.java.en.When; -import gherkin.deps.com.google.gson.JsonObject; - -import java.net.URI; -import java.net.URISyntaxException; - -import static com.jayway.restassured.RestAssured.given; -import static dlab.Constants.API_URI; -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -public class LoginSteps { - - - private static final String LOGIN_RESOURCE_PATH = API_URI + "user/login"; - private RequestSpecification request; - private Response response; - - @Given("User try to login to Dlab with {string} and {string}") - public vo
[incubator-dlab] branch feature-integration-tests updated (aaa2c24 -> 99d3364)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch feature-integration-tests in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. discard aaa2c24 DLAB-000 integration tests updated new 99d3364 DLAB-000 integration tests updated This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (aaa2c24) \ N -- N -- N refs/heads/feature-integration-tests (99d3364) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. 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. Summary of changes: .../src/test/java/dlab/endpoint/EndpointSteps.java | 1 - 1 file changed, 1 deletion(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch feature-integration-tests created (now aaa2c24)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch feature-integration-tests in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. at aaa2c24 DLAB-000 integration tests updated This branch includes the following new commits: new aaa2c24 DLAB-000 integration tests updated 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-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: DLAB-000 integration tests updated
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch feature-integration-tests in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit aaa2c248a1c6ae0de1a9f68e08d439608c0915af Author: bhliva AuthorDate: Tue Dec 10 15:36:53 2019 +0200 DLAB-000 integration tests updated --- .../java/org/apache/dlab/util/PropertyHelper.java | 2 + .../src/test/java/dlab/Constants.java | 4 +- .../src/test/java/dlab/endpoint/EndpointSteps.java | 6 ++- .../src/test/java/dlab/login/LoginSteps.java | 44 -- .../src/test/java/dlab/util/KeycloakUtil.java | 38 +++ .../src/test/resources/config.properties | 9 - .../src/test/resources/dlab/login.feature | 12 -- 7 files changed, 54 insertions(+), 61 deletions(-) diff --git a/integration-tests-cucumber/src/main/java/org/apache/dlab/util/PropertyHelper.java b/integration-tests-cucumber/src/main/java/org/apache/dlab/util/PropertyHelper.java index 48d7cca..6b4a60a 100644 --- a/integration-tests-cucumber/src/main/java/org/apache/dlab/util/PropertyHelper.java +++ b/integration-tests-cucumber/src/main/java/org/apache/dlab/util/PropertyHelper.java @@ -2,6 +2,7 @@ package org.apache.dlab.util; import java.io.FileInputStream; import java.io.InputStream; +import java.util.Optional; import java.util.Properties; public class PropertyHelper { @@ -10,6 +11,7 @@ public class PropertyHelper { static { PROPERTIES = new Properties(); + try (InputStream inputStream = new FileInputStream(System.getProperty("config.file"))) { PROPERTIES.load(inputStream); } catch (Exception e) { diff --git a/integration-tests-cucumber/src/test/java/dlab/Constants.java b/integration-tests-cucumber/src/test/java/dlab/Constants.java index 4e30e99..a27ed77 100644 --- a/integration-tests-cucumber/src/test/java/dlab/Constants.java +++ b/integration-tests-cucumber/src/test/java/dlab/Constants.java @@ -1,5 +1,7 @@ package dlab; +import org.apache.dlab.util.PropertyHelper; + public interface Constants { - String API_URI = "https://localhost:8443/api/;; + String API_URI = PropertyHelper.read("dlab.api.base.uri"); } diff --git a/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java b/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java index e66fc33..ef0dc79 100644 --- a/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java +++ b/integration-tests-cucumber/src/test/java/dlab/endpoint/EndpointSteps.java @@ -7,9 +7,11 @@ import cucumber.api.java.en.And; import cucumber.api.java.en.Given; import cucumber.api.java.en.Then; import cucumber.api.java.en.When; +import dlab.util.KeycloakUtil; import org.apache.dlab.dto.EndpointDTO; import org.apache.dlab.mongo.MongoDBHelper; import org.apache.dlab.util.JacksonMapper; +import org.keycloak.admin.client.KeycloakBuilder; import java.net.URI; import java.net.URISyntaxException; @@ -29,7 +31,7 @@ public class EndpointSteps { this.name = name; request = given().body(JacksonMapper.marshall(new EndpointDTO(name, uri, account, tag))) .auth() - .oauth2("token123") + .oauth2(KeycloakUtil.getToken()) .contentType(ContentType.JSON); } @@ -92,6 +94,6 @@ public class EndpointSteps { private RequestSpecification authenticatedRequest() { return given() .auth() - .oauth2("token123"); + .oauth2(KeycloakUtil.getToken()); } } diff --git a/integration-tests-cucumber/src/test/java/dlab/login/LoginSteps.java b/integration-tests-cucumber/src/test/java/dlab/login/LoginSteps.java deleted file mode 100644 index 32b29cb..000 --- a/integration-tests-cucumber/src/test/java/dlab/login/LoginSteps.java +++ /dev/null @@ -1,44 +0,0 @@ -package dlab.login; - -import com.jayway.restassured.http.ContentType; -import com.jayway.restassured.response.Response; -import com.jayway.restassured.specification.RequestSpecification; -import cucumber.api.java.en.Given; -import cucumber.api.java.en.Then; -import cucumber.api.java.en.When; -import gherkin.deps.com.google.gson.JsonObject; - -import java.net.URI; -import java.net.URISyntaxException; - -import static com.jayway.restassured.RestAssured.given; -import static dlab.Constants.API_URI; -import static org.hamcrest.core.IsEqual.equalTo; -import static org.junit.Assert.assertThat; - -public class LoginSteps { - - - private static final String LOGIN_RESOURCE_PATH = API_URI + "user/login"; - private RequestSpecification request; - private Response response; - - @Giv
[incubator-dlab] branch gh-pages updated: added asf config for publishing
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch gh-pages in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/gh-pages by this push: new 7390adb added asf config for publishing 7390adb is described below commit 7390adbcf5375f146e06efdbc2b8b205424a5417 Author: bhliva AuthorDate: Thu Nov 28 13:31:06 2019 +0200 added asf config for publishing --- .asf.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.asf.yaml b/.asf.yaml new file mode 100644 index 000..59f4434 --- /dev/null +++ b/.asf.yaml @@ -0,0 +1,2 @@ +publish: + whoami: gh-pages - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch master updated: added publish website config
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/master by this push: new 3fe716a added publish website config 3fe716a is described below commit 3fe716a4320847e334585f298ca8933cc5427a44 Author: bhliva AuthorDate: Thu Nov 28 11:35:57 2019 +0200 added publish website config --- .asf.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.asf.yaml b/.asf.yaml index 46d4cb5..4195022 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -1,4 +1,4 @@ github: ghp_branch: gh-pages publish: - whoami: asf-site + whoami: gh-pages - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch asf-site created (now 2a3683d)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch asf-site in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. at 2a3683d Update CNAME No new revisions were added by this update. - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated: [DLAB-1261] Custom image is unique per project
This is an automated email from the ASF dual-hosted git repository. bhliva 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 0a13005 [DLAB-1261] Custom image is unique per project 0a13005 is described below commit 0a13005b0fd6e34c142fcde536b0dc388dfe1611 Author: Oleh Fuks AuthorDate: Thu Nov 14 15:48:37 2019 +0200 [DLAB-1261] Custom image is unique per project --- .../dlab/backendapi/dao/ImageExploratoryDao.java | 4 ++- .../backendapi/dao/ImageExploratoryDaoImpl.java| 15 -- .../resources/ImageExploratoryResource.java| 9 +- .../service/ImageExploratoryService.java | 2 ++ .../service/impl/ImageExploratoryServiceImpl.java | 13 ++--- .../resources/ImageExploratoryResourceTest.java| 34 ++ .../impl/ImageExploratoryServiceImplTest.java | 17 +-- 7 files changed, 83 insertions(+), 11 deletions(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDao.java index b5b2391..0eb86c0 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDao.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDao.java @@ -31,7 +31,7 @@ import java.util.Optional; public interface ImageExploratoryDao { - boolean exist(String user, String name); + boolean exist(String image, String project); void save(Image image); @@ -39,6 +39,8 @@ public interface ImageExploratoryDao { List getImages(String user, String dockerImage, String project, String endpoint, ImageStatus... statuses); + List getImagesForProject(String project); + Optional getImage(String user, String name); List getLibraries(String user, String imageFullName, ResourceType resourceType, LibStatus status); diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDaoImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDaoImpl.java index a27b943..c3e0ee1 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDaoImpl.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ImageExploratoryDaoImpl.java @@ -49,8 +49,8 @@ public class ImageExploratoryDaoImpl extends BaseDAO implements ImageExploratory private static final String ENDPOINT = "endpoint"; @Override - public boolean exist(String user, String name) { - return findOne(MongoCollections.IMAGES, userImageCondition(user, name)).isPresent(); + public boolean exist(String image, String project) { + return findOne(MongoCollections.IMAGES, imageProjectCondition(image, project)).isPresent(); } @Override @@ -73,6 +73,13 @@ public class ImageExploratoryDaoImpl extends BaseDAO implements ImageExploratory } @Override + public List getImagesForProject(String project) { + return find(MongoCollections.IMAGES, + eq(PROJECT, project), + ImageInfoRecord.class); + } + + @Override public Optional getImage(String user, String name) { return findOne(MongoCollections.IMAGES, userImageCondition(user, name), ImageInfoRecord.class); } @@ -127,6 +134,10 @@ public class ImageExploratoryDaoImpl extends BaseDAO implements ImageExploratory return and(eq(USER, user), eq(IMAGE_NAME, imageName)); } + private Bson imageProjectCondition(String image, String project) { + return and(eq(IMAGE_NAME, image), eq(PROJECT, project)); + } + private Document getUpdatedFields(Image image) { return new Document(STATUS, image.getStatus().toString()) .append(IMAGE_FULL_NAME, image.getFullName()) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ImageExploratoryResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ImageExploratoryResource.java index 685d2ca..fdc15fd 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ImageExploratoryResource.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ImageExploratoryResource.java @@ -68,7 +68,6 @@ public class ImageExploratoryResource { return Response.accepted(uuid).location(imageUri).build(); } - @GET public Response getImages(@Auth UserInfo ui, @QueryParam("docker_image") String dockerImage, @@ -81,6 +8
[incubator-dlab] branch v2.2-RC1 updated (5fa8f8d -> 0549314)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 5fa8f8d Merge pull request #415 from apache/DLAB-1265-release add ee198c4 [DLAB-1261] Custom image is unique per project new 0549314 Merge pull request #413 from apache/DLAB-1261 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. Summary of changes: .../dlab/backendapi/dao/ImageExploratoryDao.java | 4 ++- .../backendapi/dao/ImageExploratoryDaoImpl.java| 15 -- .../resources/ImageExploratoryResource.java| 9 +- .../service/ImageExploratoryService.java | 2 ++ .../service/impl/ImageExploratoryServiceImpl.java | 13 ++--- .../resources/ImageExploratoryResourceTest.java| 34 ++ .../impl/ImageExploratoryServiceImplTest.java | 17 +-- 7 files changed, 83 insertions(+), 11 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #413 from apache/DLAB-1261
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 05493148975469e6d05a4938a3e085fe56ce5068 Merge: 5fa8f8d ee198c4 Author: bhliva AuthorDate: Fri Nov 15 15:08:21 2019 +0200 Merge pull request #413 from apache/DLAB-1261 [DLAB-1261] Custom image is unique per project .../dlab/backendapi/dao/ImageExploratoryDao.java | 4 ++- .../backendapi/dao/ImageExploratoryDaoImpl.java| 15 -- .../resources/ImageExploratoryResource.java| 9 +- .../service/ImageExploratoryService.java | 2 ++ .../service/impl/ImageExploratoryServiceImpl.java | 13 ++--- .../resources/ImageExploratoryResourceTest.java| 34 ++ .../impl/ImageExploratoryServiceImplTest.java | 17 +-- 7 files changed, 83 insertions(+), 11 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated: [DLAB-1265] Fixed bug with managing git credentials
This is an automated email from the ASF dual-hosted git repository. bhliva 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 7d60688 [DLAB-1265] Fixed bug with managing git credentials 7d60688 is described below commit 7d6068813f023293156b7c6b1dffb2d8e70e8e7a Author: Oleh Fuks AuthorDate: Thu Nov 14 16:07:32 2019 +0200 [DLAB-1265] Fixed bug with managing git credentials --- .../src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java index 5a14da4..ac858e0 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java @@ -302,6 +302,7 @@ public class RequestBuilder { .withNotebookImage(instanceDTO.getImageName()) .withApplicationName(getApplicationNameFromImage(instanceDTO.getImageName())) .withProject(instanceDTO.getProject()) + .withEndpoint(instanceDTO.getEndpoint()) .withNotebookInstanceName(instanceDTO.getExploratoryId()) .withExploratoryName(instanceDTO.getExploratoryName()) .withGitCreds(exploratoryGitCredsDTO.getGitCreds()); - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch v2.2-RC1 updated (e1ff503 -> 5fa8f8d)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from e1ff503 [DLAB-1214]: added request parameters to get project list per user (#412) add 5172cf0 [DLAB-1265] Fixed bug with managing git credentials new 5fa8f8d Merge pull request #415 from apache/DLAB-1265-release 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. Summary of changes: .../src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java | 1 + 1 file changed, 1 insertion(+) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #415 from apache/DLAB-1265-release
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 5fa8f8d31de0154be8aad14f34c3ee45c555074f Merge: e1ff503 5172cf0 Author: bhliva AuthorDate: Fri Nov 15 14:54:32 2019 +0200 Merge pull request #415 from apache/DLAB-1265-release [DLAB-1265] Fixed bug with managing git credentials .../src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java | 1 + 1 file changed, 1 insertion(+) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch v2.2-RC1 updated: [DLAB-1214]: added request parameters to get project list per user (#412)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/v2.2-RC1 by this push: new e1ff503 [DLAB-1214]: added request parameters to get project list per user (#412) e1ff503 is described below commit e1ff5032e4e3475c50e6f1387be592a6169ae647 Author: Andriana Kovalyshyn AuthorDate: Thu Nov 14 15:33:53 2019 +0200 [DLAB-1214]: added request parameters to get project list per user (#412) * [DLAB-1214]: added request parameters to get project list per user --- .../src/app/core/services/applicationServiceFacade.service.ts | 6 +++--- .../resources/webapp/src/app/core/services/project.service.ts | 5 +++-- .../create-environment/create-environment.component.ts| 4 ++-- .../resources/webapp/src/app/resources/resources.component.ts | 2 +- .../webapp/src/app/webterminal/webterminal.component.scss | 2 +- .../resources/webapp/src/app/webterminal/webterminal.component.ts | 8 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts index 67c7010..cffcf03 100644 --- a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts +++ b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts @@ -74,7 +74,7 @@ export class ApplicationServiceFacade { private static readonly DOWNLOAD_REPORT = 'download_report'; private static readonly SETTINGS = 'settings'; private static readonly PROJECT = 'project'; - private static readonly USER_PROJECT = 'project/me'; + private static readonly USER_PROJECT = 'user_project'; private static readonly ENDPOINT = 'endpoint'; private requestRegistry: Dictionary; @@ -545,9 +545,9 @@ export class ApplicationServiceFacade { null); } - public buildGetUserProjectsList(): Observable { + public buildGetUserProjectsList(params?): Observable { return this.buildRequest(HTTPMethod.GET, - this.requestRegistry.Item(ApplicationServiceFacade.USER_PROJECT), + this.requestRegistry.Item(ApplicationServiceFacade.USER_PROJECT) + params, null); } diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts index d623f52..0d03ec3 100644 --- a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts +++ b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts @@ -52,9 +52,10 @@ export class ProjectService { catchError(ErrorUtils.handleServiceError)); } - public getUserProjectsList(): Observable<{}> { + public getUserProjectsList(isActive?): Observable<{}> { +const params = isActive ? '?active=true' : ''; return this.applicationServiceFacade - .buildGetUserProjectsList() + .buildGetUserProjectsList(params) .pipe( map(response => response), catchError(ErrorUtils.handleServiceError)); diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts index b5c2a76..e42ea92 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts @@ -69,7 +69,7 @@ export class ExploratoryEnvironmentCreateComponent implements OnInit { } public getUserProjects() { -this.projectService.getUserProjectsList().subscribe((projects: any) => { +this.projectService.getUserProjectsList(true).subscribe((projects: any) => { this.projects = projects; const activeProject = projects.find(item => item.name === this.resourceGrid.activeProject); if (this.resourceGrid.activeProject && activeProject) { @@ -131,7 +131,7 @@ export class ExploratoryEnvironmentCreateComponent implements OnInit { private getImagesList() { this.userResourceService.getUserImages(this.currentTemplate.image, this.createExploratoryForm.controls['project'].value, -this.createExploratoryForm.controls['endpoint'].value) + this.createExploratoryForm.controls['endpoint'].value) .subscribe((res: any) => this.images = res.filter(el => el.status === 'CREATED'), error => this.t
[incubator-dlab] branch develop updated: [DLAB-1214]: added request parameters to get project list per user (#412)
This is an automated email from the ASF dual-hosted git repository. bhliva 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 5e3cd74 [DLAB-1214]: added request parameters to get project list per user (#412) 5e3cd74 is described below commit 5e3cd7461fb5679336bf0bac3297fb6fe3dcac0b Author: Andriana Kovalyshyn AuthorDate: Thu Nov 14 15:33:53 2019 +0200 [DLAB-1214]: added request parameters to get project list per user (#412) * [DLAB-1214]: added request parameters to get project list per user --- .../src/app/core/services/applicationServiceFacade.service.ts | 6 +++--- .../resources/webapp/src/app/core/services/project.service.ts | 5 +++-- .../create-environment/create-environment.component.ts| 4 ++-- .../resources/webapp/src/app/resources/resources.component.ts | 2 +- .../webapp/src/app/webterminal/webterminal.component.scss | 2 +- .../resources/webapp/src/app/webterminal/webterminal.component.ts | 8 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts index 67c7010..cffcf03 100644 --- a/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts +++ b/services/self-service/src/main/resources/webapp/src/app/core/services/applicationServiceFacade.service.ts @@ -74,7 +74,7 @@ export class ApplicationServiceFacade { private static readonly DOWNLOAD_REPORT = 'download_report'; private static readonly SETTINGS = 'settings'; private static readonly PROJECT = 'project'; - private static readonly USER_PROJECT = 'project/me'; + private static readonly USER_PROJECT = 'user_project'; private static readonly ENDPOINT = 'endpoint'; private requestRegistry: Dictionary; @@ -545,9 +545,9 @@ export class ApplicationServiceFacade { null); } - public buildGetUserProjectsList(): Observable { + public buildGetUserProjectsList(params?): Observable { return this.buildRequest(HTTPMethod.GET, - this.requestRegistry.Item(ApplicationServiceFacade.USER_PROJECT), + this.requestRegistry.Item(ApplicationServiceFacade.USER_PROJECT) + params, null); } diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts index d623f52..0d03ec3 100644 --- a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts +++ b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts @@ -52,9 +52,10 @@ export class ProjectService { catchError(ErrorUtils.handleServiceError)); } - public getUserProjectsList(): Observable<{}> { + public getUserProjectsList(isActive?): Observable<{}> { +const params = isActive ? '?active=true' : ''; return this.applicationServiceFacade - .buildGetUserProjectsList() + .buildGetUserProjectsList(params) .pipe( map(response => response), catchError(ErrorUtils.handleServiceError)); diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts index b5c2a76..e42ea92 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.ts @@ -69,7 +69,7 @@ export class ExploratoryEnvironmentCreateComponent implements OnInit { } public getUserProjects() { -this.projectService.getUserProjectsList().subscribe((projects: any) => { +this.projectService.getUserProjectsList(true).subscribe((projects: any) => { this.projects = projects; const activeProject = projects.find(item => item.name === this.resourceGrid.activeProject); if (this.resourceGrid.activeProject && activeProject) { @@ -131,7 +131,7 @@ export class ExploratoryEnvironmentCreateComponent implements OnInit { private getImagesList() { this.userResourceService.getUserImages(this.currentTemplate.image, this.createExploratoryForm.controls['project'].value, -this.createExploratoryForm.controls['endpoint'].value) + this.createExploratoryForm.controls['endpoint'].value) .subscribe((res: any) => this.images = res.filter(el => el.status === 'CREATED'), error => this.toastr.er
[incubator-dlab] branch v2.2-RC1 updated: DLAB-000 fixed issue with unauthorized for web terminal
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/v2.2-RC1 by this push: new c595063 DLAB-000 fixed issue with unauthorized for web terminal c595063 is described below commit c595063b533db8f81f2715382b59317b91198d20 Author: bhliva AuthorDate: Thu Nov 14 14:44:21 2019 +0200 DLAB-000 fixed issue with unauthorized for web terminal --- .../dlab/backendapi/SelfServiceApplication.java| 18 +- .../servlet/guacamole/GuacamoleSecurityFilter.java | 71 -- .../servlet/guacamole/GuacamoleServlet.java| 30 - .../src/app/webterminal/webterminal.component.ts | 4 +- 4 files changed, 31 insertions(+), 92 deletions(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java index 25d24e5..da6a5c5 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java @@ -31,7 +31,6 @@ import com.epam.dlab.backendapi.modules.ModuleFactory; import com.epam.dlab.backendapi.resources.*; import com.epam.dlab.backendapi.resources.callback.*; import com.epam.dlab.backendapi.schedulers.internal.ManagedScheduler; -import com.epam.dlab.backendapi.servlet.guacamole.GuacamoleSecurityFilter; import com.epam.dlab.backendapi.servlet.guacamole.GuacamoleServlet; import com.epam.dlab.cloud.CloudModule; import com.epam.dlab.constants.ServiceConsts; @@ -58,15 +57,12 @@ import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.HandlerWrapper; -import javax.servlet.DispatcherType; -import java.util.EnumSet; - /** * Self Service based on Dropwizard application. */ @Slf4j public class SelfServiceApplication extends Application { - private static final String GUACAMOLE_SERVLET_PATH = "/api/tunnel"; + public static final String GUACAMOLE_SERVLET_PATH = "/api/tunnel"; private static Injector appInjector; public static Injector getInjector() { @@ -94,12 +90,6 @@ public class SelfServiceApplication extends Application() { - @Override - protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(SelfServiceApplicationConfiguration configuration) { - return configuration.getSwaggerConfiguration(); - } - });*/ } @Override @@ -125,12 +115,8 @@ public class SelfServiceApplication extends Applicationhttp://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package com.epam.dlab.backendapi.servlet.guacamole; - -import com.epam.dlab.auth.UserInfo; -import com.epam.dlab.backendapi.dao.SecurityDAO; -import com.google.inject.Inject; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; - -import javax.servlet.*; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.core.HttpHeaders; -import java.io.IOException; -import java.util.Optional; - -@Slf4j -public class GuacamoleSecurityFilter implements Filter { - private static final String AUTH_HEADER_PREFIX = "Bearer "; - - private final SecurityDAO securityDAO; - - @Inject - public GuacamoleSecurityFilter(SecurityDAO securityDAO) { - this.securityDAO = securityDAO; - } - - @Override - public void init(FilterConfig filterConfig) { - - } - - @Override - public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { - HttpServletRequest request = (HttpServletRequest) servletRequest; - HttpServletResponse response = (HttpServletResponse) servletResponse; - final String authorization = request.getHeader(HttpHeaders.AUTHORIZATION); - final String credentials = StringUtils.substringAfter(authorization, AUTH_HEADER_PREFIX); - final Optional user = securityDAO.getUser(credentials); - if (user.isPresent()) { - request.setAttribute(GuacamoleServlet.USER_ATTRIBUTE, user.get()); - filterChain.doFilter(servletRequest,
[incubator-dlab] branch develop updated: DLAB-000 fixed issue with unauthorized for web terminal
This is an automated email from the ASF dual-hosted git repository. bhliva 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 6b2d2cf DLAB-000 fixed issue with unauthorized for web terminal 6b2d2cf is described below commit 6b2d2cf72118863a7d88374226a969244d5f482a Author: bhliva AuthorDate: Thu Nov 14 14:44:21 2019 +0200 DLAB-000 fixed issue with unauthorized for web terminal --- .../dlab/backendapi/SelfServiceApplication.java| 18 +--- .../servlet/guacamole/GuacamoleSecurityFilter.java | 52 -- .../servlet/guacamole/GuacamoleServlet.java| 30 +++-- .../src/app/webterminal/webterminal.component.ts | 4 +- 4 files changed, 31 insertions(+), 73 deletions(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java index 25d24e5..da6a5c5 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java @@ -31,7 +31,6 @@ import com.epam.dlab.backendapi.modules.ModuleFactory; import com.epam.dlab.backendapi.resources.*; import com.epam.dlab.backendapi.resources.callback.*; import com.epam.dlab.backendapi.schedulers.internal.ManagedScheduler; -import com.epam.dlab.backendapi.servlet.guacamole.GuacamoleSecurityFilter; import com.epam.dlab.backendapi.servlet.guacamole.GuacamoleServlet; import com.epam.dlab.cloud.CloudModule; import com.epam.dlab.constants.ServiceConsts; @@ -58,15 +57,12 @@ import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.HandlerWrapper; -import javax.servlet.DispatcherType; -import java.util.EnumSet; - /** * Self Service based on Dropwizard application. */ @Slf4j public class SelfServiceApplication extends Application { - private static final String GUACAMOLE_SERVLET_PATH = "/api/tunnel"; + public static final String GUACAMOLE_SERVLET_PATH = "/api/tunnel"; private static Injector appInjector; public static Injector getInjector() { @@ -94,12 +90,6 @@ public class SelfServiceApplication extends Application() { - @Override - protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(SelfServiceApplicationConfiguration configuration) { - return configuration.getSwaggerConfiguration(); - } - });*/ } @Override @@ -125,12 +115,8 @@ public class SelfServiceApplication extends Application user = securityDAO.getUser(credentials); - if (user.isPresent()) { - request.setAttribute(GuacamoleServlet.USER_ATTRIBUTE, user.get()); - filterChain.doFilter(servletRequest, servletResponse); - } else { - response.sendError(HttpServletResponse.SC_UNAUTHORIZED); - } - - } - - @Override - public void destroy() { - - } -} diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/servlet/guacamole/GuacamoleServlet.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/servlet/guacamole/GuacamoleServlet.java index 0c9135e..d74c68d 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/servlet/guacamole/GuacamoleServlet.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/servlet/guacamole/GuacamoleServlet.java @@ -1,32 +1,47 @@ package com.epam.dlab.backendapi.servlet.guacamole; import com.epam.dlab.auth.UserInfo; +import com.epam.dlab.backendapi.dao.SecurityDAO; import com.epam.dlab.backendapi.service.GuacamoleService; +import com.epam.dlab.exceptions.DlabAuthenticationException; import com.epam.dlab.exceptions.DlabException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; import lombok.Data; +import org.apache.commons.lang3.StringUtils; import org.apache.guacamole.net.GuacamoleTunnel; import org.apache.guacamole.servlet.GuacamoleHTTPTunnelServlet; +import org.apache.http.HttpStatus; +import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.core.HttpHeaders; import java.io.IOException; public class GuacamoleServlet extends GuacamoleHTTPTunnelServlet { - static final String USER_ATTRIBUTE = "user"; + private static final String UNAUTHORIZED_MSG = "User is not authenticated"; + private static final String DLAB_PREFIX = "DLab-"; private final GuacamoleService guacamoleService; privat
[incubator-dlab] branch develop updated (49c2c99 -> 7d48040)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 49c2c99 Merge pull request #410 from apache/redhat-fix-dev new f386f6b [DLAB-1266] Fixed issue with switching between project for user (not admin) new 7d48040 Code review The 2 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. Summary of changes: .../java/com/epam/dlab/backendapi/dao/ProjectDAO.java | 2 +- .../java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java | 15 +++ .../epam/dlab/backendapi/resources/ProjectResource.java | 7 --- .../com/epam/dlab/backendapi/service/ProjectService.java | 2 +- .../dlab/backendapi/service/impl/ProjectServiceImpl.java | 4 ++-- 5 files changed, 19 insertions(+), 11 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 02/02: Code review
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 7d48040b4fdf895e8f543544f71dcf2f040d57a9 Author: Oleh Fuks AuthorDate: Thu Nov 14 11:02:09 2019 +0200 Code review --- .../main/java/com/epam/dlab/backendapi/resources/ProjectResource.java | 2 +- .../src/main/java/com/epam/dlab/backendapi/service/ProjectService.java | 2 +- .../java/com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java index e75a735..a45446e 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java @@ -197,7 +197,7 @@ public class ProjectResource { public Response getUserProjects(@Parameter(hidden = true) @Auth UserInfo userInfo, @QueryParam("active") @DefaultValue("false") boolean active) { return Response - .ok(projectService.getUserActiveProjects(userInfo, active)) + .ok(projectService.getUserProjects(userInfo, active)) .build(); } diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ProjectService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ProjectService.java index 113cfa7..bc1dea0 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ProjectService.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ProjectService.java @@ -12,7 +12,7 @@ public interface ProjectService { List getProjectsForManaging(); - List getUserActiveProjects(UserInfo userInfo, boolean active); + List getUserProjects(UserInfo userInfo, boolean active); List getProjectsWithStatus(ProjectDTO.Status status); diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java index 13dd23c..ba15773 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java @@ -90,7 +90,7 @@ public class ProjectServiceImpl implements ProjectService { } @Override - public List getUserActiveProjects(UserInfo userInfo, boolean active) { + public List getUserProjects(UserInfo userInfo, boolean active) { return projectDAO.getUserProjects(userInfo, active); } - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/02: [DLAB-1266] Fixed issue with switching between project for user (not admin)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit f386f6bf41e0bd32d4fe5e20d913419f88b2639a Author: Oleh Fuks AuthorDate: Wed Nov 13 12:24:18 2019 +0200 [DLAB-1266] Fixed issue with switching between project for user (not admin) --- .../java/com/epam/dlab/backendapi/dao/ProjectDAO.java | 2 +- .../java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java | 15 +++ .../epam/dlab/backendapi/resources/ProjectResource.java | 7 --- .../com/epam/dlab/backendapi/service/ProjectService.java | 2 +- .../dlab/backendapi/service/impl/ProjectServiceImpl.java | 4 ++-- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAO.java index 95a954c..a9a89f5 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAO.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAO.java @@ -16,7 +16,7 @@ public interface ProjectDAO { List getProjectsWithEndpointStatusNotIn(UserInstanceStatus... statuses); - List getUserProjects(UserInfo userInfo); + List getUserProjects(UserInfo userInfo, boolean active); void create(ProjectDTO projectDTO); diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java index 4607155..a74a07b 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java @@ -58,13 +58,11 @@ public class ProjectDAOImpl extends BaseDAO implements ProjectDAO { } @Override - public List getUserProjects(UserInfo userInfo) { + public List getUserProjects(UserInfo userInfo, boolean active) { final Set groups = Stream.concat(userGroupDao.getUserGroups(userInfo.getName()).stream(), userInfo.getRoles().stream()) .collect(Collectors.toSet()); - final String groupsRegex = !groups.isEmpty() ? String.join("|", groups) + "|" + ANYUSER : ANYUSER; - return find(PROJECTS_COLLECTION, and(elemMatch(GROUPS, regexCaseInsensitive(groupsRegex)), - eq(ENDPOINT_STATUS_FIELD, UserInstanceStatus.RUNNING.name())), ProjectDTO.class); + return find(PROJECTS_COLLECTION, userProjectCondition(groups, active), ProjectDTO.class); } @Override @@ -135,6 +133,15 @@ public class ProjectDAOImpl extends BaseDAO implements ProjectDAO { return eq("name", name); } + private Bson userProjectCondition(Set groups, boolean active) { + final String groupsRegex = !groups.isEmpty() ? String.join("|", groups) + "|" + ANYUSER : ANYUSER; + if (active) { + return and(elemMatch(GROUPS, regexCaseInsensitive(groupsRegex)), + eq(ENDPOINT_STATUS_FIELD, UserInstanceStatus.RUNNING.name())); + } + return elemMatch(GROUPS, regexCaseInsensitive(groupsRegex)); + } + private Bson projectAndEndpointCondition(String projectName, String endpointName) { return and(eq("name", projectName), eq("endpoints.name", endpointName)); } diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java index c361b1b..e75a735 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java @@ -191,12 +191,13 @@ public class ProjectResource { content = @Content(mediaType = MediaType.APPLICATION_JSON, schema = @Schema(implementation = ProjectDTO.class))), }) - @Path("/me") @GET + @Path("/me") @Produces(MediaType.APPLICATION_JSON) - public Response getUserProjects(@Parameter(hidden = true) @Auth UserInfo userInfo) { + public Response getUserProjects(@Parameter(hidden = true) @Auth UserInfo userInfo, + @QueryParam("active") @DefaultValue("false") boolean active) { return Response - .ok(projectService.getUs
[incubator-dlab] branch v2.2-RC1 updated (1c09b85 -> b09dade)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 1c09b85 Merge pull request #409 from apache/redhat-fix-rc22 add e2b69be [DLAB-1266] Fixed issue with switching between project for user (not admin) add aaa2bc3 Code review new b09dade Merge pull request #401 from apache/DLAB-1266 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. Summary of changes: .../java/com/epam/dlab/backendapi/dao/ProjectDAO.java | 2 +- .../java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java | 15 +++ .../epam/dlab/backendapi/resources/ProjectResource.java | 7 --- .../com/epam/dlab/backendapi/service/ProjectService.java | 2 +- .../dlab/backendapi/service/impl/ProjectServiceImpl.java | 4 ++-- 5 files changed, 19 insertions(+), 11 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #401 from apache/DLAB-1266
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit b09dade70dbd865660fe31a1f57ae57db7f31677 Merge: 1c09b85 aaa2bc3 Author: bhliva AuthorDate: Thu Nov 14 12:26:24 2019 +0200 Merge pull request #401 from apache/DLAB-1266 [DLAB-1266] Fixed issue with switching between project for user (not … .../java/com/epam/dlab/backendapi/dao/ProjectDAO.java | 2 +- .../java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java | 15 +++ .../epam/dlab/backendapi/resources/ProjectResource.java | 7 --- .../com/epam/dlab/backendapi/service/ProjectService.java | 2 +- .../dlab/backendapi/service/impl/ProjectServiceImpl.java | 4 ++-- 5 files changed, 19 insertions(+), 11 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch v2.2-RC1 updated (7cc7459 -> 7da906b)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 7cc7459 Merge pull request #399 from apache/DLAB-1256 add dd9310b [DLAB-1260] Fixed bug with export billing report new 7da906b Merge pull request #404 from apache/DLAB-1260 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. Summary of changes: .../main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java | 4 ++-- .../com/epam/dlab/backendapi/service/aws/AwsBillingService.java | 3 --- .../epam/dlab/backendapi/service/aws/AwsBillingServiceTest.java | 8 3 files changed, 6 insertions(+), 9 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (aa5079d -> 5b7ab42)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from aa5079d Merge pull request #405 from apache/DLAB-1253 new be27602 [DLAB-1260] Fixed bug with export billing report new 5b7ab42 [DLAB-1256] Fixed issue with stopping notebook The 2 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. Summary of changes: .../dlab/backendapi/dao/aws/AwsBillingDAO.java | 4 +-- .../schedulers/CheckUserQuoteScheduler.java| 2 +- .../backendapi/service/EnvironmentService.java | 2 ++ .../dlab/backendapi/service/SecurityService.java | 4 ++- .../backendapi/service/SecurityServiceImpl.java| 5 ++-- .../backendapi/service/aws/AwsBillingService.java | 3 -- .../service/impl/EnvironmentServiceImpl.java | 20 -- .../service/impl/SchedulerJobServiceImpl.java | 10 +++ .../schedulers/CheckUserQuoteSchedulerTest.java| 4 +-- .../service/aws/AwsBillingServiceTest.java | 8 +++--- .../service/impl/EnvironmentServiceImplTest.java | 17 +--- .../service/impl/SchedulerJobServiceImplTest.java | 32 +++--- 12 files changed, 62 insertions(+), 49 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 02/02: [DLAB-1256] Fixed issue with stopping notebook
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 5b7ab4235ecdf7569f572502a1ea1d41ff985365 Author: Oleh Fuks AuthorDate: Tue Nov 12 14:13:28 2019 +0200 [DLAB-1256] Fixed issue with stopping notebook --- .../schedulers/CheckUserQuoteScheduler.java| 2 +- .../backendapi/service/EnvironmentService.java | 2 ++ .../dlab/backendapi/service/SecurityService.java | 4 ++- .../backendapi/service/SecurityServiceImpl.java| 5 ++-- .../service/impl/EnvironmentServiceImpl.java | 20 -- .../service/impl/SchedulerJobServiceImpl.java | 10 +++ .../schedulers/CheckUserQuoteSchedulerTest.java| 4 +-- .../service/impl/EnvironmentServiceImplTest.java | 17 +--- .../service/impl/SchedulerJobServiceImplTest.java | 32 +++--- 9 files changed, 56 insertions(+), 40 deletions(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckUserQuoteScheduler.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckUserQuoteScheduler.java index ce3b009..1e2e7f4 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckUserQuoteScheduler.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/schedulers/CheckUserQuoteScheduler.java @@ -44,6 +44,6 @@ public class CheckUserQuoteScheduler implements Job { .map(UserDTO::getName) .filter(billingDAO::isUserQuoteReached) .peek(u -> log.warn("Stopping {} user env because of reaching user billing quote", u)) - .forEach(environmentService::stopEnvironment); + .forEach(environmentService::stopEnvironmentWithServiceAccount); } } diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java index e36d936..65953cd 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java @@ -37,6 +37,8 @@ public interface EnvironmentService { void stopEnvironment(String user); + void stopEnvironmentWithServiceAccount(String user); + void stopProjectEnvironment(String project); void stopEdge(String user); diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SecurityService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SecurityService.java index 9954cff..fb1179f 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SecurityService.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SecurityService.java @@ -4,6 +4,8 @@ import com.epam.dlab.auth.UserInfo; public interface SecurityService { UserInfo getUserInfo(String code); + UserInfo getUserInfoOffline(String username); - UserInfo getServiceAccountInfo(String username); + + UserInfo getServiceAccountInfo(); } diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SecurityServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SecurityServiceImpl.java index b43128d..b62e3fc 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SecurityServiceImpl.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/SecurityServiceImpl.java @@ -38,8 +38,9 @@ public class SecurityServiceImpl implements SecurityService { } @Override - public UserInfo getServiceAccountInfo(String username) { + public UserInfo getServiceAccountInfo() { AccessTokenResponse accessTokenResponse = keycloakService.generateServiceAccountToken(); - return new UserInfo(username, accessTokenResponse.getToken()); + return new UserInfo(KeycloakUtil.parseToken(accessTokenResponse.getToken()).getPreferredUsername(), + accessTokenResponse.getToken()); } } diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java index 5737497..f062c7f 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java @@ -122,15 +122,24 @@ public class EnvironmentServiceImpl implements Envir
[incubator-dlab] 01/02: [DLAB-1260] Fixed bug with export billing report
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit be2760277f4dc092cd01c7f5e25ab4f22e017194 Author: Oleh Fuks AuthorDate: Wed Nov 13 16:00:47 2019 +0200 [DLAB-1260] Fixed bug with export billing report --- .../main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java | 4 ++-- .../com/epam/dlab/backendapi/service/aws/AwsBillingService.java | 3 --- .../epam/dlab/backendapi/service/aws/AwsBillingServiceTest.java | 8 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java index aa78255..5205cc4 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java @@ -39,8 +39,8 @@ import static com.mongodb.client.model.Aggregates.sort; public class AwsBillingDAO extends BaseBillingDAO { public static final String DLAB_RESOURCE_TYPE = "dlab_resource_type"; -public static final String USAGE_DATE_START = "usage_date_start"; -public static final String USAGE_DATE_END = "usage_date_end"; +public static final String USAGE_DATE_START = "from"; +public static final String USAGE_DATE_END = "to"; public static final String TAG_RESOURCE_ID = "tag_resource_id"; @Override diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsBillingService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsBillingService.java index b036822..aa102cb 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsBillingService.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsBillingService.java @@ -20,14 +20,11 @@ package com.epam.dlab.backendapi.service.aws; import com.epam.dlab.auth.UserInfo; -import com.epam.dlab.backendapi.dao.BillingDAO; import com.epam.dlab.backendapi.dao.aws.AwsBillingDAO; import com.epam.dlab.backendapi.resources.dto.aws.AwsBillingFilter; import com.epam.dlab.backendapi.service.BillingService; import com.epam.dlab.backendapi.util.CSVFormatter; -import com.epam.dlab.exceptions.DlabException; import com.epam.dlab.model.aws.ReportLine; -import com.google.inject.Inject; import com.google.inject.Singleton; import lombok.extern.slf4j.Slf4j; import org.bson.Document; diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsBillingServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsBillingServiceTest.java index 6b58482..e24e009 100644 --- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsBillingServiceTest.java +++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsBillingServiceTest.java @@ -117,7 +117,7 @@ public class AwsBillingServiceTest { @Test public void downloadReportWithInapproprietaryDateFormatInDocument() { - basicDocument.put("usage_date_start", "someDateStart"); + basicDocument.put("from", "someDateStart"); when(billingDAO.getReport(any(UserInfo.class), any(AwsBillingFilter.class))).thenReturn(basicDocument); try { @@ -155,7 +155,7 @@ public class AwsBillingServiceTest { @Test public void getFirstLineWithException() throws ParseException { - basicDocument.put("usage_date_start", "someStartDate"); + basicDocument.put("from", "someStartDate"); expectedException.expect(ParseException.class); expectedException.expectMessage("Unparseable date: \"someStartDate\""); @@ -207,8 +207,8 @@ public class AwsBillingServiceTest { private Document getBasicDocument() { return new Document().append("service_base_name", "someSBN").append("user", "someUser") .append("dlab_id", "someId").append("dlab_resource_type", "someResType") - .append("tag_resource_id", "someTagResourceId").append("usage_date_start", "2018-03-21") - .append("usage_date_end", "2018-03-22").append("full_report", false) + .append("tag_resource_id", "someTagResourceId").append("from", "2018-03-21") +
[incubator-dlab] 01/01: Merge pull request #404 from apache/DLAB-1260
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 7da906bd970592f62074330a5c276f89fe90efae Merge: 7cc7459 dd9310b Author: bhliva AuthorDate: Wed Nov 13 16:18:22 2019 +0200 Merge pull request #404 from apache/DLAB-1260 [DLAB-1260] Fixed bug with export billing report .../main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java | 4 ++-- .../com/epam/dlab/backendapi/service/aws/AwsBillingService.java | 3 --- .../epam/dlab/backendapi/service/aws/AwsBillingServiceTest.java | 8 3 files changed, 6 insertions(+), 9 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch v2.2-RC1 updated (feb5021 -> 7cc7459)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from feb5021 [DLAB-1216]: fixed login redirect in case bad request error add 8a6df76 [DLAB-1256] Fixed issue with stopping notebook new 7cc7459 Merge pull request #399 from apache/DLAB-1256 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. Summary of changes: .../schedulers/CheckUserQuoteScheduler.java| 2 +- .../backendapi/service/EnvironmentService.java | 2 ++ .../dlab/backendapi/service/SecurityService.java | 4 ++- .../backendapi/service/SecurityServiceImpl.java| 5 ++-- .../service/impl/EnvironmentServiceImpl.java | 20 -- .../service/impl/SchedulerJobServiceImpl.java | 10 +++ .../schedulers/CheckUserQuoteSchedulerTest.java| 4 +-- .../service/impl/EnvironmentServiceImplTest.java | 17 +--- .../service/impl/SchedulerJobServiceImplTest.java | 32 +++--- 9 files changed, 56 insertions(+), 40 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #399 from apache/DLAB-1256
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 7cc74593ec5382fbbb226fbf20c8d7731733b566 Merge: feb5021 8a6df76 Author: bhliva AuthorDate: Wed Nov 13 16:12:34 2019 +0200 Merge pull request #399 from apache/DLAB-1256 [DLAB-1256] Fixed issue with stopping notebook .../schedulers/CheckUserQuoteScheduler.java| 2 +- .../backendapi/service/EnvironmentService.java | 2 ++ .../dlab/backendapi/service/SecurityService.java | 4 ++- .../backendapi/service/SecurityServiceImpl.java| 5 ++-- .../service/impl/EnvironmentServiceImpl.java | 20 -- .../service/impl/SchedulerJobServiceImpl.java | 10 +++ .../schedulers/CheckUserQuoteSchedulerTest.java| 4 +-- .../service/impl/EnvironmentServiceImplTest.java | 17 +--- .../service/impl/SchedulerJobServiceImplTest.java | 32 +++--- 9 files changed, 56 insertions(+), 40 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (9971e35 -> 09cc6cd)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 9971e35 Merge pull request #403 from apache/DLAB-1213 add 9a4fe73 [DLAB-1216]: fixed login redirect in case bad request error new 09cc6cd Merge pull request #402 from apache/DLAB-1216 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. Summary of changes: .../webapp/src/app/core/interceptors/error.interceptor.ts | 8 +++- .../resources/webapp/src/app/resources/resources.component.ts | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch v2.2-RC1 updated (b52ddb6 -> 0025d43)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from b52ddb6 [DLAB-77] Temporarily removed tensor-rstudio template new 0f462e3 [DLAB-1213]: added endpoint for admin project management new 0025d43 [DLAB-1268]: added extra class for correct roles selection list The 2 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. Summary of changes: .../src/app/administration/management/management.component.ts| 2 +- .../webapp/src/app/administration/roles/roles.component.html | 2 +- .../resources/webapp/src/app/core/services/project.service.ts| 9 + .../src/main/resources/webapp/src/assets/styles/_theme.scss | 2 ++ 4 files changed, 13 insertions(+), 2 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch v2.2-RC1 updated: [DLAB-1216]: fixed login redirect in case bad request error
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/v2.2-RC1 by this push: new feb5021 [DLAB-1216]: fixed login redirect in case bad request error feb5021 is described below commit feb5021cf77252834575e9cd4d39b91f17b4b792 Author: Andriana Kovalyshyn AuthorDate: Wed Nov 13 12:24:45 2019 +0200 [DLAB-1216]: fixed login redirect in case bad request error --- .../webapp/src/app/core/interceptors/error.interceptor.ts | 8 +++- .../resources/webapp/src/app/resources/resources.component.ts | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/core/interceptors/error.interceptor.ts b/services/self-service/src/main/resources/webapp/src/app/core/interceptors/error.interceptor.ts index d464d16..e1b8039 100644 --- a/services/self-service/src/main/resources/webapp/src/app/core/interceptors/error.interceptor.ts +++ b/services/self-service/src/main/resources/webapp/src/app/core/interceptors/error.interceptor.ts @@ -47,13 +47,12 @@ import { HTTP_STATUS_CODES } from '../util'; intercept(request: HttpRequest, next: HttpHandler): Observable> { return next.handle(request).pipe( catchError(error => { - if (error instanceof HttpErrorResponse) { switch ((error).status) { case HTTP_STATUS_CODES.UNAUTHORIZED: return this.handleUnauthorized(request, next); case HTTP_STATUS_CODES.BAD_REQUEST: - return this.handleBadRequest(request, next); + return this.handleBadRequest(error, request, next); default: return _throw(error); } @@ -70,7 +69,6 @@ import { HTTP_STATUS_CODES } from '../util'; } private handleUnauthorized(request: HttpRequest, next: HttpHandler) { - if (!this.isRefreshing) { this.isRefreshing = true; this.jwtService.destroyAccessToken(); @@ -91,8 +89,8 @@ import { HTTP_STATUS_CODES } from '../util'; } } - private handleBadRequest(request: HttpRequest, next: HttpHandler) { -this.routingService.redirectToLoginPage(); + private handleBadRequest(error, request: HttpRequest, next: HttpHandler) { +if (!error.url.split('?')[0].endsWith('maven')) this.routingService.redirectToLoginPage(); return next.handle(request); } } diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts index bfdcdee..a31e129 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts @@ -61,6 +61,7 @@ export class ResourcesComponent implements OnInit { public refreshGrid(): void { this.resourcesGrid.buildGrid(); +this.getProjects(); this.getEnvironmentHealthStatus(); this.exploratoryEnvironments = this.resourcesGrid.environments; } - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/02: [DLAB-1213]: added endpoint for admin project management
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 0f462e3e1bf7ded0a81443f89ba51614b2963dd7 Author: Andriana Kovalyshyn AuthorDate: Wed Nov 13 14:18:08 2019 +0200 [DLAB-1213]: added endpoint for admin project management --- .../src/app/administration/management/management.component.ts| 2 +- .../resources/webapp/src/app/core/services/project.service.ts| 9 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts index 0cef57e..8e8b0b8 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts @@ -128,7 +128,7 @@ export class ManagementComponent implements OnInit { manageEnvironment(event: { action: string, project: any }) { if (event.action === 'stop') - this.projectService.toggleProjectStatus(event.project, event.action) + this.projectService.stopProjectAction(event.project.project_name) .subscribe(() => this.handleSuccessAction(event.action), error => this.toastr.error(error.message, 'Oops!')); if (event.action === 'terminate') diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts index bc06862..d623f52 100644 --- a/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts +++ b/services/self-service/src/main/resources/webapp/src/app/core/services/project.service.ts @@ -78,6 +78,15 @@ export class ProjectService { catchError(ErrorUtils.handleServiceError)); } + public stopProjectAction(data): Observable<{}> { +const url = `/managing/stop/${data}`; +return this.applicationServiceFacade + .buildToggleProjectStatus(url, data) + .pipe( +map(response => response), +catchError(ErrorUtils.handleServiceError)); + } + public updateProjectsBudget(data): Observable<{}> { const url = '/budget'; return this.applicationServiceFacade - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #402 from apache/DLAB-1216
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 09cc6cd6306f02b58fb487a60f6feec64cdb4db1 Merge: 9971e35 9a4fe73 Author: bhliva AuthorDate: Wed Nov 13 16:03:42 2019 +0200 Merge pull request #402 from apache/DLAB-1216 [DLAB-1216]: fixed login redirect in case bad request error .../webapp/src/app/core/interceptors/error.interceptor.ts | 8 +++- .../resources/webapp/src/app/resources/resources.component.ts | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #403 from apache/DLAB-1213
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 9971e35518e0991ccb7739792618e45c62dfc45f Merge: 015e069 59fffa2 Author: bhliva AuthorDate: Wed Nov 13 15:59:03 2019 +0200 Merge pull request #403 from apache/DLAB-1213 [DLAB-1213]: added endpoint for admin project management .../src/app/administration/management/management.component.ts| 2 +- .../webapp/src/app/administration/roles/roles.component.html | 2 +- .../resources/webapp/src/app/core/services/project.service.ts| 9 + .../src/main/resources/webapp/src/assets/styles/_theme.scss | 2 ++ 4 files changed, 13 insertions(+), 2 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/04: [DLAB-1230] Fixed billing issues [Azure]
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 4e96d9c2ed168ca80373cce0fdc32865bb9d0c21 Author: Oleh Fuks AuthorDate: Fri Nov 8 17:01:25 2019 +0200 [DLAB-1230] Fixed billing issues [Azure] --- .../azure/AzureBillableResourcesService.java | 39 -- .../azure/model/AzureDailyResourceInvoice.java | 3 ++ .../azure/model/AzureDlabBillableResource.java | 1 + 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java index 24cb3be..7b5fd61 100644 --- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java +++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java @@ -48,6 +48,7 @@ import static com.mongodb.client.model.Projections.fields; */ @Slf4j public class AzureBillableResourcesService { + private static final String SHARED_RESOURCE = "Shared resource"; private static final String[] USER_INSTANCES_EXCLUDED_FIELDS = {"scheduler_data", "last_activity", "computational_resources.scheduler_data", "computational_resources.last_activity"}; private final ObjectMapper objectMapper = new ObjectMapper(); @@ -173,11 +174,8 @@ public class AzureBillableResourcesService { new com.fasterxml.jackson.core.type.TypeReference>() { }); - if (edgeInfoList != null && !edgeInfoList.isEmpty()) { - for (EdgeInfoAzure edgeInfoAzure : edgeInfoList) { - billableResources.addAll(getEdgeAndStorageAccount(edgeInfoAzure)); - } - } + Optional.ofNullable(edgeInfoList).ifPresent(e -> e.stream().filter(Objects::nonNull).forEach( + edgeInfoAzure -> billableResources.addAll(getEdgeAndStorageAccount(edgeInfoAzure; return billableResources; } catch (IOException e) { @@ -194,28 +192,27 @@ public class AzureBillableResourcesService { billableResources.add(AzureDlabBillableResource.builder() .id(edgeInfoAzure.getUserStorageAccountTagName()) .type(DlabResourceType.EDGE_STORAGE_ACCOUNT) - .user(edgeInfoAzure.getId()).build()); + .user(SHARED_RESOURCE) + .build()); } if (StringUtils.isNotEmpty(edgeInfoAzure.getInstanceId())) { billableResources.add(AzureDlabBillableResource.builder() .id(edgeInfoAzure.getInstanceId()) .type(DlabResourceType.EDGE) - .user(edgeInfoAzure.getId()).build()); + .user(SHARED_RESOURCE) + .build()); billableResources.add(AzureDlabBillableResource.builder() - .id(serviceBaseName + "-" + edgeUserSimpleName(edgeInfoAzure) + "-edge-volume-primary") + .id(edgeInfoAzure.getInstanceId() + "-volume-primary") .type(DlabResourceType.VOLUME) - .user(edgeInfoAzure.getId()).build()); + .user(SHARED_RESOURCE) + .build()); } return billableResources; } - private String edgeUserSimpleName(EdgeInfoAzure edgeInfoAzure) { - return edgeInfoAzure.getId().replaceAll("@.*", ""); - } - private Set getNotebooksAndClusters() { Set billableResources = new HashSet<>(); @@ -249,8 +246,10 @@ public class AzureBillableResourcesService { .id(userInstanceDTO.getExploratoryId()) .type(DlabResourceType.EXPLORATORY) .user(userInstanceDTO.getUser()) + .project(userInstanceDTO.getProject()) .notebookId(userInstanceDTO.getExploratoryId()) -
[incubator-dlab] branch develop updated (4dd9fae -> 91332dd)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 4dd9fae Merge pull request #394 from apache/DLAB-1242 new 4e96d9c [DLAB-1230] Fixed billing issues [Azure] new b945660 [DLAB-1230] Fixed billing issues with edges [Azure] new adcaa4b Code review new 91332dd Code review The 4 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. Summary of changes: .../azure/AzureBillableResourcesService.java | 88 -- .../azure/model/AzureDailyResourceInvoice.java | 3 + .../azure/model/AzureDlabBillableResource.java | 1 + 3 files changed, 53 insertions(+), 39 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 03/04: Code review
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit adcaa4b3b29913114f598361f0190f6726534c26 Author: Oleh Fuks AuthorDate: Mon Nov 11 17:09:41 2019 +0200 Code review --- .../azure/AzureBillableResourcesService.java | 29 -- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java index fa3a518..ae9ff1c 100644 --- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java +++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java @@ -159,25 +159,28 @@ public class AzureBillableResourcesService { } private Set getEdgeAndStorageAccount() { - Set billableResources = new HashSet<>(); - Map> projectEndpoints = StreamSupport.stream(mongoDbBillingClient.getDatabase() .getCollection("Projects").find().spliterator(), false) .collect(Collectors.toMap(key -> key.getString("name").toLowerCase(), value -> (List) value.get("endpoints"))); - projectEndpoints.forEach((key, value) -> value.forEach(endpoint -> { - try { - billableResources.addAll(getEdgeAndStorageAccount(key, objectMapper.readValue( - objectMapper.writeValueAsString(endpoint.get("edgeInfo")), - new com.fasterxml.jackson.core.type.TypeReference() { - }))); - } catch (IOException ex) { - log.error("Error during preparation of billable resources", ex); - } - })); + Set edgeInfo = projectEndpoints.entrySet() + .stream() + .flatMap(e -> e.getValue().stream().map(endpoint -> { + try { + return getEdgeAndStorageAccount(e.getKey(), objectMapper.readValue(objectMapper.writeValueAsString(endpoint.get("edgeInfo")), + new com.fasterxml.jackson.core.type.TypeReference() { + })); + } catch (IOException ex) { + ex.printStackTrace(); + } + return null; + })) + .filter(Objects::nonNull) + .flatMap(Set::stream) + .collect(Collectors.toSet()); - return billableResources; + return new HashSet<>(edgeInfo); } private Set getEdgeAndStorageAccount(String projectName, EdgeInfoAzure edgeInfoAzure) { - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 04/04: Code review
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 91332dd9d50b5dbf56c25d3d9ff7da0dc18f7d6e Author: Oleh Fuks AuthorDate: Mon Nov 11 17:58:24 2019 +0200 Code review --- .../azure/AzureBillableResourcesService.java | 30 -- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java index ae9ff1c..c4ee5b4 100644 --- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java +++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java @@ -37,6 +37,7 @@ import org.bson.Document; import java.io.IOException; import java.util.*; import java.util.stream.Collectors; +import java.util.stream.Stream; import java.util.stream.StreamSupport; import static com.mongodb.client.model.Projections.exclude; @@ -164,23 +165,26 @@ public class AzureBillableResourcesService { .collect(Collectors.toMap(key -> key.getString("name").toLowerCase(), value -> (List) value.get("endpoints"))); - Set edgeInfo = projectEndpoints.entrySet() + return projectEndpoints.entrySet() .stream() - .flatMap(e -> e.getValue().stream().map(endpoint -> { + .flatMap(projectEndpoint -> getEdgeAndStoragePerProject(projectEndpoint.getKey(), projectEndpoint.getValue())) + .collect(Collectors.toSet()); + } + + private Stream getEdgeAndStoragePerProject(String projectName, List endpoints) { + return endpoints + .stream() + .flatMap(endpoint -> { try { - return getEdgeAndStorageAccount(e.getKey(), objectMapper.readValue(objectMapper.writeValueAsString(endpoint.get("edgeInfo")), + return getEdgeAndStorageAccount(projectName, objectMapper.readValue( + objectMapper.writeValueAsString(endpoint.get("edgeInfo")), new com.fasterxml.jackson.core.type.TypeReference() { - })); - } catch (IOException ex) { - ex.printStackTrace(); + })).stream(); + } catch (IOException e) { + log.error("Error during preparation of billable resources", e); } - return null; - })) - .filter(Objects::nonNull) - .flatMap(Set::stream) - .collect(Collectors.toSet()); - - return new HashSet<>(edgeInfo); + return Stream.empty(); + }); } private Set getEdgeAndStorageAccount(String projectName, EdgeInfoAzure edgeInfoAzure) { - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 02/04: [DLAB-1230] Fixed billing issues with edges [Azure]
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit b94566073a4ffe95657b4983327aea2e72bc6d8e Author: Oleh Fuks AuthorDate: Mon Nov 11 13:30:35 2019 +0200 [DLAB-1230] Fixed billing issues with edges [Azure] --- .../azure/AzureBillableResourcesService.java | 40 ++ 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java index 7b5fd61..fa3a518 100644 --- a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java +++ b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureBillableResourcesService.java @@ -161,31 +161,26 @@ public class AzureBillableResourcesService { private Set getEdgeAndStorageAccount() { Set billableResources = new HashSet<>(); - try { - - final FindIterable prjDocuments = mongoDbBillingClient.getDatabase() - .getCollection("Projects").find(); - final List edges = StreamSupport.stream(prjDocuments.spliterator(), false) - .flatMap(d -> ((List) d.get("endpoints")).stream()) - .map(d -> (Document) d.get("edgeInfo")) - .collect(Collectors.toList()); - List edgeInfoList = objectMapper.readValue( - objectMapper.writeValueAsString(edges), - new com.fasterxml.jackson.core.type.TypeReference>() { - }); - - Optional.ofNullable(edgeInfoList).ifPresent(e -> e.stream().filter(Objects::nonNull).forEach( - edgeInfoAzure -> billableResources.addAll(getEdgeAndStorageAccount(edgeInfoAzure; + Map> projectEndpoints = StreamSupport.stream(mongoDbBillingClient.getDatabase() + .getCollection("Projects").find().spliterator(), false) + .collect(Collectors.toMap(key -> key.getString("name").toLowerCase(), + value -> (List) value.get("endpoints"))); + + projectEndpoints.forEach((key, value) -> value.forEach(endpoint -> { + try { + billableResources.addAll(getEdgeAndStorageAccount(key, objectMapper.readValue( + objectMapper.writeValueAsString(endpoint.get("edgeInfo")), + new com.fasterxml.jackson.core.type.TypeReference() { + }))); + } catch (IOException ex) { + log.error("Error during preparation of billable resources", ex); + } + })); - return billableResources; - } catch (IOException e) { - log.error("Error during preparation of billable resources", e); - } return billableResources; } - private Set getEdgeAndStorageAccount(EdgeInfoAzure edgeInfoAzure) { - + private Set getEdgeAndStorageAccount(String projectName, EdgeInfoAzure edgeInfoAzure) { Set billableResources = new HashSet<>(); if (StringUtils.isNotEmpty(edgeInfoAzure.getUserContainerName())) { @@ -193,6 +188,7 @@ public class AzureBillableResourcesService { .id(edgeInfoAzure.getUserStorageAccountTagName()) .type(DlabResourceType.EDGE_STORAGE_ACCOUNT) .user(SHARED_RESOURCE) + .project(projectName) .build()); } @@ -201,12 +197,14 @@ public class AzureBillableResourcesService { .id(edgeInfoAzure.getInstanceId()) .type(DlabResourceType.EDGE) .user(SHARED_RESOURCE) + .project(projectName) .build()); billableResources.add(AzureDlabBillableResource.builder() .id(edgeInfoAzure.getInstanceId() + "-volume-prima
[incubator-dlab] branch v2.2-RC1 updated (90014b7 -> 1b0e962)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch v2.2-RC1 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 90014b7 Merge pull request #395 from apache/DLAB-1242rc add 761b0ae [DLAB-1230] Fixed billing issues [Azure] add bb4f91f [DLAB-1230] Fixed billing issues with edges [Azure] add 7229737 Code review add 5913ba1 Code review new 1b0e962 Merge pull request #392 from apache/DLAB-1230 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. Summary of changes: .../azure/AzureBillableResourcesService.java | 88 -- .../azure/model/AzureDailyResourceInvoice.java | 3 + .../azure/model/AzureDlabBillableResource.java | 1 + 3 files changed, 53 insertions(+), 39 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated: DLAB-000 unit test fixed
This is an automated email from the ASF dual-hosted git repository. bhliva 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 032493c DLAB-000 unit test fixed 032493c is described below commit 032493ce81aae246be42166a35fcad8ef1844a12 Author: bhliva AuthorDate: Fri Nov 8 14:12:42 2019 +0200 DLAB-000 unit test fixed --- .../dlab/backendapi/service/impl/ExploratoryServiceImplTest.java| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java index aa02ccd..c58703f 100644 --- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java +++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java @@ -138,7 +138,7 @@ public class ExploratoryServiceImplTest { try { exploratoryService.start(userInfo, EXPLORATORY_NAME, "project"); } catch (DlabException e) { - assertEquals("Could not exploratory/start exploratory environment expName: Exploratory for user with " + + assertEquals("Could not start exploratory environment expName: Exploratory for user with " + "name not found", e.getMessage()); } statusEnvBaseDTO = getStatusEnvBaseDTOWithStatus("starting"); @@ -190,7 +190,7 @@ public class ExploratoryServiceImplTest { try { exploratoryService.stop(userInfo, EXPLORATORY_NAME); } catch (DlabException e) { - assertEquals("Could not exploratory/stop exploratory environment expName: Exploratory for user with " + + assertEquals("Could not stop exploratory environment expName: Exploratory for user with " + "name not found", e.getMessage()); } statusEnvBaseDTO = getStatusEnvBaseDTOWithStatus("stopping"); @@ -243,7 +243,7 @@ public class ExploratoryServiceImplTest { try { exploratoryService.terminate(userInfo, EXPLORATORY_NAME); } catch (DlabException e) { - assertEquals("Could not exploratory/terminate exploratory environment expName: Exploratory for user " + + assertEquals("Could not terminate exploratory environment expName: Exploratory for user " + "with name not found", e.getMessage()); } statusEnvBaseDTO = getStatusEnvBaseDTOWithStatus("terminating"); - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated: DLAB-1246 error message changed in case when endpoint is not accessible
This is an automated email from the ASF dual-hosted git repository. bhliva 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 a7cd13e DLAB-1246 error message changed in case when endpoint is not accessible a7cd13e is described below commit a7cd13e738715531e2eb30998bf4278656da6fe8 Author: bhliva AuthorDate: Fri Nov 8 14:01:51 2019 +0200 DLAB-1246 error message changed in case when endpoint is not accessible --- .../com/epam/dlab/rest/client/RESTService.java | 24 -- .../service/impl/ExploratoryServiceImpl.java | 12 ++- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/client/RESTService.java b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/client/RESTService.java index 5008bcd..ab1d29e 100644 --- a/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/client/RESTService.java +++ b/services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/client/RESTService.java @@ -19,14 +19,17 @@ package com.epam.dlab.rest.client; +import com.epam.dlab.exceptions.DlabException; import lombok.extern.slf4j.Slf4j; +import javax.ws.rs.ProcessingException; import javax.ws.rs.client.Client; import javax.ws.rs.client.Entity; import javax.ws.rs.client.Invocation; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; +import java.net.ConnectException; import java.net.URI; import java.util.Collections; import java.util.Map; @@ -52,9 +55,7 @@ public class RESTService { } public T get(String path, Class clazz) { - Invocation.Builder builder = getBuilder(path); - log.debug("REST get {}", path); - return builder.get(clazz); + return get(path, null, clazz); } public T get(URI path, Class clazz) { @@ -64,22 +65,18 @@ public class RESTService { .get(clazz); } - public T post(String path, Object parameter, Class clazz) { - Invocation.Builder builder = getBuilder(path); - log.debug("REST post {}", path); - return builder.post(Entity.json(parameter), clazz); - } - public T get(String path, String accessToken, Class clazz) { Invocation.Builder builder = getBuilder(path, accessToken, Collections.emptyMap()); log.debug("REST get secured {} {}", path, accessToken); return builder.get(clazz); } + public T post(String path, Object parameter, Class clazz) { + return post(path, null, parameter, clazz); + } + public T post(String path, String accessToken, Object parameter, Class clazz) { - Invocation.Builder builder = getBuilder(path, accessToken, Collections.emptyMap()); - log.debug("REST post secured {} {}", path, accessToken); - return builder.post(Entity.json(parameter), clazz); + return post(path, accessToken, parameter, clazz, Collections.emptyMap()); } public T post(String path, String accessToken, Object parameter, Class clazz, @@ -89,9 +86,6 @@ public class RESTService { return builder.post(Entity.json(parameter), clazz); } - private Invocation.Builder getBuilder(String path) { - return getBuilder(path, null, Collections.emptyMap()); - } private Invocation.Builder getBuilder(String path, String token, Map queryParams) { WebTarget webTarget = getWebTarget(path); 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 9c5594b..500d0fc 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 @@ -121,7 +121,7 @@ public class ExploratoryServiceImpl implements ExploratoryService { updateExploratoryStatusSilent(userInfo.getName(), exploratory.getName(), FAILED); } throw new DlabException("Could not create exploratory environment " + exploratory.getName() + " for user " - + userInfo.getName() + ": " + t.getLocalizedMessage(), t); + + userInfo.getName() + ": " + Optional.ofNullable(t.getCause()).map(Throwable::getMessage).orElse(t.getMessage()), t); }
[incubator-dlab] 01/01: Merge pull request #373 from apache/dependabot/maven/integration-tests/com.nimbusds-nimbus-jose-jwt-7.9
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 152e81d9c69e38b0fb4147de0e213811faa2b560 Merge: 9a96f84 f9452d9 Author: bhliva AuthorDate: Wed Nov 6 15:36:26 2019 +0200 Merge pull request #373 from apache/dependabot/maven/integration-tests/com.nimbusds-nimbus-jose-jwt-7.9 Bump nimbus-jose-jwt from 5.2 to 7.9 in /integration-tests integration-tests/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch master updated (9a96f84 -> 152e81d)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 9a96f84 gcp_dlab image for documentation uploaded add f9452d9 Bump nimbus-jose-jwt from 5.2 to 7.9 in /integration-tests new 152e81d Merge pull request #373 from apache/dependabot/maven/integration-tests/com.nimbusds-nimbus-jose-jwt-7.9 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. Summary of changes: integration-tests/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (7491f51 -> e9f444a)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 7491f51 Merge pull request #383 from apache/DLAB-1238 add ea9265f [DLAB-1233] Fixed bug with disconnecting project endpoint[Quota] add b9d16fa Changed type of some boolean parameters to String add c0aa6ea Removed stepCerts add aaf05ee Merge branch 'develop' into DLAB-1233 add 7a90f86 Added test for method new e9f444a Merge pull request #382 from apache/DLAB-1233 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. Summary of changes: .../com/epam/dlab/dto/aws/AwsCloudSettings.java| 12 +-- .../epam/dlab/dto/azure/AzureCloudSettings.java| 12 +-- .../com/epam/dlab/dto/gcp/GcpCloudSettings.java| 12 +-- services/provisioning-service/provisioning.yml | 8 + .../epam/dlab/backendapi/CloudConfiguration.java | 10 -- .../backendapi/core/commands/CommandBuilder.java | 37 ++ .../service/impl/EnvironmentServiceImpl.java | 5 +++ .../service/impl/EnvironmentServiceImplTest.java | 37 ++ 8 files changed, 55 insertions(+), 78 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #382 from apache/DLAB-1233
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit e9f444af64e26e4130981f595bf89d0df562f619 Merge: 7491f51 7a90f86 Author: bhliva AuthorDate: Wed Nov 6 14:25:49 2019 +0200 Merge pull request #382 from apache/DLAB-1233 [DLAB-1233] Fixed bug with disconnecting project endpoint[Quota] .../com/epam/dlab/dto/aws/AwsCloudSettings.java| 12 +-- .../epam/dlab/dto/azure/AzureCloudSettings.java| 12 +-- .../com/epam/dlab/dto/gcp/GcpCloudSettings.java| 12 +-- services/provisioning-service/provisioning.yml | 8 + .../epam/dlab/backendapi/CloudConfiguration.java | 10 -- .../backendapi/core/commands/CommandBuilder.java | 37 ++ .../service/impl/EnvironmentServiceImpl.java | 5 +++ .../service/impl/EnvironmentServiceImplTest.java | 37 ++ 8 files changed, 55 insertions(+), 78 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated: DLAB-000 removed unnecessary swagger resource
This is an automated email from the ASF dual-hosted git repository. bhliva 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 8fa3240 DLAB-000 removed unnecessary swagger resource 8fa3240 is described below commit 8fa3240b76c1ea97706da52b19dd6be461076e6c Author: bhliva AuthorDate: Tue Nov 5 17:47:41 2019 +0200 DLAB-000 removed unnecessary swagger resource --- .../dlab/backendapi/SelfServiceApplication.java| 1 - .../dlab/backendapi/resources/SwaggerResource.java | 25 -- 2 files changed, 26 deletions(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java index 9d17eb0..25d24e5 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java @@ -179,7 +179,6 @@ public class SelfServiceApplication extends Application
[incubator-dlab] branch develop updated (f2822df -> 0dca866)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from f2822df Merge pull request #381 from apache/DLAB-1237 new 3dc952d Merge branch 'develop' of /Users/bohdan.hliva/IdeaProjects/incubator-dlab with conflicts. new 0dca866 DLAB-000 remove swagger 1.x and replace it with openapi The 2 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. Summary of changes: pom.xml| 5 -- services/self-service/pom.xml | 27 ++-- services/self-service/self-service.yml | 11 .../dlab/backendapi/SelfServiceApplication.java| 6 ++ .../conf/SelfServiceApplicationConfiguration.java | 8 --- .../resources/ApplicationSettingResource.java | 17 ++--- .../dlab/backendapi/resources/BackupResource.java | 20 ++ .../dlab/backendapi/resources/EdgeResource.java| 12 +--- .../backendapi/resources/EnvironmentResource.java | 26 ++-- .../backendapi/resources/ExploratoryResource.java | 36 -- .../backendapi/resources/GitCredsResource.java | 12 +--- .../resources/ImageExploratoryResource.java| 27 ++-- .../resources/InfrastructureInfoResource.java | 15 + .../resources/InfrastructureTemplateResource.java | 14 +--- .../backendapi/resources/KeyUploaderResource.java | 28 ++-- .../resources/LibExploratoryResource.java | 32 ++--- .../backendapi/resources/SchedulerJobResource.java | 46 ++--- .../backendapi/resources/SecurityResource.java | 24 +-- .../backendapi/resources/SystemInfoResource.java | 8 +-- .../backendapi/resources/UserGroupResource.java| 77 +- .../backendapi/resources/UserRoleResource.java | 12 +--- .../backendapi/resources/UserSettingsResource.java | 17 ++--- .../resources/aws/ComputationalResourceAws.java| 67 --- .../azure/ComputationalResourceAzure.java | 51 ++ .../resources/gcp/ComputationalResourceGcp.java| 64 -- .../resources/swagger/SwaggerSecurityInfo.java | 38 --- .../service/impl/EnvironmentServiceImpl.java | 3 - 27 files changed, 143 insertions(+), 560 deletions(-) delete mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/resources/swagger/SwaggerSecurityInfo.java - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 02/02: DLAB-000 remove swagger 1.x and replace it with openapi
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 0dca866f699a26191b097632b8d207b764b94bb4 Author: bhliva AuthorDate: Tue Nov 5 16:43:02 2019 +0200 DLAB-000 remove swagger 1.x and replace it with openapi --- services/provisioning-service/provisioning.yml | 9 ++- services/self-service/pom.xml | 27 ++-- services/self-service/self-service.yml | 11 .../dlab/backendapi/SelfServiceApplication.java| 4 +- .../conf/SelfServiceApplicationConfiguration.java | 8 --- .../resources/ApplicationSettingResource.java | 17 ++--- .../dlab/backendapi/resources/BackupResource.java | 20 ++ .../dlab/backendapi/resources/EdgeResource.java| 12 +--- .../backendapi/resources/EnvironmentResource.java | 26 ++-- .../backendapi/resources/ExploratoryResource.java | 36 -- .../backendapi/resources/GitCredsResource.java | 12 +--- .../resources/ImageExploratoryResource.java| 27 ++-- .../resources/InfrastructureInfoResource.java | 15 + .../resources/InfrastructureTemplateResource.java | 14 +--- .../backendapi/resources/KeyUploaderResource.java | 28 ++-- .../resources/LibExploratoryResource.java | 32 ++--- .../backendapi/resources/SchedulerJobResource.java | 46 ++--- .../backendapi/resources/SecurityResource.java | 24 +-- .../backendapi/resources/SystemInfoResource.java | 8 +-- .../backendapi/resources/UserGroupResource.java| 77 +- .../backendapi/resources/UserRoleResource.java | 12 +--- .../backendapi/resources/UserSettingsResource.java | 17 ++--- .../resources/aws/ComputationalResourceAws.java| 67 --- .../azure/ComputationalResourceAzure.java | 51 ++ .../resources/gcp/ComputationalResourceGcp.java| 64 -- .../resources/swagger/SwaggerSecurityInfo.java | 38 --- .../service/impl/EnvironmentServiceImpl.java | 3 - 27 files changed, 143 insertions(+), 562 deletions(-) diff --git a/services/provisioning-service/provisioning.yml b/services/provisioning-service/provisioning.yml index d96969b..3e34454 100644 --- a/services/provisioning-service/provisioning.yml +++ b/services/provisioning-service/provisioning.yml @@ -87,17 +87,16 @@ logging: archivedLogFilenamePattern: ${LOG_ROOT_DIR}/ssn/provisioning-%d{-MM-dd}.log.gz archivedFileCount: 10 - keycloakConfiguration: - realm: DLAB_bhliva + realm: KEYCLOAK_REALM_NAME bearer-only: true - auth-server-url: http://52.11.45.11:8080/auth + auth-server-url: KEYCLOAK_AUTH_SERVER_URL ssl-required: none register-node-at-startup: true register-node-period: 600 - resource: sss + resource: KEYCLOAK_CLIENT_NAME credentials: -secret: 37338cc5-77f9-47f9-9d95-5cb716b91118 +secret: KEYCLOAK_CLIENT_SECRET cloudProperties: os: CONF_OS diff --git a/services/self-service/pom.xml b/services/self-service/pom.xml index 2b446a4..5539d12 100644 --- a/services/self-service/pom.xml +++ b/services/self-service/pom.xml @@ -163,11 +163,6 @@ -com.fashiontrade -dropwizard-swagger-v3 -1.0.0 - - org.glassfish.jersey.test-framework.providers jersey-test-framework-provider-grizzly2 ${org.glassfish.jersey.media.version} @@ -249,6 +244,28 @@ + +io.swagger.core.v3 +swagger-maven-plugin +2.0.10 + +openapi + ${project.build.directory}/classes/webapp/dist +JSONANDYAML + +com.epam.dlab.backendapi.resources + +TRUE + + + +compile + +resolve + + + + diff --git a/services/self-service/self-service.yml b/services/self-service/self-service.yml index 181b517..ab6dfd9 100644 --- a/services/self-service/self-service.yml +++ b/services/self-service/self-service.yml @@ -119,17 +119,6 @@ logging: archivedLogFilenamePattern: ${LOG_ROOT_DIR}/ssn/selfservice-%d{-MM-dd}.log.gz archivedFileCount: 10 -swaggerConfiguration: - resourcePackage: com.epam.dlab.backendapi.resources - title: DLab API - description: Essential toolset for analytics. Deployed on ${CLOUD_TYPE} provider - schemes: [https, http] - version: 2.0 - contact: DLab - contactUrl: http://dlab.opensource.epam.com/ - license: Apache 2.0 - licenseUrl: https://www.apache.org/licenses/LICENSE-2.0
[incubator-dlab] 01/02: Merge branch 'develop' of /Users/bohdan.hliva/IdeaProjects/incubator-dlab with conflicts.
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 3dc952de16d7fc94f59d7af5e2997ff85cd704c2 Author: bhliva AuthorDate: Fri Nov 1 14:23:26 2019 +0200 Merge branch 'develop' of /Users/bohdan.hliva/IdeaProjects/incubator-dlab with conflicts. --- pom.xml | 5 - services/provisioning-service/provisioning.yml | 9 + services/self-service/pom.xml| 6 +++--- .../java/com/epam/dlab/backendapi/SelfServiceApplication.java| 6 ++ 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index d24b10b..853ef15 100644 --- a/pom.xml +++ b/pom.xml @@ -129,11 +129,6 @@ dropwizard-util ${io.dropwizard.version} - -com.smoketurner -dropwizard-swagger -${dropwizard.swagger.version} - diff --git a/services/provisioning-service/provisioning.yml b/services/provisioning-service/provisioning.yml index 3e34454..d96969b 100644 --- a/services/provisioning-service/provisioning.yml +++ b/services/provisioning-service/provisioning.yml @@ -87,16 +87,17 @@ logging: archivedLogFilenamePattern: ${LOG_ROOT_DIR}/ssn/provisioning-%d{-MM-dd}.log.gz archivedFileCount: 10 + keycloakConfiguration: - realm: KEYCLOAK_REALM_NAME + realm: DLAB_bhliva bearer-only: true - auth-server-url: KEYCLOAK_AUTH_SERVER_URL + auth-server-url: http://52.11.45.11:8080/auth ssl-required: none register-node-at-startup: true register-node-period: 600 - resource: KEYCLOAK_CLIENT_NAME + resource: sss credentials: -secret: KEYCLOAK_CLIENT_SECRET +secret: 37338cc5-77f9-47f9-9d95-5cb716b91118 cloudProperties: os: CONF_OS diff --git a/services/self-service/pom.xml b/services/self-service/pom.xml index b529842..2b446a4 100644 --- a/services/self-service/pom.xml +++ b/services/self-service/pom.xml @@ -162,10 +162,10 @@ 1.1 - -com.smoketurner -dropwizard-swagger +com.fashiontrade +dropwizard-swagger-v3 +1.0.0 org.glassfish.jersey.test-framework.providers diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java index 6dbe88c..3b4e21a 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java @@ -94,6 +94,12 @@ public class SelfServiceApplication extends Application() { + @Override + protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(SelfServiceApplicationConfiguration configuration) { + return configuration.getSwaggerConfiguration(); + } + }); } @Override - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #379 from apache/DLAB-1183
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit f1f5faa3f4a991512bce0bba0762e0626ea5e7b3 Merge: 8e35934 5503abd Author: bhliva AuthorDate: Mon Nov 4 12:23:50 2019 +0200 Merge pull request #379 from apache/DLAB-1183 [DLAB-1183] Added some values for edge(Billing) .../com/epam/dlab/billing/gcp/service/BillingServiceImpl.java | 2 +- .../java/com/epam/dlab/billing/gcp/util/BillingUtils.java | 4 ++-- .../java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java | 11 ++- 3 files changed, 9 insertions(+), 8 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch auto-tests-omart updated: DLAB-000 swagger ui added
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch auto-tests-omart in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/auto-tests-omart by this push: new 99e4f50 DLAB-000 swagger ui added 99e4f50 is described below commit 99e4f50b2c3f1c6676038929ca36b6293cec403f Author: bhliva AuthorDate: Fri Nov 1 17:35:07 2019 +0200 DLAB-000 swagger ui added --- services/self-service/pom.xml | 2 +- .../main/java/com/epam/dlab/backendapi/SelfServiceApplication.java| 2 ++ .../main/java/com/epam/dlab/backendapi/resources/ProjectResource.java | 4 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/services/self-service/pom.xml b/services/self-service/pom.xml index b529842..c61b7d4 100644 --- a/services/self-service/pom.xml +++ b/services/self-service/pom.xml @@ -162,10 +162,10 @@ 1.1 - com.smoketurner dropwizard-swagger +1.3.12-1 org.glassfish.jersey.test-framework.providers diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java index 6dbe88c..228e243 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java @@ -53,6 +53,8 @@ import io.dropwizard.jersey.setup.JerseyEnvironment; import io.dropwizard.jetty.BiDiGzipHandler; import io.dropwizard.setup.Bootstrap; import io.dropwizard.setup.Environment; +import io.federecio.dropwizard.swagger.SwaggerBundle; +import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration; import lombok.extern.slf4j.Slf4j; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java index c361b1b..fd52ac3 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/ProjectResource.java @@ -3,12 +3,15 @@ package com.epam.dlab.backendapi.resources; import com.epam.dlab.auth.UserInfo; import com.epam.dlab.backendapi.domain.*; import com.epam.dlab.backendapi.resources.dto.ProjectActionFormDTO; +import com.epam.dlab.backendapi.resources.swagger.SwaggerSecurityInfo; import com.epam.dlab.backendapi.service.AccessKeyService; import com.epam.dlab.backendapi.service.ProjectService; import com.epam.dlab.dto.UserInstanceStatus; import com.epam.dlab.rest.dto.ErrorDTO; import com.google.inject.Inject; import io.dropwizard.auth.Auth; +import io.swagger.annotations.Api; +import io.swagger.annotations.Authorization; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.headers.Header; @@ -29,6 +32,7 @@ import java.util.List; import java.util.stream.Collectors; @Path("project") +@Api(value = "Project API", authorizations = @Authorization(SwaggerSecurityInfo.TOKEN_AUTH)) public class ProjectResource { private final ProjectService projectService; private final AccessKeyService keyService; - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (2f6de60 -> 9d5cc02)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 2f6de60 Merge pull request #374 from apache/DLAB-1224 add 557d46b [DLAB-1226] Fixed bug with notebook stopping [AWS] add 9d5cc02 Merge pull request #375 from apache/DLAB-1226 No new revisions were added by this update. Summary of changes: .../src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (9d5cc02 -> fe6d2b9)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 9d5cc02 Merge pull request #375 from apache/DLAB-1226 add 0700f6a [DLAB-1228] Fixed bug with group while creating resource add fe6d2b9 Merge pull request #376 from apache/DLAB-1228 No new revisions were added by this update. Summary of changes: .../src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java | 7 +++ .../com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #374 from apache/DLAB-1224
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 2f6de60099919d07402997ec09f498170c75cbf6 Merge: 5bd5569 f2c367c Author: bhliva AuthorDate: Fri Nov 1 12:14:18 2019 +0200 Merge pull request #374 from apache/DLAB-1224 [DLAB-1224] Fixed bug with reconfiguration spark on Notebook [Azure] .../src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (5bd5569 -> 2f6de60)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 5bd5569 Merge pull request #361 from apache/DLAB-1036 add f2c367c [DLAB-1224] Fixed bug with reconfiguration spark on Notebook [Azure] new 2f6de60 Merge pull request #374 from apache/DLAB-1224 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. Summary of changes: .../src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-1158 updated: [DLAB-1220] Added new cloud parameter in provisioning
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch DLAB-1158 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-1158 by this push: new 6a73622 [DLAB-1220] Added new cloud parameter in provisioning 6a73622 is described below commit 6a73622030f61fb7a776e3cc1fb1cb32ed5696fc Author: Oleh Fuks AuthorDate: Thu Oct 31 18:31:16 2019 +0200 [DLAB-1220] Added new cloud parameter in provisioning --- .../com/epam/dlab/dto/aws/AwsCloudSettings.java| 12 +++ .../epam/dlab/dto/azure/AzureCloudSettings.java| 12 +++ .../com/epam/dlab/dto/gcp/GcpCloudSettings.java| 12 +++ services/provisioning-service/provisioning.yml | 1 + .../epam/dlab/backendapi/CloudConfiguration.java | 11 ++ .../backendapi/core/commands/CommandBuilder.java | 40 +- 6 files changed, 80 insertions(+), 8 deletions(-) diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/AwsCloudSettings.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/AwsCloudSettings.java index ccf56df..6552902 100644 --- a/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/AwsCloudSettings.java +++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/aws/AwsCloudSettings.java @@ -68,6 +68,18 @@ public class AwsCloudSettings extends CloudSettings { protected String sbn; @JsonProperty("conf_key_dir") protected String confKeyDir; + @JsonProperty("conf_shared_image_enabled") + private boolean sharedImageEnabled; + @JsonProperty("conf_stepcerts_enabled") + private boolean stepCertsEnabled; + @JsonProperty("conf_stepcerts_root_ca") + private String stepCertsRootCA; + @JsonProperty("conf_stepcerts_kid") + private String stepCertsKid; + @JsonProperty("conf_stepcerts_kid_password") + private String stepCertsKidPassword; + @JsonProperty("conf_stepcerts_ca_url") + private String stepCertsCAURL; @Override @JsonIgnore diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/AzureCloudSettings.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/AzureCloudSettings.java index 6e86fd1..901216d 100644 --- a/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/AzureCloudSettings.java +++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/azure/AzureCloudSettings.java @@ -46,6 +46,18 @@ public class AzureCloudSettings extends CloudSettings { private String azureSecurityGroupName; @JsonProperty("conf_key_dir") protected String confKeyDir; +@JsonProperty("conf_shared_image_enabled") +private boolean sharedImageEnabled; +@JsonProperty("conf_stepcerts_enabled") +private boolean stepCertsEnabled; +@JsonProperty("conf_stepcerts_root_ca") +private String stepCertsRootCA; +@JsonProperty("conf_stepcerts_kid") +private String stepCertsKid; +@JsonProperty("conf_stepcerts_kid_password") +private String stepCertsKidPassword; +@JsonProperty("conf_stepcerts_ca_url") +private String stepCertsCAURL; @Override @JsonIgnore diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/GcpCloudSettings.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/GcpCloudSettings.java index 35aade3..5542aeb 100644 --- a/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/GcpCloudSettings.java +++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/gcp/GcpCloudSettings.java @@ -62,6 +62,18 @@ public class GcpCloudSettings extends CloudSettings { protected String zone; @JsonProperty("gcp_region") protected String region; + @JsonProperty("conf_shared_image_enabled") + private boolean sharedImageEnabled; + @JsonProperty("conf_stepcerts_enabled") + private boolean stepCertsEnabled; + @JsonProperty("conf_stepcerts_root_ca") + private String stepCertsRootCA; + @JsonProperty("conf_stepcerts_kid") + private String stepCertsKid; + @JsonProperty("conf_stepcerts_kid_password") + private String stepCertsKidPassword; + @JsonProperty("conf_stepcerts_ca_url") + private String stepCertsCAURL; @Override @JsonIgnore diff --git a/services/provisioning-service/provisioning.yml b/services/provisioning-service/provisioning.yml index ea175c7..d13a399 100644 --- a/services/provisioning-service/provisioning.yml +++ b/services/provisioning-service/provisioning.yml @@ -119,6 +119,7 @@ cloudProperties: datalakeTagName: AZURE_DATALAKE_TAG azureClientId: AZURE_CLIENT_ID gcpProjectId: GCP_PROJECT_ID + sharedImageEnabled: SHARED_IMAGE_ENABLED ld
[incubator-dlab] 01/01: Merge pull request #361 from apache/DLAB-1036
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 5bd55695ff3f2ceeec2362ddaa5cd1a1ca359f1c Merge: 33556e7 e9cecd4 Author: bhliva AuthorDate: Thu Oct 31 14:16:58 2019 +0200 Merge pull request #361 from apache/DLAB-1036 [DLAB-1036] Pass user/project/endpoint/custom tags to FE on Billing Report page .../epam/dlab/backendapi/dao/BaseBillingDAO.java | 203 + .../com/epam/dlab/backendapi/domain/BaseShape.java | 23 +++ .../backendapi/domain/DataEngineServiceShape.java | 37 .../dlab/backendapi/domain/DataEngineShape.java| 34 .../epam/dlab/backendapi/domain/EndpointShape.java | 14 ++ .../dlab/backendapi/domain/ExploratoryShape.java | 14 ++ .../com/epam/dlab/backendapi/domain/SsnShape.java | 14 ++ .../epam/dlab/backendapi/service/ShapeFormat.java | 5 + 8 files changed, 225 insertions(+), 119 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (33556e7 -> 5bd5569)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 33556e7 DLAB-000 fixed bug connected with project dropdown during resource creation add 8da35a2 [DLAB-1036] Pass user/project/endpoint/custom tags to FE on Billing Report page add 8c813df [DLAB-1036] Renamed method add e9cecd4 [DLAB-1036] Refactor BaseBillingDAO new 5bd5569 Merge pull request #361 from apache/DLAB-1036 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. Summary of changes: .../epam/dlab/backendapi/dao/BaseBillingDAO.java | 203 + .../com/epam/dlab/backendapi/domain/BaseShape.java | 23 +++ .../backendapi/domain/DataEngineServiceShape.java | 37 .../dlab/backendapi/domain/DataEngineShape.java| 34 .../epam/dlab/backendapi/domain/EndpointShape.java | 14 ++ .../dlab/backendapi/domain/ExploratoryShape.java | 14 ++ .../com/epam/dlab/backendapi/domain/SsnShape.java | 14 ++ .../epam/dlab/backendapi/service/ShapeFormat.java | 5 + 8 files changed, 225 insertions(+), 119 deletions(-) create mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/domain/BaseShape.java create mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/domain/DataEngineServiceShape.java create mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/domain/DataEngineShape.java create mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/domain/EndpointShape.java create mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryShape.java create mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/domain/SsnShape.java create mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/service/ShapeFormat.java - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated: DLAB-000 fixed bug connected with project dropdown during resource creation
This is an automated email from the ASF dual-hosted git repository. bhliva 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 33556e7 DLAB-000 fixed bug connected with project dropdown during resource creation 33556e7 is described below commit 33556e7364e9422134788ec120bcd2d3a5cdf4bb Author: bhliva AuthorDate: Thu Oct 31 14:09:45 2019 +0200 DLAB-000 fixed bug connected with project dropdown during resource creation --- .../com/epam/dlab/backendapi/dao/ProjectDAOImpl.java | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java index 12433bf..c54af47 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java @@ -17,6 +17,7 @@ import java.util.Optional; import java.util.Set; import java.util.regex.Pattern; import java.util.stream.Collectors; +import java.util.stream.Stream; import static com.mongodb.client.model.Filters.*; @@ -59,8 +60,11 @@ public class ProjectDAOImpl extends BaseDAO implements ProjectDAO { @Override public List getUserProjects(UserInfo userInfo) { - return find(PROJECTS_COLLECTION, and(in(GROUPS, Sets.union(userGroupDao.getUserGroups(userInfo.getName()), - userInfo.getRoles())), eq(ENDPOINT_STATUS_FIELD, UserInstanceStatus.RUNNING.name())), + final Set groups = Stream.concat(userGroupDao.getUserGroups(userInfo.getName()).stream(), + userInfo.getRoles().stream()) + .collect(Collectors.toSet()); + return find(PROJECTS_COLLECTION, and(elemMatch(GROUPS, regexCaseInsensitive(String.join("|", groups))), eq(ENDPOINT_STATUS_FIELD, + UserInstanceStatus.RUNNING.name())), ProjectDTO.class); } @@ -125,8 +129,7 @@ public class ProjectDAOImpl extends BaseDAO implements ProjectDAO { @Override public boolean isAnyProjectAssigned(Set groups) { final String groupsRegex = !groups.isEmpty() ? String.join("|", groups) + "|" + ANYUSER : ANYUSER; - return !Iterables.isEmpty(find(PROJECTS_COLLECTION, elemMatch(GROUPS, new Document("$regex", - "^(" + groupsRegex + ")$").append("$options", "i"; + return !Iterables.isEmpty(find(PROJECTS_COLLECTION, elemMatch(GROUPS, regexCaseInsensitive(groupsRegex; } private Bson projectCondition(String name) { @@ -136,4 +139,9 @@ public class ProjectDAOImpl extends BaseDAO implements ProjectDAO { private Bson projectAndEndpointCondition(String projectName, String endpointName) { return and(eq("name", projectName), eq("endpoints.name", endpointName)); } + + private Document regexCaseInsensitive(String values) { + return new Document("$regex", + "^(" + values + ")$").append("$options", "i"); + } } - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (dc99b19 -> ee89627)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from dc99b19 Merge pull request #366 from apache/DLAB-1207 add d2c1eab [DLAB-1217] Added parameter endpoint_name for Data Engine reconfiguration new ee89627 Merge pull request #367 from apache/DLAB-1217 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. Summary of changes: .../src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java| 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #367 from apache/DLAB-1217
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit ee896277af1c8c11a5883fe3cff0651400096a7b Merge: dc99b19 d2c1eab Author: bhliva AuthorDate: Wed Oct 30 12:19:56 2019 +0200 Merge pull request #367 from apache/DLAB-1217 [DLAB-1217] Added parameter endpoint_name for Data Engine reconfigura… .../src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java| 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #366 from apache/DLAB-1207
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit dc99b1970b6f9d7e2d6f45dbf304141f1313668b Merge: d894b55 635726a Author: bhliva AuthorDate: Tue Oct 29 21:17:00 2019 +0200 Merge pull request #366 from apache/DLAB-1207 [DLAB-1207]: fixed active project filtering .../project-list/project-list.component.html | 8 +- .../project-list/project-list.component.scss | 21 ++- .../project/project-list/project-list.component.ts | 4 +- .../cluster-details/cluster-details.component.html | 5 +- .../computational-resources-list.component.scss| 171 +++-- .../resources/webapp/src/assets/styles/_theme.scss | 6 + 6 files changed, 120 insertions(+), 95 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (d894b55 -> dc99b19)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from d894b55 DLAB-000 fixed bug with wrong pattern matching add f396c78 [DLAB-1207]: fixed issue with prevent actions on projects add 2999645 [DLAB-1207]: prevent actions on failed endpoints; alignment fixes add fb5592c [DLAB-1207]: fixed active project filtering add 635726a [DLAB-1091]: links fixes on cluster detail dialog new dc99b19 Merge pull request #366 from apache/DLAB-1207 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. Summary of changes: .../project-list/project-list.component.html | 8 +- .../project-list/project-list.component.scss | 21 ++- .../project/project-list/project-list.component.ts | 4 +- .../cluster-details/cluster-details.component.html | 5 +- .../computational-resources-list.component.scss| 171 +++-- .../resources/webapp/src/assets/styles/_theme.scss | 6 + 6 files changed, 120 insertions(+), 95 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated: DLAB-000 fixed bug with wrong pattern matching
This is an automated email from the ASF dual-hosted git repository. bhliva 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 d894b55 DLAB-000 fixed bug with wrong pattern matching d894b55 is described below commit d894b5546d6f9b026bf3fab4be36d479bc61a920 Author: bhliva AuthorDate: Tue Oct 29 16:28:23 2019 +0200 DLAB-000 fixed bug with wrong pattern matching --- .../src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java index 0c507b4..12433bf 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ProjectDAOImpl.java @@ -15,6 +15,7 @@ import java.util.Arrays; import java.util.List; import java.util.Optional; import java.util.Set; +import java.util.regex.Pattern; import java.util.stream.Collectors; import static com.mongodb.client.model.Filters.*; @@ -28,7 +29,7 @@ public class ProjectDAOImpl extends BaseDAO implements ProjectDAO { private static final String ENDPOINT_STATUS_FIELD = "endpoints." + STATUS_FIELD; private static final String EDGE_INFO_FIELD = "edgeInfo"; private static final String ENDPOINT_FIELD = "endpoints.$."; - private static final String ANYUSER = "$anyuser"; + private static final String ANYUSER = Pattern.quote("$anyuser"); private final UserGroupDao userGroupDao; - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #358 from apache/DLAB-1075
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 91ba1f9f53184f991fc5baaa88e7076f5d68551f Merge: d39bfd5 9e7f29a Author: bhliva AuthorDate: Fri Oct 25 14:17:45 2019 +0300 Merge pull request #358 from apache/DLAB-1075 Dlab 1075 .../dlab/backendapi/domain/ProjectManagingDTO.java | 16 +++ .../dlab/backendapi/resources/ProjectResource.java | 36 +++ .../dlab/backendapi/service/ProjectService.java| 5 ++ .../service/impl/ProjectServiceImpl.java | 54 +- .../backendapi/resources/ProjectResourceTest.java | 27 +++ 5 files changed, 137 insertions(+), 1 deletion(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-1075 created (now 9e7f29a)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch DLAB-1075 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. at 9e7f29a Code review No new revisions were added by this update. - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (ed83108 -> d39bfd5)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from ed83108 Merge pull request #357 from apache/DLAB-1205 add 1ecb8ae [DLAB-1201] Fixed scheduler issue with token expiration add 366332d [DLAB-1201] added changes for other schedulers add e187c52 [DLAB-1201] Code review new d39bfd5 Merge pull request #355 from apache/DLAB-1201 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. Summary of changes: .../dlab/model/scheduler/SchedulerJobData.java | 3 ++ .../epam/dlab/backendapi/dao/ComputationalDAO.java | 1 + .../epam/dlab/backendapi/dao/SchedulerJobDAO.java | 6 ++- .../schedulers/CheckProjectQuoteScheduler.java | 2 +- .../dlab/backendapi/service/KeycloakService.java | 1 + .../backendapi/service/KeycloakServiceImpl.java| 10 + .../dlab/backendapi/service/SecurityService.java | 1 + .../backendapi/service/SecurityServiceImpl.java| 6 +++ .../service/impl/EnvironmentServiceImpl.java | 2 +- .../service/impl/SchedulerJobServiceImpl.java | 19 + .../resources/SchedulerJobResourceTest.java| 4 +- .../service/impl/EnvironmentServiceImplTest.java | 12 +++--- .../service/impl/SchedulerJobServiceImplTest.java | 49 +++--- 13 files changed, 72 insertions(+), 44 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #355 from apache/DLAB-1201
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit d39bfd558994bcbc17a0ca6244859dee3dbd7fac Merge: ed83108 e187c52 Author: bhliva AuthorDate: Fri Oct 25 11:07:29 2019 +0300 Merge pull request #355 from apache/DLAB-1201 [DLAB-1201] Fixed scheduler issue with token expiration .../dlab/model/scheduler/SchedulerJobData.java | 3 ++ .../epam/dlab/backendapi/dao/ComputationalDAO.java | 1 + .../epam/dlab/backendapi/dao/SchedulerJobDAO.java | 6 ++- .../schedulers/CheckProjectQuoteScheduler.java | 2 +- .../dlab/backendapi/service/KeycloakService.java | 1 + .../backendapi/service/KeycloakServiceImpl.java| 10 + .../dlab/backendapi/service/SecurityService.java | 1 + .../backendapi/service/SecurityServiceImpl.java| 6 +++ .../service/impl/EnvironmentServiceImpl.java | 2 +- .../service/impl/SchedulerJobServiceImpl.java | 19 + .../resources/SchedulerJobResourceTest.java| 4 +- .../service/impl/EnvironmentServiceImplTest.java | 12 +++--- .../service/impl/SchedulerJobServiceImplTest.java | 49 +++--- 13 files changed, 72 insertions(+), 44 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (aeac45e -> ed83108)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from aeac45e Merge pull request #356 from apache/DLAB-1206 add 244e769 [DLAB-1205] - Fetch endpoint of notebook from which image is created add 59cbf1e [DLAB-1205] Fixed tests new ed83108 Merge pull request #357 from apache/DLAB-1205 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. Summary of changes: .../service/impl/ImageExploratoryServiceImpl.java | 10 +- .../src/app/core/services/userResource.service.ts | 4 ++-- .../create-environment/create-environment.component.ts | 3 ++- .../service/impl/ImageExploratoryServiceImplTest.java | 18 +++--- 4 files changed, 24 insertions(+), 11 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #357 from apache/DLAB-1205
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit ed831084223a54793c1d499cbb02ff1e07b1c012 Merge: aeac45e 59cbf1e Author: bhliva AuthorDate: Fri Oct 25 10:35:59 2019 +0300 Merge pull request #357 from apache/DLAB-1205 [DLAB-1205] - Fetch endpoint of notebook from which image is created .../service/impl/ImageExploratoryServiceImpl.java | 10 +- .../src/app/core/services/userResource.service.ts | 4 ++-- .../create-environment/create-environment.component.ts | 3 ++- .../service/impl/ImageExploratoryServiceImplTest.java | 18 +++--- 4 files changed, 24 insertions(+), 11 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #356 from apache/DLAB-1206
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit aeac45edcf52abddb1dbd7b778fce8e3d2075758 Merge: 85a30a0 05d390c Author: bhliva AuthorDate: Thu Oct 24 14:48:40 2019 +0300 Merge pull request #356 from apache/DLAB-1206 [DLAB-1206] - Fixed issues with billing and roles(GCP) .../src/ssn/files/gcp/mongo_roles.json | 10 +++ services/billing-gcp/billing.yml | 2 +- services/billing-gcp/pom.xml | 13 +++- .../billing/gcp/service/BillingServiceImpl.java| 1 + .../gcp/service/BillingServiceImplTest.java| 87 ++ .../src/main/resources/mongo/gcp/mongo_roles.json | 10 +++ 6 files changed, 121 insertions(+), 2 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (85a30a0 -> aeac45e)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 85a30a0 Merge pull request #353 from apache/DLAB-1145 add d1a2231 [DLAB-1206] - Fixed issue with duplicate key(GCP) add df0ed3a [DLAB-1206] - Changed cron for billing(GCP) add 05d390c [DLAB-1206] Added BillingReportFull role(GCP) new aeac45e Merge pull request #356 from apache/DLAB-1206 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. Summary of changes: .../src/ssn/files/gcp/mongo_roles.json | 10 +++ services/billing-gcp/billing.yml | 2 +- services/billing-gcp/pom.xml | 13 +++- .../billing/gcp/service/BillingServiceImpl.java| 1 + .../gcp/service/BillingServiceImplTest.java| 87 ++ .../src/main/resources/mongo/gcp/mongo_roles.json | 10 +++ 6 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 services/billing-gcp/src/test/java/com/epam/dlab/billing/gcp/service/BillingServiceImplTest.java - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch docs_update updated: DLAB-000 updated user guide
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch docs_update in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/docs_update by this push: new 77c024b DLAB-000 updated user guide 77c024b is described below commit 77c024bae58aabe227682d812cde955955bb65a2 Author: bhliva AuthorDate: Wed Oct 23 15:11:43 2019 +0300 DLAB-000 updated user guide --- USER_GUIDE.md | 23 --- 1 file changed, 23 deletions(-) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 99d084e..c7323b5 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -109,29 +109,6 @@ In second step we should fill general information about the project: On the last step we should select user groups that will be assigned to such project As soon as project is created, Data Scientist will see a blank “List of Resources” page and can start create his resources. - - - -When you log into DLab Web Application, the first thing you will have to setup is a Gateway Node, or an “Edge” Node. - -To do this click on “Upload” button on “Create initial infrastructure”, select your personal public key and hit “Create” button or click on "Generate" button on “Create initial infrastructure” and save your private key. - - - - - -Please note that you need to have a key pair combination (public and private key) to work with DLab. To figure out how to create public and private key, please click on “Where can I get public key?” on “Create initial infrastructure” dialog. DLab build-in wiki page will guide Windows, MasOS and Linux on how to generate SSH key pairs quickly. - -After you hit "Create" or "Generate" button, creation of Edge node will start. This process is a one-time operation for each Data Scientist and it might take up-to 10 minutes for DLab to setup initial infrastructure for you. During this process, you will see following popup in your browser: - - - - - -As soon as an Edge node is created, Data Scientist will see a blank “List of Resources” page. The message “To start working, please create new environment” will be displayed: - -![Main page](doc/main_page.png) - --- # Setting up analytical environment and managing computational power - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch docs_update updated: DLAB-000 updated user guide
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch docs_update in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/docs_update by this push: new c71ba1d DLAB-000 updated user guide c71ba1d is described below commit c71ba1d0605e7ee355ff97bb172a5f3223051215 Author: bhliva AuthorDate: Wed Oct 23 15:10:53 2019 +0300 DLAB-000 updated user guide --- USER_GUIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 2854e08..99d084e 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -10,7 +10,7 @@ DLab is an essential toolset for analytics. It is a self-service Web Console, us [Login](#login) -[Create a project](#create_project) +[Create a project](#setup_project) [Setting up analytical environment and managing computational power](#setup_environmen) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch docs_update updated: DLAB-000 updated user guide
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch docs_update in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/docs_update by this push: new d8ffb15 DLAB-000 updated user guide d8ffb15 is described below commit d8ffb15adda2507f30f3476b80bab1e1011c90a7 Author: bhliva AuthorDate: Wed Oct 23 15:09:57 2019 +0300 DLAB-000 updated user guide --- USER_GUIDE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index b9e06f7..2854e08 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -10,7 +10,7 @@ DLab is an essential toolset for analytics. It is a self-service Web Console, us [Login](#login) -[Setup a Gateway/Edge node](#setup_edge_node) +[Create a project](#create_project) [Setting up analytical environment and managing computational power](#setup_environmen) @@ -87,7 +87,7 @@ After login user will see warning in case of exceeding quota or close to this li -- -# Create a project +# Create a project In order to start working with DLab at least one project needs to be created by admin. This can be done by user that has administration privileges. - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: DLAB-000 updated user guide
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch docs_update in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 228c39133cd12e26a193f1fd2eaa53abfa093ea9 Author: bhliva AuthorDate: Wed Oct 23 14:52:26 2019 +0300 DLAB-000 updated user guide --- USER_GUIDE.md | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index d821a93..b9e06f7 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -87,7 +87,30 @@ After login user will see warning in case of exceeding quota or close to this li -- -# Setup a Gateway/Edge node +# Create a project + +In order to start working with DLab at least one project needs to be created by admin. This can be done by user that has +administration privileges. +To do this we should go to Projects tab in DLab and click "Create new" button. + + +After that project creation wizard appeared that consist of 3 steps: + +- Key upload +- General project information +- Groups that will be assigned to project + +On the first step we should either upload public key using "Upload" button or generete new one using "Generate" button. +In second step we should fill general information about the project: + +- project name +- select list of endpoints that will be assigned to the project + +On the last step we should select user groups that will be assigned to such project +As soon as project is created, Data Scientist will see a blank “List of Resources” page and can start create his resources. + + + When you log into DLab Web Application, the first thing you will have to setup is a Gateway Node, or an “Edge” Node. - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch docs_update created (now 228c391)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch docs_update in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. at 228c391 DLAB-000 updated user guide This branch includes the following new commits: new 228c391 DLAB-000 updated user guide 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-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #352 from apache/DLAB-1139
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 3d4c6133a7111ba7484cbc7ac9c5eb8b7f833b03 Merge: 78b339c ac5a614 Author: bhliva AuthorDate: Tue Oct 22 12:16:49 2019 +0300 Merge pull request #352 from apache/DLAB-1139 [DLAB-1139]: unlock quota for qcp on dlab ui .../manage-environment-dilog.component.html| 8 ++-- .../app/administration/roles/roles.component.html | 46 +++--- .../app/administration/roles/roles.component.scss | 2 +- .../resources/webapp/src/assets/styles/_theme.scss | 5 ++- 4 files changed, 32 insertions(+), 29 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (78b339c -> 3d4c613)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 78b339c Merge remote-tracking branch 'origin/develop' into develop add 69137d1 [DLAB-1139]: unlock quota for qcp on dlab ui add ac5a614 [DLAB-1139]: fixed issue with roles list selection new 3d4c613 Merge pull request #352 from apache/DLAB-1139 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. Summary of changes: .../manage-environment-dilog.component.html| 8 ++-- .../app/administration/roles/roles.component.html | 46 +++--- .../app/administration/roles/roles.component.scss | 2 +- .../resources/webapp/src/assets/styles/_theme.scss | 5 ++- 4 files changed, 32 insertions(+), 29 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated: DLAB-767 added endpoint api spec
This is an automated email from the ASF dual-hosted git repository. bhliva 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 f85d45b DLAB-767 added endpoint api spec new 78b339c Merge remote-tracking branch 'origin/develop' into develop f85d45b is described below commit f85d45bb3e2eaebcbe612cfd3b7b9853c25142e3 Author: bhliva AuthorDate: Mon Oct 21 12:44:59 2019 +0300 DLAB-767 added endpoint api spec --- .../dlab/backendapi/SelfServiceApplication.java| 26 +- .../dlab/backendapi/resources/SwaggerResource.java | 25 + .../src/main/resources/endpoint-api.yml| 635 + 3 files changed, 661 insertions(+), 25 deletions(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java index 1ef045c..6dbe88c 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java @@ -53,11 +53,6 @@ import io.dropwizard.jersey.setup.JerseyEnvironment; import io.dropwizard.jetty.BiDiGzipHandler; import io.dropwizard.setup.Bootstrap; import io.dropwizard.setup.Environment; -import io.swagger.v3.jaxrs2.integration.resources.OpenApiResource; -import io.swagger.v3.oas.integration.SwaggerConfiguration; -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.info.Contact; -import io.swagger.v3.oas.models.info.Info; import lombok.extern.slf4j.Slf4j; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; @@ -65,8 +60,6 @@ import org.eclipse.jetty.server.handler.HandlerWrapper; import javax.servlet.DispatcherType; import java.util.EnumSet; -import java.util.stream.Collectors; -import java.util.stream.Stream; /** * Self Service based on Dropwizard application. @@ -180,24 +173,7 @@ public class SelfServiceApplication extends Applicationhttp://example.com/terms;) - .contact(new Contact().email("j...@example.com")); - - oas.info(info); - SwaggerConfiguration oasConfig = new SwaggerConfiguration() - .openAPI(oas) - //.readAllResources(false) - .prettyPrint(true) - .resourceClasses(Stream.of(ProjectResource.class.getName(), - EndpointResource.class.getName()) - .collect(Collectors.toSet())); - environment.jersey().register(new OpenApiResource() - .openApiConfiguration(oasConfig)); + jersey.register(injector.getInstance(SwaggerResource.class)); } private void disableGzipHandlerForGuacamoleServlet(Server server) { diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SwaggerResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SwaggerResource.java new file mode 100644 index 000..5fb584b --- /dev/null +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/SwaggerResource.java @@ -0,0 +1,25 @@ +package com.epam.dlab.backendapi.resources; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import java.io.IOException; + +@Path("swagger") +public class SwaggerResource { + private static final String SWAGGER_DESCRIPTION_FILE = "/endpoint-api.yml"; + private final ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); + + @GET + @Produces(MediaType.APPLICATION_JSON) + public Response getSwaggerConfig() throws IOException { + return Response.ok(mapper.readValue(getClass().getResourceAsStream(SWAGGER_DESCRIPTION_FILE), Object.class)) + .build(); + + } +} diff --git a/services/self-service/src/main/resources/endpoint-api.yml b/services/self-service/src/main/resources/endpoint-api.yml new file mode 100644 index 000..89ee222 --- /dev/null +++ b/services/self-service/src/main/resources/endpoint-api.yml @@ -0,0 +1,635 @@ +openapi: 3.0.0 +servers: + - description: SwaggerHub API Auto Mocking +url: https://virtserver.swaggerhub.com/bhliva/DLabEndpointAPI/0.0.1 +info: + description: DLab cloud endpoint API + version: "0.0.1" + title: DLab cloud endpoint API + contact: +email: bohdan_hl...@epam.com + license: +name: Apache 2.0 +url: 'http://www.apa
[incubator-dlab] branch develop updated (32021a5 -> 3794651)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 32021a5 DLAB-000 added endpoint parameter for exploratory start/stop add 66f6ed8 [DLAB-1157]: added refresh token store add 6501649 [DLAB-1157]: added refresh token store add db02fbb [DLAB-1157]: added refresh token request on unauthorize add 5f417d1 [DLAB-1157]: added refresh token request on unauthorize add bbc0b9e [DLAB-1157]: destroy access token on unauth error handler add 613c41c [DLAB-1178]: fixed issue with billing report page/ azure add af5dd30 Merge branch 'develop' of github.com:apache/incubator-dlab into DLAB-1157 add 1e6435e [DLAB-1157]: added project selector control add f01ddf4 [DLAB-1157]: added project selector control add 460705a [DLAB-1157]: extend filtering config model; active project selection add edb3abe [DLAB-1157]: set selected active project on resource creation add 422b5f3 [DLAB-1157]: added extra check if active project in users list add 523d78d [DLAB-1157]: keep selected project on active filtering add be2e4e5 Merge branch 'develop' of github.com:apache/incubator-dlab into DLAB-1057 add 3794651 Merge pull request #351 from apache/DLAB-1057 No new revisions were added by this update. Summary of changes: .../resources/webapp/src/app/app.routing.module.ts | 2 +- .../resources/webapp/src/app/core/core.module.ts | 13 ++-- .../src/app/core/interceptors/error.interceptor.ts | 78 -- .../core/interceptors/http.token.interceptor.ts| 9 +-- .../core/services/applicationSecurity.service.ts | 26 .../services/applicationServiceFacade.service.ts | 11 ++- .../src/app/core/services/storage.service.ts | 27 ++-- .../resources/webapp/src/app/login/login.model.ts | 2 +- .../reporting-grid/reporting-grid.component.html | 3 +- .../create-environment.component.html | 4 +- .../create-environment.component.ts| 9 ++- .../resources-grid/filter-configuration.model.ts | 2 + .../resources-grid/resources-grid.component.html | 5 +- .../resources-grid/resources-grid.component.scss | 1 + .../resources-grid/resources-grid.component.ts | 61 + .../src/app/resources/resources.component.html | 22 +- .../src/app/resources/resources.component.scss | 10 +++ .../src/app/resources/resources.component.ts | 26 ++-- .../webapp/src/app/resources/resources.module.ts | 2 +- .../resources/webapp/src/assets/styles/_theme.scss | 7 +- 20 files changed, 228 insertions(+), 92 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-1145 updated: DLAB-000 added endpoint parameter for exploratory start/stop
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch DLAB-1145 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-1145 by this push: new 42d9c9c DLAB-000 added endpoint parameter for exploratory start/stop 42d9c9c is described below commit 42d9c9c7911a2092ade30f0974ebee6f3ba5bd68 Author: bhliva AuthorDate: Mon Oct 21 11:03:11 2019 +0300 DLAB-000 added endpoint parameter for exploratory start/stop --- .../com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java | 14 ++ .../java/com/epam/dlab/backendapi/util/RequestBuilder.java | 9 ++--- 2 files changed, 20 insertions(+), 3 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 6550320..37d0af3 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 @@ -30,6 +30,8 @@ public class ExploratoryBaseDTO> extends Resourc private String notebookImage; @JsonProperty("project_name") private String project; + @JsonProperty("endpoint_name") + private String endpoint; public String getNotebookImage() { return notebookImage; @@ -48,6 +50,10 @@ public class ExploratoryBaseDTO> extends Resourc setProject(project); return self; } + public T withEndpoint(String endpoint) { + setEndpoint(project); + return self; + } @Override public ToStringHelper toStringHelper(Object self) { @@ -63,6 +69,14 @@ public class ExploratoryBaseDTO> extends Resourc this.project = project; } + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(String endpoint) { + this.endpoint = endpoint; + } + @Override public String toString() { return toStringHelper(this).toString(); diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java index 34cda1b..e433b10 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java @@ -242,7 +242,8 @@ public class RequestBuilder { .withNotebookImage(userInstance.getImageName()) .withExploratoryName(userInstance.getExploratoryName()) .withReuploadKeyRequired(userInstance.isReuploadKeyRequired()) - .withProject(userInstance.getProject()); + .withProject(userInstance.getProject()) + .withEndpoint(userInstance.getEndpoint()); case AZURE: T exploratoryStart = (T) newResourceSysBaseDTO(userInfo, ExploratoryActionStartAzure.class) .withNotebookInstanceName(userInstance.getExploratoryId()) @@ -250,7 +251,8 @@ public class RequestBuilder { .withNotebookImage(userInstance.getImageName()) .withExploratoryName(userInstance.getExploratoryName()) .withReuploadKeyRequired(userInstance.isReuploadKeyRequired()) - .withProject(userInstance.getProject()); + .withProject(userInstance.getProject()) + .withEndpoint(userInstance.getEndpoint()); if (settingsDAO.isAzureDataLakeEnabled()) { ((ExploratoryActionStartAzure) exploratoryStart) @@ -289,7 +291,8 @@ public class RequestBuilder { .withExploratoryName(userInstance.getExploratoryName()) .withNotebookImage(userInstance.getImageName()) .withReuploadKeyRequired(userInstance.isReuploadKeyRequired()) - .withProject(userInstance.getProject()); + .withProject(userInstance.getProject()) + .withEndpoint(userInstance.getEndpoint()); } public ExploratoryGitCredsUpdateDTO new
[incubator-dlab] branch develop updated: DLAB-000 added endpoint parameter for exploratory start/stop
This is an automated email from the ASF dual-hosted git repository. bhliva 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 32021a5 DLAB-000 added endpoint parameter for exploratory start/stop 32021a5 is described below commit 32021a5eb7da93991bb03c30fe95f1ff8fcc5a26 Author: bhliva AuthorDate: Mon Oct 21 11:03:11 2019 +0300 DLAB-000 added endpoint parameter for exploratory start/stop --- .../com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java | 14 ++ .../java/com/epam/dlab/backendapi/util/RequestBuilder.java | 9 ++--- 2 files changed, 20 insertions(+), 3 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 6550320..37d0af3 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 @@ -30,6 +30,8 @@ public class ExploratoryBaseDTO> extends Resourc private String notebookImage; @JsonProperty("project_name") private String project; + @JsonProperty("endpoint_name") + private String endpoint; public String getNotebookImage() { return notebookImage; @@ -48,6 +50,10 @@ public class ExploratoryBaseDTO> extends Resourc setProject(project); return self; } + public T withEndpoint(String endpoint) { + setEndpoint(project); + return self; + } @Override public ToStringHelper toStringHelper(Object self) { @@ -63,6 +69,14 @@ public class ExploratoryBaseDTO> extends Resourc this.project = project; } + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(String endpoint) { + this.endpoint = endpoint; + } + @Override public String toString() { return toStringHelper(this).toString(); diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java index 9f450c8..48a9b8d 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java @@ -242,7 +242,8 @@ public class RequestBuilder { .withNotebookImage(userInstance.getImageName()) .withExploratoryName(userInstance.getExploratoryName()) .withReuploadKeyRequired(userInstance.isReuploadKeyRequired()) - .withProject(userInstance.getProject()); + .withProject(userInstance.getProject()) + .withEndpoint(userInstance.getEndpoint()); case AZURE: T exploratoryStart = (T) newResourceSysBaseDTO(userInfo, ExploratoryActionStartAzure.class) .withNotebookInstanceName(userInstance.getExploratoryId()) @@ -250,7 +251,8 @@ public class RequestBuilder { .withNotebookImage(userInstance.getImageName()) .withExploratoryName(userInstance.getExploratoryName()) .withReuploadKeyRequired(userInstance.isReuploadKeyRequired()) - .withProject(userInstance.getProject()); + .withProject(userInstance.getProject()) + .withEndpoint(userInstance.getEndpoint()); if (settingsDAO.isAzureDataLakeEnabled()) { ((ExploratoryActionStartAzure) exploratoryStart) @@ -289,7 +291,8 @@ public class RequestBuilder { .withExploratoryName(userInstance.getExploratoryName()) .withNotebookImage(userInstance.getImageName()) .withReuploadKeyRequired(userInstance.isReuploadKeyRequired()) - .withProject(userInstance.getProject()); + .withProject(userInstance.getProject()) + .withEndpoint(userInstance.getEndpoint()); } public ExploratoryGitCredsUpdateDTO new
[incubator-dlab] branch develop updated: DLAB-1183 fixed issue with billing for edges
This is an automated email from the ASF dual-hosted git repository. bhliva 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 412d69a DLAB-1183 fixed issue with billing for edges 412d69a is described below commit 412d69a016109baebfd2933092c907a834653d6e Author: bhliva AuthorDate: Thu Oct 17 14:50:14 2019 +0300 DLAB-1183 fixed issue with billing for edges --- infrastructure-provisioning/src/ssn/templates/ssn.yml | 18 +- .../java/com/epam/dlab/mongo/DlabResourceTypeDAO.java | 19 --- .../billing/azure/AzureBillableResourcesService.java | 17 - .../com/epam/dlab/billing/gcp/documents/Project.java | 13 +++-- .../dlab/billing/gcp/service/BillingServiceImpl.java | 14 +++--- .../com/epam/dlab/billing/gcp/util/BillingUtils.java | 6 +++--- .../com/epam/dlab/backendapi/dao/BaseBillingDAO.java | 15 --- 7 files changed, 70 insertions(+), 32 deletions(-) diff --git a/infrastructure-provisioning/src/ssn/templates/ssn.yml b/infrastructure-provisioning/src/ssn/templates/ssn.yml index 1c30363..bed2bf6 100644 --- a/infrastructure-provisioning/src/ssn/templates/ssn.yml +++ b/infrastructure-provisioning/src/ssn/templates/ssn.yml @@ -19,19 +19,19 @@ # # ** - <#assign LOG_ROOT_DIR="/var/opt/dlab/log"> - <#assign KEYS_DIR="/home/${sys['user.name']}/keys"> - <#assign KEY_STORE_PATH="${KEYS_DIR}/dlab.keystore.jks"> - <#assign KEY_STORE_PASSWORD="KEYSTORE_PASSWORD"> - <#assign TRUST_STORE_PATH="${JRE_HOME}/lib/security/cacerts"> - <#assign TRUST_STORE_PASSWORD="changeit"> +<#assign LOG_ROOT_DIR="/var/opt/dlab/log"> +<#assign KEYS_DIR="/home/${sys['user.name']}/keys"> +<#assign KEY_STORE_PATH="${KEYS_DIR}/dlab.keystore.jks"> +<#assign KEY_STORE_PASSWORD="KEYSTORE_PASSWORD"> +<#assign TRUST_STORE_PATH="${JRE_HOME}/lib/security/cacerts"> +<#assign TRUST_STORE_PASSWORD="changeit"> - # Available options are aws, azure, gcp - <#assign CLOUD_TYPE="CLOUD_PROVIDER"> +# Available options are aws, azure, gcp +<#assign CLOUD_TYPE="CLOUD_PROVIDER"> cloudProvider: ${CLOUD_TYPE} #Switch on/off developer mode here - <#assign DEV_MODE="false"> +<#assign DEV_MODE="false"> devMode: ${DEV_MODE} mongo: diff --git a/services/billing-aws/src/main/java/com/epam/dlab/mongo/DlabResourceTypeDAO.java b/services/billing-aws/src/main/java/com/epam/dlab/mongo/DlabResourceTypeDAO.java index 9572892..8e56aea 100644 --- a/services/billing-aws/src/main/java/com/epam/dlab/mongo/DlabResourceTypeDAO.java +++ b/services/billing-aws/src/main/java/com/epam/dlab/mongo/DlabResourceTypeDAO.java @@ -137,16 +137,21 @@ public class DlabResourceTypeDAO implements MongoConstants { .COLLABORATION_BUCKET); // Add PROJECTS - Bson projection = fields(include("name")); + Bson projection = fields(include("name", "endpoints")); Iterable docs = connection.getCollection("Projects").find().projection(projection); for (Document d : docs) { String projectName = d.getString("name"); - resourceList.append(sbName + "-" + projectName + "-edge", "EDGE Node", - DlabResourceType.EDGE, null, null, projectName); - resourceList.append(sbName + "-" + projectName + "-bucket", "Project bucket", - DlabResourceType.COLLABORATION_BUCKET, null, null, projectName); - resourceList.append(sbName + "-" + projectName + "-edge-volume-primary", - "EDGE Volume", DlabResourceType.VOLUME, null, null, projectName); + ((List) d.get("endpoints")) + .stream() + .map(endpoint -> endpoint.getString("name")) + .forEach(endpoint -> { + resourceList.append(sbName + "-" + projectName + "-" + endpoint + "-edge", "EDGE Node", + DlabResourceType.EDGE, null, null, projectName); + resourceList.append(sbName +
[incubator-dlab] branch develop updated (7649b62 -> bb8b0c9)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 7649b62 Merge pull request #347 from apache/DLAB-1120 add f6d2659 [DLAB-1138] Added quota for GCP add b87a6c2 [DLAB-1138] Fixed issue with dublicate key in billing-gcp new bb8b0c9 Merge pull request #349 from apache/DLAB-1138 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. Summary of changes: .../main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java| 1 + .../com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java| 8 2 files changed, 9 insertions(+) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #349 from apache/DLAB-1138
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit bb8b0c9663191285df6f5f43a0088f5eb8443245 Merge: 7649b62 b87a6c2 Author: bhliva AuthorDate: Thu Oct 17 14:23:35 2019 +0300 Merge pull request #349 from apache/DLAB-1138 [DLAB-1138] Added quota for GCP, fixed issue with duplicate key in billing-gcp .../main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java| 1 + .../com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java| 8 2 files changed, 9 insertions(+) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (0da7bb0 -> 2c8191a)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from 0da7bb0 DLAB-1175 - made users case insensitive add 488998e [DLAB-1179] Fixed issue with billing (Azure) add c35ce6d [DLAB-1179] Added required parameters to billing.yml add a849df1 [DLAB-1179] Updated parameters in config files new 2c8191a Merge pull request #345 from apache/DLAB-1179 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. Summary of changes: services/billing-azure/billing.yml | 4 .../dlab/billing/azure/AzureBillableResourcesService.java | 13 - .../com/epam/dlab/billing/azure/BillingSchedulerAzure.java | 5 - .../billing/azure/config/BillingConfigurationAzure.java | 4 services/self-service/self-service.yml | 1 + .../conf/SelfServiceApplicationConfiguration.java | 7 +++ .../dropwizard/listeners/MongoStartupListener.java | 4 7 files changed, 32 insertions(+), 6 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #345 from apache/DLAB-1179
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 2c8191a75de428125bade58533a89fef45b7c0e4 Merge: 0da7bb0 a849df1 Author: bhliva AuthorDate: Wed Oct 16 12:17:47 2019 +0300 Merge pull request #345 from apache/DLAB-1179 [DLAB-1179] Fixed issue with billing (Azure) services/billing-azure/billing.yml | 4 .../dlab/billing/azure/AzureBillableResourcesService.java | 13 - .../com/epam/dlab/billing/azure/BillingSchedulerAzure.java | 5 - .../billing/azure/config/BillingConfigurationAzure.java | 4 services/self-service/self-service.yml | 1 + .../conf/SelfServiceApplicationConfiguration.java | 7 +++ .../dropwizard/listeners/MongoStartupListener.java | 4 7 files changed, 32 insertions(+), 6 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated: DLAB-1175 - made users case insensitive
This is an automated email from the ASF dual-hosted git repository. bhliva 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 0da7bb0 DLAB-1175 - made users case insensitive 0da7bb0 is described below commit 0da7bb0d9c089f570be9e2e67de2c32aa9bd02b7 Author: bhliva AuthorDate: Wed Oct 16 11:09:55 2019 +0300 DLAB-1175 - made users case insensitive --- services/self-service/self-service.yml| 11 +-- .../main/java/com/epam/dlab/backendapi/dao/SecurityDAO.java | 3 ++- .../main/java/com/epam/dlab/backendapi/roles/UserRoles.java | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/services/self-service/self-service.yml b/services/self-service/self-service.yml index ec531d0..f00d93f 100644 --- a/services/self-service/self-service.yml +++ b/services/self-service/self-service.yml @@ -78,8 +78,8 @@ server: archivedFileCount: 10 rootPath: "/api" applicationConnectors: - #- type: http - # port: 8080 +#- type: http +# port: 8080 - type: https port: 8443 certAlias: dlab @@ -89,8 +89,8 @@ server: trustStorePath: ${TRUST_STORE_PATH} trustStorePassword: ${TRUST_STORE_PASSWORD} adminConnectors: - #- type: http - # port: 8081 +#- type: http +# port: 8081 - type: https port: 8444 certAlias: dlab @@ -111,7 +111,7 @@ logging: appenders: <#if DEV_MODE == "true"> - type: console - + - type: file currentLogFilename: ${LOG_ROOT_DIR}/ssn/selfservice.log archive: true @@ -192,4 +192,3 @@ jerseyClient: gzipEnabled: true gzipEnabledForRequests: false chunkedEncodingEnabled: true - diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SecurityDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SecurityDAO.java index 731b046..0c76422 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SecurityDAO.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SecurityDAO.java @@ -114,6 +114,7 @@ public class SecurityDAO extends BaseDAO { @SuppressWarnings("unchecked") private Set toUsers(Document d) { final Object users = d.get("users"); - return users == null ? Collections.emptySet() : new HashSet<>((List) users); + return users == null ? Collections.emptySet() : + new HashSet<>(((List) users).stream().map(String::toLowerCase).collect(Collectors.toList())); } } diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java index a5d4f16..411f798 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java @@ -257,7 +257,7 @@ public class UserRoles { final Optional group = role.getGroups() .stream() - .filter(g -> userGroups.getOrDefault(g, Collections.emptySet()).contains(userInfo.getName())) + .filter(g -> userGroups.getOrDefault(g, Collections.emptySet()).contains(userInfo.getName().toLowerCase())) .findAny(); if (group.isPresent()) { LOGGER.trace("Got access by local group {}", group.get()); - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated: DLAB-1175 - made groups case insensitive
This is an automated email from the ASF dual-hosted git repository. bhliva 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 b31d792 DLAB-1175 - made groups case insensitive b31d792 is described below commit b31d792347f004cc04107500ea6acbbc4972e3e8 Author: bhliva AuthorDate: Wed Oct 16 11:03:16 2019 +0300 DLAB-1175 - made groups case insensitive --- .../src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java index bbcf6da..a5d4f16 100644 --- a/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java +++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/roles/UserRoles.java @@ -97,7 +97,7 @@ public class UserRoles { public static boolean isAdmin(UserInfo userInfo) { final List roles = UserRoles.getRoles(); - return roles == null || roles.stream().anyMatch(r -> ADMIN_ROLE_NAME.equals(r.getId()) && + return roles == null || roles.stream().anyMatch(r -> ADMIN_ROLE_NAME.equalsIgnoreCase(r.getId()) && (userRoles.hasAccessByGroup(userInfo, r, userInfo.getRoles()) || userRoles.hasAccessByUserName(userInfo, r))); } - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #344 from apache/DLAB-1192
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 66d4cdc1beba3cc95791e502b7efa1a2a617cc9c Merge: 7af2245 30191da Author: bhliva AuthorDate: Tue Oct 15 15:26:27 2019 +0300 Merge pull request #344 from apache/DLAB-1192 [DLAB-1192] Changed info message while connecting/disconnecting end… .../src/app/administration/project/project.component.ts | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org