[incubator-dlab] branch odahu-integration updated: [DLAB-1678] Ignore image_url field in response file

2020-04-06 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/odahu-integration by this push:
 new 4ebe963  [DLAB-1678] Ignore image_url field in response file
4ebe963 is described below

commit 4ebe963f8c8288554dd5a6e1db3ec1e5a8cef75e
Author: Oleh Fuks 
AuthorDate: Mon Apr 6 10:52:11 2020 +0300

[DLAB-1678] Ignore image_url field in response file
---
 services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceURL.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceURL.java 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceURL.java
index fac4891..44c07e3 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceURL.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/ResourceURL.java
@@ -19,6 +19,7 @@
 
 package com.epam.dlab.dto;
 
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.AllArgsConstructor;
 import lombok.Data;
@@ -30,6 +31,7 @@ import lombok.NoArgsConstructor;
 @Data
 @AllArgsConstructor
 @NoArgsConstructor
+@JsonIgnoreProperties(ignoreUnknown = true)
 public class ResourceURL {
@JsonProperty("description")
private String description;


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



[incubator-dlab] branch DLAB-1590 updated: Admin per project

2020-03-25 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1590 by this push:
 new ca73d94  Admin per project
ca73d94 is described below

commit ca73d949d6e22b16e274def1365a810c25da1bd9
Author: Oleh Fuks 
AuthorDate: Wed Mar 25 18:45:24 2020 +0200

Admin per project
---
 .../com/epam/dlab/backendapi/dao/UserRoleDao.java  |   2 +-
 .../epam/dlab/backendapi/dao/UserRoleDaoImpl.java  |  13 ++-
 .../backendapi/resources/UserGroupResource.java|  12 ++-
 .../backendapi/resources/UserRoleResource.java |   8 +-
 .../dlab/backendapi/service/UserGroupService.java  |   3 +-
 .../dlab/backendapi/service/UserRoleService.java   |   3 +-
 .../backendapi/service/UserRoleServiceImpl.java|  20 -
 .../service/impl/UserGroupServiceImpl.java |  28 +-
 .../resources/UserGroupResourceTest.java   |  90 +++
 .../backendapi/resources/UserRoleResourceTest.java |  11 ++-
 .../service/UserRoleServiceImplTest.java   |  42 -
 .../service/impl/UserGroupServiceImplTest.java | 100 ++---
 12 files changed, 198 insertions(+), 134 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDao.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDao.java
index c2a401b..530724b 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDao.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDao.java
@@ -49,5 +49,5 @@ public interface UserRoleDao {
 
boolean removeGroup(String groupId);
 
-   List aggregateRolesByGroup();
+   List aggregateRolesByGroup(boolean isAdmin);
 }
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
index fffc70b..154cbf8 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
@@ -24,7 +24,9 @@ import com.epam.dlab.cloud.CloudProvider;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.inject.Singleton;
+import com.mongodb.client.model.Aggregates;
 import com.mongodb.client.model.BsonField;
+import com.mongodb.client.model.Filters;
 import com.mongodb.client.result.UpdateResult;
 import org.bson.Document;
 import org.bson.conversions.Bson;
@@ -65,6 +67,7 @@ public class UserRoleDaoImpl extends BaseDAO implements 
UserRoleDao {
private static final String EXPLORATORIES_FIELD = "exploratories";
private static final String COMPUTATIONALS_FIELD = "computationals";
private static final String GROUP_INFO = "groupInfo";
+   private static final String ADMIN = "admin";
 
 
@Override
@@ -144,15 +147,19 @@ public class UserRoleDaoImpl extends BaseDAO implements 
UserRoleDao {
}
 
@Override
-   public List aggregateRolesByGroup() {
+   public List aggregateRolesByGroup(boolean isAdmin) {
final Document role = roleDocument();
final Bson groupBy = group(GROUPS, new BsonField(ROLES, new 
Document(ADD_TO_SET, role)));
final Bson lookup = lookup(USER_GROUPS, ID, ID, GROUP_INFO);
-   final List pipeline = Arrays.asList(unwind(GROUPS), 
groupBy, lookup,
+   final List pipeline = new ArrayList<>();
+   if (!isAdmin) {
+   pipeline.add(Aggregates.match(Filters.not(eq(ID, 
ADMIN;
+   }
+   pipeline.addAll(Arrays.asList(unwind(GROUPS), groupBy, lookup,
project(new Document(GROUP, "$" + 
ID).append(GROUP_INFO, elementAt(GROUP_INFO, 0))
.append(ROLES, "$" + ROLES)),
project(new Document(GROUP, "$" + 
ID).append(USERS_FIELD, "$" + GROUP_INFO + "." + USERS_FIELD)
-   .append(ROLES, "$" + ROLES)));
+   .append(ROLES, "$" + ROLES;
 
return stream(aggregate(MongoCollections.ROLES, pipeline))
.map(d -> convertFromDocument(d, 
UserGroupDto.class))
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
index 154ddc2..67aa073 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/ba

[incubator-dlab] branch DLAB-1571 updated: Remote billing

2020-03-26 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new eae5b35  Remote billing
eae5b35 is described below

commit eae5b354d38f3c8e21f4d7c547986e0d80fb958f
Author: Oleh Fuks 
AuthorDate: Thu Mar 26 17:37:30 2020 +0200

Remote billing
---
 .../dlab/backendapi/service/impl/BillingServiceImplNew.java   |  7 +--
 .../main/java/com/epam/dlab/backendapi/util/BillingUtils.java | 11 ---
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImplNew.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImplNew.java
index 0f26d32..d922461 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImplNew.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImplNew.java
@@ -138,8 +138,11 @@ public class BillingServiceImplNew implements 
BillingServiceNew {
 .entrySet()
 .stream()
 .flatMap(e -> projectEdges(serviceBaseName, e.getKey(), 
e.getValue()));
+final Stream billableSharedEndpoints = 
endpointService.getEndpoints()
+.stream()
+.flatMap(endpoint -> 
BillingUtils.sharedEndpointBillingDataStream(endpoint.getName(), 
serviceBaseName));
 
-final Map billableResources = 
Stream.of(billableUserInstances, billableEdges, ssnBillingDataStream)
+final Map billableResources = 
Stream.of(billableUserInstances, billableEdges, ssnBillingDataStream, 
billableSharedEndpoints)
 .flatMap(s -> s)
 .collect(Collectors.toMap(BillingReportLine::getDlabId, b -> 
b));
 log.debug("Billable resources are: {}", billableResources);
@@ -217,7 +220,7 @@ public class BillingServiceImplNew implements 
BillingServiceNew {
 return s.get();
 } catch (InterruptedException | ExecutionException e) {
 log.error("Cannot retrieve billing information {}", 
e.getMessage(), e);
-throw new DlabException("Cannot retrieve billing information");
+return Collections.emptyList();
 }
 }
 
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
index 33b83fd..d8e230a 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
@@ -61,13 +61,11 @@ public class BillingUtils {
 final String userEdgeId = String.format(EDGE_FORMAT, sbn, 
project.toLowerCase(), endpoint);
 final String edgeVolumeId = String.format(EDGE_VOLUME_FORMAT, sbn, 
project.toLowerCase(), endpoint);
 final String endpointBucketId = 
String.format(PROJECT_ENDPOINT_BUCKET_FORMAT, sbn, project.toLowerCase(), 
endpoint);
-final String projectEndpointBucketId = 
String.format(ENDPOINT_SHARED_BUCKET_FORMAT, sbn, endpoint);
 
 return Stream.of(
 BillingReportLine.builder().resourceName("EDGE 
node").user(SHARED_RESOURCE).project(project).dlabId(userEdgeId).resourceType(BillingResourceType.EDGE).status(UserInstanceStatus.of(status)).build(),
 BillingReportLine.builder().resourceName("EDGE 
volume").user(SHARED_RESOURCE).project(project).dlabId(edgeVolumeId).resourceType(BillingResourceType.VOLUME).build(),
-BillingReportLine.builder().resourceName("Project endpoint 
shared 
bucket").user(SHARED_RESOURCE).project(project).dlabId(endpointBucketId).resourceType(BillingResourceType.BUCKET).build(),
-BillingReportLine.builder().resourceName("Endpoint shared 
bucket").user(SHARED_RESOURCE).project(SHARED_RESOURCE).dlabId(projectEndpointBucketId).resourceType(BillingResourceType.BUCKET).build()
+BillingReportLine.builder().resourceName("Project endpoint 
shared 
bucket").user(SHARED_RESOURCE).project(project).dlabId(endpointBucketId).resourceType(BillingResourceType.BUCKET).build()
 );
 }
 
@@ -79,6 +77,13 @@ public class BillingUtils {
 );
 }
 
+public static Stream 
sharedEndpointBillingDataStream(String endpoint, String sbn) {
+final String projectEndpointBucketId = 
String.format(ENDPOINT_SHARED_BUCKET_FORMAT, sbn, endpoint.toLowerCase());
+return Stream.of(
+BillingReportLine.builder().resourceName("Endpoint shared 
bucket").user(SHARED_RESOURCE).project(SHARED_RESOURCE).dlabId(projectEndpointBuc

[incubator-dlab] branch DLAB-1571 updated: Refactoring local billing

2020-03-26 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 4b7abeb  Refactoring local billing
4b7abeb is described below

commit 4b7abeb99b1afbc6bf84eadc5ba89863c918c5c6
Author: Oleh Fuks 
AuthorDate: Thu Mar 26 18:40:35 2020 +0200

Refactoring local billing
---
 .../com/epam/dlab/billing/DlabResourceType.java|  86 -
 .../epam/dlab/backendapi/dao/BaseBillingDAO.java   | 358 -
 .../com/epam/dlab/backendapi/dao/BillingDAO.java   |   6 -
 .../dlab/backendapi/dao/aws/AwsBillingDAO.java |  74 -
 .../dlab/backendapi/dao/azure/AzureBillingDAO.java | 121 ---
 .../dlab/backendapi/dao/gcp/GcpBillingDao.java |  65 
 .../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 -
 .../backendapi/modules/AwsSelfServiceModule.java   |  83 -
 .../backendapi/modules/AzureSelfServiceModule.java |  81 -
 .../backendapi/modules/CloudProviderModule.java|  32 +-
 .../backendapi/modules/GcpSelfServiceModule.java   |  84 -
 .../dlab/backendapi/modules/ModuleFactory.java |  13 -
 .../dlab/backendapi/resources/BillingResource.java |  26 +-
 .../dlab/backendapi/service/BillingService.java|  80 +
 .../dlab/backendapi/service/BillingServiceNew.java |  39 ---
 .../epam/dlab/backendapi/service/ShapeFormat.java  |   5 -
 .../backendapi/service/aws/AwsBillingService.java  | 110 ---
 .../service/azure/AzureBillingService.java | 116 ---
 .../backendapi/service/gcp/GcpBillingService.java  | 104 --
 ...ServiceImplNew.java => BillingServiceImpl.java} |  10 +-
 .../impl/InfrastructureInfoServiceImpl.java|  10 +-
 .../service/aws/AwsBillingServiceTest.java | 224 -
 .../service/azure/AzureBillingServiceTest.java | 208 
 28 files changed, 24 insertions(+), 2047 deletions(-)

diff --git 
a/services/common/src/main/java/com/epam/dlab/billing/DlabResourceType.java 
b/services/common/src/main/java/com/epam/dlab/billing/DlabResourceType.java
index 54a590e..dfec0dc 100644
--- a/services/common/src/main/java/com/epam/dlab/billing/DlabResourceType.java
+++ b/services/common/src/main/java/com/epam/dlab/billing/DlabResourceType.java
@@ -19,10 +19,6 @@
 
 package com.epam.dlab.billing;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
 public enum DlabResourceType {
SSN,
SSN_BUCKET,
@@ -51,88 +47,6 @@ public enum DlabResourceType {
return null;
}
 
-   public static String getResourceTypeName(String id) {
-   DlabResourceType resourceTypeId = DlabResourceType.of(id);
-   if (resourceTypeId != null) {
-   switch (resourceTypeId) {
-   case COMPUTATIONAL:
-   return "Cluster";
-   case EXPLORATORY:
-   return "Notebook";
-   case EDGE:
-   return "Edge Node";
-   case VOLUME:
-   return "Volume";
-   case EDGE_BUCKET:
-   case SSN_BUCKET:
-   case COLLABORATION_BUCKET:
-   return "Bucket";
-   case EDGE_CONTAINER:
-   case SSN_CONTAINER:
-   case COLLABORATION_CONTAINER:
-   return "Container";
-   case SSN_STORAGE_ACCOUNT:
-   case EDGE_STORAGE_ACCOUNT:
-   case COLLABORATION_STORAGE_ACCOUNT:
-   return "Storage Account";
-   case SSN:
-   return "SSN";
-   case DATA_LAKE_STORE:
-   return "Data Lake Store Account";
-   }
-   }
-   return id;
-   }
-
-   public static List getResourceTypeIds(List names) {
-   if (names == null || names.isEmpty()) {
-   return Collections.emptyList();
-   }
-
-   List list = new ArrayList<>();
-   name

[incubator-dlab] branch DLAB-1571 updated: Refactoring billing

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 475a95f  Refactoring billing
475a95f is described below

commit 475a95fbf701794c6999e6e5654ddbb33249eaf9
Author: Oleh Fuks 
AuthorDate: Fri Mar 27 11:39:47 2020 +0200

Refactoring billing
---
 .../epam/dlab/backendapi/dao/BaseBillingDAO.java   |  5 +-
 .../epam/dlab/backendapi/modules/DevModule.java| 64 -
 .../dlab/backendapi/modules/ProductionModule.java  | 66 --
 3 files changed, 124 insertions(+), 11 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java
index 31f9b4d..d22e400 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java
@@ -37,15 +37,12 @@ import static com.mongodb.client.model.Filters.eq;
 import static java.util.Collections.singletonList;
 
 @Slf4j
-public abstract class BaseBillingDAO extends BaseDAO implements BillingDAO {
+public class BaseBillingDAO extends BaseDAO implements BillingDAO {
 
-   public static final String ITEMS = "lines";
-   public static final String FULL_REPORT = "full_report";
private static final String PROJECT = "project";
private static final int ONE_HUNDRED = 100;
private static final String TOTAL_FIELD_NAME = "total";
private static final String COST_FIELD = "$cost";
-   public static final String SHARED_RESOURCE_NAME = "Shared resource";
 
@Inject
protected SettingsDAO settings;
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java
index cf08d12..3c00111 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java
@@ -23,9 +23,66 @@ import com.epam.dlab.ModuleBase;
 import com.epam.dlab.auth.contract.SecurityAPI;
 import com.epam.dlab.backendapi.auth.SelfServiceSecurityAuthorizer;
 import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
-import com.epam.dlab.backendapi.dao.*;
-import com.epam.dlab.backendapi.service.*;
-import com.epam.dlab.backendapi.service.impl.*;
+import com.epam.dlab.backendapi.dao.BackupDao;
+import com.epam.dlab.backendapi.dao.BackupDaoImpl;
+import com.epam.dlab.backendapi.dao.BaseBillingDAO;
+import com.epam.dlab.backendapi.dao.BillingDAO;
+import com.epam.dlab.backendapi.dao.EndpointDAO;
+import com.epam.dlab.backendapi.dao.EndpointDAOImpl;
+import com.epam.dlab.backendapi.dao.ImageExploratoryDao;
+import com.epam.dlab.backendapi.dao.ImageExploratoryDaoImpl;
+import com.epam.dlab.backendapi.dao.ProjectDAO;
+import com.epam.dlab.backendapi.dao.ProjectDAOImpl;
+import com.epam.dlab.backendapi.dao.UserGroupDao;
+import com.epam.dlab.backendapi.dao.UserGroupDaoImpl;
+import com.epam.dlab.backendapi.dao.UserRoleDao;
+import com.epam.dlab.backendapi.dao.UserRoleDaoImpl;
+import com.epam.dlab.backendapi.service.AccessKeyService;
+import com.epam.dlab.backendapi.service.ApplicationSettingService;
+import com.epam.dlab.backendapi.service.ApplicationSettingServiceImpl;
+import com.epam.dlab.backendapi.service.BackupService;
+import com.epam.dlab.backendapi.service.ComputationalService;
+import com.epam.dlab.backendapi.service.EndpointService;
+import com.epam.dlab.backendapi.service.EnvironmentService;
+import com.epam.dlab.backendapi.service.ExploratoryService;
+import com.epam.dlab.backendapi.service.ExternalLibraryService;
+import com.epam.dlab.backendapi.service.GitCredentialService;
+import com.epam.dlab.backendapi.service.GuacamoleService;
+import com.epam.dlab.backendapi.service.ImageExploratoryService;
+import com.epam.dlab.backendapi.service.InactivityService;
+import com.epam.dlab.backendapi.service.KeycloakService;
+import com.epam.dlab.backendapi.service.KeycloakServiceImpl;
+import com.epam.dlab.backendapi.service.LibraryService;
+import com.epam.dlab.backendapi.service.ProjectService;
+import com.epam.dlab.backendapi.service.ReuploadKeyService;
+import com.epam.dlab.backendapi.service.SchedulerJobService;
+import com.epam.dlab.backendapi.service.SecurityService;
+import com.epam.dlab.backendapi.service.SecurityServiceImpl;
+import com.epam.dlab.backendapi.service.SystemInfoService;
+import com.epam.dlab.backendapi.service.TagService;
+import com.epam.dlab.backendapi.service.TagServiceImpl;
+import com.epam.dlab.backendapi.service.UserGroupService;
+impo

[incubator-dlab] branch DLAB-1571 updated: Changed cron

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 740dbbe  Changed cron
740dbbe is described below

commit 740dbbe38707213b1682feaae011335ed30799c0
Author: Oleh Fuks 
AuthorDate: Fri Mar 27 13:03:18 2020 +0200

Changed cron
---
 services/billing-gcp/src/main/resources/application.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/services/billing-gcp/src/main/resources/application.yml 
b/services/billing-gcp/src/main/resources/application.yml
index c84ed68..b2fda5d 100644
--- a/services/billing-gcp/src/main/resources/application.yml
+++ b/services/billing-gcp/src/main/resources/application.yml
@@ -11,7 +11,7 @@ spring:
 dlab:
   sbn: 
   bigQueryDataset: 
-  cron: 0 * * * * *
+  cron: 0 0 * * * *
 
 server:
   port: 8088


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



[incubator-dlab] branch DLAB-1571 updated: Remote billing

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new bd944de  Remote billing
 new c7c5acf  Merge remote-tracking branch 'origin/DLAB-1571' into DLAB-1571
bd944de is described below

commit bd944de63e70ad5c7bcbdd1e2b3f31e105e255ee
Author: Oleh Fuks 
AuthorDate: Fri Mar 27 13:44:47 2020 +0200

Remote billing
---
 .../java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java | 6 +++---
 .../main/java/com/epam/dlab/billing/gcp/model/GcpBillingData.java   | 3 +--
 .../com/epam/dlab/billing/gcp/service/BillingServiceImplTest.java   | 3 +--
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
index ee917b5..5b92d82 100644
--- 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
+++ 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
@@ -137,7 +137,7 @@ public class BigQueryBillingDAO implements BillingDAO {
}
 
private GroupOperation getGroupOperation() {
-   return group("product", "currency", "usageType", "dlabId")
+   return group("product", "currency", "dlabId")
.min("from").as("from")
.max("to").as("to")
.sum("cost").as("cost");
@@ -166,7 +166,7 @@ public class BigQueryBillingDAO implements BillingDAO {
return GcpBillingData.builder()
.usageDateFrom(toLocalDate(fields, 
"usage_date_from"))
.usageDateTo(toLocalDate(fields, 
"usage_date_to"))
-   
.cost(fields.get("cost").getNumericValue().setScale(3, 
BigDecimal.ROUND_HALF_UP))
+   
.cost(fields.get("cost").getNumericValue().doubleValue())
.product(fields.get("product").getStringValue())

.usageType(fields.get("usageType").getStringValue())

.currency(fields.get("currency").getStringValue())
@@ -186,7 +186,7 @@ public class BigQueryBillingDAO implements BillingDAO {
.usageDateTo(billingData.getUsageDateTo())
.product(billingData.getProduct())
.usageType(billingData.getUsageType())
-   .cost(billingData.getCost().setScale(3, 
BigDecimal.ROUND_HALF_UP).doubleValue())
+   
.cost(BigDecimal.valueOf(billingData.getCost()).setScale(3, 
BigDecimal.ROUND_HALF_UP).doubleValue())
.currency(billingData.getCurrency())
.tag(billingData.getTag())
.build();
diff --git 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/GcpBillingData.java
 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/GcpBillingData.java
index d688198..a2bd12b 100644
--- 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/GcpBillingData.java
+++ 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/GcpBillingData.java
@@ -24,7 +24,6 @@ import lombok.Data;
 import org.springframework.data.mongodb.core.mapping.Document;
 import org.springframework.data.mongodb.core.mapping.Field;
 
-import java.math.BigDecimal;
 import java.time.LocalDate;
 
 @Data
@@ -37,7 +36,7 @@ public class GcpBillingData {
 private final LocalDate usageDateTo;
 private final String product;
 private final String usageType;
-private final BigDecimal cost;
+private final Double cost;
 private final String currency;
 @Field("dlabId")
 private final String tag;
diff --git 
a/services/billing-gcp/src/test/java/com/epam/dlab/billing/gcp/service/BillingServiceImplTest.java
 
b/services/billing-gcp/src/test/java/com/epam/dlab/billing/gcp/service/BillingServiceImplTest.java
index 7a51f62..2ff670a 100644
--- 
a/services/billing-gcp/src/test/java/com/epam/dlab/billing/gcp/service/BillingServiceImplTest.java
+++ 
b/services/billing-gcp/src/test/java/com/epam/dlab/billing/gcp/service/BillingServiceImplTest.java
@@ -10,7 +10,6 @@ import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 
-import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.util.Col

[incubator-dlab] branch DLAB-1571 updated: Remote billing

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 3fb67c3  Remote billing
3fb67c3 is described below

commit 3fb67c3f2abb2c8f76a81432add841c4e6ce7d48
Author: Oleh Fuks 
AuthorDate: Fri Mar 27 13:45:38 2020 +0200

Remote billing
---
 .../java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
index 100dd00..c710a92 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
@@ -219,7 +219,7 @@ public class BillingServiceImpl implements BillingService {
 try {
 return s.get();
 } catch (InterruptedException | ExecutionException e) {
-log.error("Cannot retrieve billing information {}", 
e.getMessage(), e);
+log.error("Cannot retrieve billing information {}", 
e.getMessage());
 return Collections.emptyList();
 }
 }


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



[incubator-dlab] branch DLAB-1571 updated: Remote billing

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 8151f52  Remote billing
8151f52 is described below

commit 8151f5243a91eec41cba08e7a88223b16b42aefa
Author: Oleh Fuks 
AuthorDate: Fri Mar 27 15:15:11 2020 +0200

Remote billing
---
 .../epam/dlab/dto/billing/BillingResourceType.java |  1 +
 .../epam/dlab/backendapi/util/BillingUtils.java| 43 ++
 2 files changed, 28 insertions(+), 16 deletions(-)

diff --git 
a/services/dlab-model/src/main/java/com/epam/dlab/dto/billing/BillingResourceType.java
 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/billing/BillingResourceType.java
index 894d3e4..ac02ab1 100644
--- 
a/services/dlab-model/src/main/java/com/epam/dlab/dto/billing/BillingResourceType.java
+++ 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/billing/BillingResourceType.java
@@ -22,6 +22,7 @@ package com.epam.dlab.dto.billing;
 public enum BillingResourceType {
 EDGE,
 SSN,
+ENDPOINT,
 BUCKET,
 VOLUME,
 EXPLORATORY,
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
index d8e230a..0fe4ebe 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
@@ -23,7 +23,6 @@ import com.epam.dlab.backendapi.domain.BillingReportLine;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.base.DataEngineType;
-import com.epam.dlab.dto.billing.BillingResourceType;
 import com.epam.dlab.dto.computational.UserComputationalResource;
 import jersey.repackaged.com.google.common.collect.Lists;
 import org.apache.commons.lang3.StringUtils;
@@ -37,11 +36,21 @@ import java.util.Objects;
 import java.util.Optional;
 import java.util.stream.Stream;
 
+import static com.epam.dlab.dto.billing.BillingResourceType.BUCKET;
+import static com.epam.dlab.dto.billing.BillingResourceType.COMPUTATIONAL;
+import static com.epam.dlab.dto.billing.BillingResourceType.EDGE;
+import static com.epam.dlab.dto.billing.BillingResourceType.ENDPOINT;
+import static com.epam.dlab.dto.billing.BillingResourceType.EXPLORATORY;
+import static com.epam.dlab.dto.billing.BillingResourceType.SSN;
+import static com.epam.dlab.dto.billing.BillingResourceType.VOLUME;
+
 public class BillingUtils {
 
 private static final String[] REPORT_HEADERS = {"DLab ID", "User", 
"Project", "DLab Resource Type", "Shape", "Product", "Cost"};
 private static final String REPORT_FIRST_LINE = "Service base name: %s. 
Available reporting period from: %s to: %s";
 private static final String TOTAL_LINE = "Total: %s %s";
+private static final String SSN_FORMAT = "%s-ssn";
+private static final String ENDPOINT_FORMAT = "%s-%s-endpoint";
 private static final String EDGE_FORMAT = "%s-%s-%s-edge";
 private static final String EDGE_VOLUME_FORMAT = 
"%s-%s-%s-edge-volume-primary";
 private static final String PROJECT_ENDPOINT_BUCKET_FORMAT = 
"%s-%s-%s-bucket";
@@ -63,24 +72,26 @@ public class BillingUtils {
 final String endpointBucketId = 
String.format(PROJECT_ENDPOINT_BUCKET_FORMAT, sbn, project.toLowerCase(), 
endpoint);
 
 return Stream.of(
-BillingReportLine.builder().resourceName("EDGE 
node").user(SHARED_RESOURCE).project(project).dlabId(userEdgeId).resourceType(BillingResourceType.EDGE).status(UserInstanceStatus.of(status)).build(),
-BillingReportLine.builder().resourceName("EDGE 
volume").user(SHARED_RESOURCE).project(project).dlabId(edgeVolumeId).resourceType(BillingResourceType.VOLUME).build(),
-BillingReportLine.builder().resourceName("Project endpoint 
shared 
bucket").user(SHARED_RESOURCE).project(project).dlabId(endpointBucketId).resourceType(BillingResourceType.BUCKET).build()
+BillingReportLine.builder().resourceName("EDGE 
node").user(SHARED_RESOURCE).project(project).dlabId(userEdgeId).resourceType(EDGE).status(UserInstanceStatus.of(status)).build(),
+BillingReportLine.builder().resourceName("EDGE 
volume").user(SHARED_RESOURCE).project(project).dlabId(edgeVolumeId).resourceType(VOLUME).build(),
+BillingReportLine.builder().resourceName("Project endpoint 
shared 
bucket").user(SHARED_RESOURCE).project(project).dlabId(endpointBucketId).resourceType(BUCKET).build()
 );
 }
 
 public static Stream ssnBillingDataStre

[incubator-dlab] branch DLAB-1571 updated: Changed scale

2020-04-03 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 4f0489e  Changed scale
4f0489e is described below

commit 4f0489e51aa79e4b7837f2333e22419298ed0b95
Author: Oleh Fuks 
AuthorDate: Fri Apr 3 11:39:35 2020 +0300

Changed scale
---
 .../src/main/java/com/epam/dlab/dao/impl/BillingDAOImpl.java| 2 +-
 .../main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java  | 2 +-
 .../java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java | 2 +-
 .../java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/services/billing-aws/src/main/java/com/epam/dlab/dao/impl/BillingDAOImpl.java 
b/services/billing-aws/src/main/java/com/epam/dlab/dao/impl/BillingDAOImpl.java
index b0ff9f1..4015538 100644
--- 
a/services/billing-aws/src/main/java/com/epam/dlab/dao/impl/BillingDAOImpl.java
+++ 
b/services/billing-aws/src/main/java/com/epam/dlab/dao/impl/BillingDAOImpl.java
@@ -121,7 +121,7 @@ public class BillingDAOImpl implements BillingDAO {
 
.usageDateTo(Optional.ofNullable(billingData.getString("to")).map(LocalDate::parse).orElse(null))
 .product(billingData.getString(FIELD_PRODUCT))
 .usageType(billingData.getString(FIELD_RESOURCE_TYPE))
-
.cost(BigDecimal.valueOf(billingData.getDouble(FIELD_COST)).setScale(3, 
BigDecimal.ROUND_HALF_UP).doubleValue())
+
.cost(BigDecimal.valueOf(billingData.getDouble(FIELD_COST)).setScale(2, 
BigDecimal.ROUND_HALF_UP).doubleValue())
 .currency(billingData.getString(FIELD_CURRENCY_CODE))
 .build();
 }
diff --git 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
index c39385a..a4dcec5 100644
--- 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
+++ 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
@@ -114,7 +114,7 @@ public class BillingDAOImpl implements BillingDAO {
 
.usageDateFrom(Optional.ofNullable(billingData.getUsageStartDate()).map(LocalDate::parse).orElse(null))
 
.usageDateTo(Optional.ofNullable(billingData.getUsageEndDate()).map(LocalDate::parse).orElse(null))
 .product(billingData.getMeterCategory())
-.cost(BigDecimal.valueOf(billingData.getCost()).setScale(3, 
BigDecimal.ROUND_HALF_UP).doubleValue())
+.cost(BigDecimal.valueOf(billingData.getCost()).setScale(2, 
BigDecimal.ROUND_HALF_UP).doubleValue())
 .currency(billingData.getCurrencyCode())
 .build();
 }
diff --git 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
index 6db993a..d0b969a 100644
--- 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
+++ 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
@@ -206,7 +206,7 @@ public class BigQueryBillingDAO implements BillingDAO {
.usageDateTo(billingData.getUsageDateTo())
.product(billingData.getProduct())
.usageType(billingData.getUsageType())
-   
.cost(BigDecimal.valueOf(billingData.getCost()).setScale(3, 
BigDecimal.ROUND_HALF_UP).doubleValue())
+   
.cost(BigDecimal.valueOf(billingData.getCost()).setScale(2, 
BigDecimal.ROUND_HALF_UP).doubleValue())
.currency(billingData.getCurrency())
.tag(billingData.getTag())
.build();
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
index 176f22b..b687e62 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
@@ -108,7 +108,7 @@ public class BillingServiceImpl implements BillingService {
 .reportLines(billingReportLines)
 .usageDateFrom(min)
 .usageDateTo(max)
-.totalCost(new BigDecimal(sum).setScale(3, 
BigDecimal.ROUND_HALF_UP).doubleValue())
+.totalCost(new BigD

[incubator-dlab] 03/04: Merge branch 'develop' into DLAB-1571

2020-04-03 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 0a8d98d558d1b65464e704f07bbab295d4d4caf3
Merge: 329d6a8 ac222f6
Author: Oleh Fuks 
AuthorDate: Fri Apr 3 17:10:26 2020 +0300

Merge branch 'develop' into DLAB-1571

 .../src/general/conf/dlab.ini  |  2 +-
 .../dlab/dto/exploratory/ExploratoryImageDTO.java  |  7 +
 .../epam/dlab/backendapi/dao/UserRoleDaoImpl.java  | 32 --
 .../service/impl/ImageExploratoryServiceImpl.java  |  8 --
 .../epam/dlab/backendapi/util/RequestBuilder.java  |  5 ++--
 .../impl/ImageExploratoryServiceImplTest.java  | 24 
 6 files changed, 65 insertions(+), 13 deletions(-)



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



[incubator-dlab] 02/04: Merge remote-tracking branch 'origin/DLAB-1571' into DLAB-1571

2020-04-03 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 329d6a8bbdb6bde2f41ddf36760ea1fe2872b578
Merge: 23d4388 6b955d3
Author: Oleh Fuks 
AuthorDate: Fri Apr 3 17:09:58 2020 +0300

Merge remote-tracking branch 'origin/DLAB-1571' into DLAB-1571

 .../resources-grid/resources-grid.component.html|  8 +---
 .../resources-grid/resources-grid.component.scss|  4 
 .../resources-grid/resources-grid.component.ts  |  6 --
 .../resources-grid/resources-grid.model.ts  |  2 ++
 .../src/app/resources/resources.component.html  |  2 +-
 .../webapp/src/app/resources/resources.component.ts | 11 ++-
 .../multi-level-select-dropdown.component.html  | 18 ++
 .../multi-level-select-dropdown.component.scss  | 21 ++---
 8 files changed, 38 insertions(+), 34 deletions(-)


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



[incubator-dlab] 01/04: Remote billing

2020-04-03 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 23d43885609cd8c084da6b39bcd4b4c7217815a7
Author: Oleh Fuks 
AuthorDate: Fri Apr 3 14:57:07 2020 +0300

Remote billing
---
 .../service/impl/BillingServiceImpl.java   | 15 ++-
 .../epam/dlab/backendapi/util/BillingUtils.java| 22 +-
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
index b687e62..794ac33 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
@@ -132,8 +132,13 @@ public class BillingServiceImpl implements BillingService {
 @Override
 public List getBillingReportLines(UserInfo user, 
BillingFilter filter) {
 setUserFilter(user, filter);
-Set projects = new 
HashSet<>(projectService.getProjects(user));
-projects.addAll(projectService.getUserProjects(user, false));
+Set projects;
+if (isFullReport(user)) {
+projects = new HashSet<>(projectService.getProjects());
+} else {
+projects = new HashSet<>(projectService.getProjects(user));
+projects.addAll(projectService.getUserProjects(user, false));
+}
 
 final Map billableResources = 
getBillableResources(user, projects);
 
@@ -154,20 +159,20 @@ public class BillingServiceImpl implements BillingService 
{
 .stream()
 .filter(userInstance -> 
Objects.nonNull(userInstance.getExploratoryId()))
 .flatMap(ui -> BillingUtils.exploratoryBillingDataStream(ui, 
configuration.getMaxSparkInstanceCount(), sbn));
-final Stream billingReportLineStream = projects
+final Stream customImages = projects
 .stream()
 .map(p -> imageExploratoryDao.getImagesForProject(p.getName()))
 .flatMap(Collection::stream)
 .flatMap(i -> BillingUtils.customImageBillingDataStream(i, 
sbn));
 
 if (UserRoles.isAdmin(user)) {
+final Stream ssnBillingDataStream = 
BillingUtils.ssnBillingDataStream(sbn);
 final Stream billableEdges = projects
 .stream()
 .collect(Collectors.toMap(ProjectDTO::getName, 
ProjectDTO::getEndpoints))
 .entrySet()
 .stream()
 .flatMap(e -> projectEdges(sbn, e.getKey(), e.getValue()));
-final Stream ssnBillingDataStream = 
BillingUtils.ssnBillingDataStream(sbn);
 final Stream billableSharedEndpoints = 
endpointService.getEndpoints()
 .stream()
 .flatMap(endpoint -> 
BillingUtils.sharedEndpointBillingDataStream(endpoint.getName(), sbn));
@@ -176,7 +181,7 @@ public class BillingServiceImpl implements BillingService {
 .flatMap(s -> s);
 }
 
-final Map billableResources = 
Stream.of(billableUserInstances, billingReportLineStream, 
billableAdminResources)
+final Map billableResources = 
Stream.of(billableUserInstances, customImages, billableAdminResources)
 .flatMap(s -> s)
 .collect(Collectors.toMap(BillingReportLine::getDlabId, b -> 
b));
 log.debug("Billable resources are: {}", billableResources);
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
index 2c5b87f..cc77ff1 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
@@ -47,6 +47,7 @@ import static 
com.epam.dlab.dto.billing.BillingResourceType.SSN;
 import static com.epam.dlab.dto.billing.BillingResourceType.VOLUME;
 
 public class BillingUtils {
+private static final String[] AVAILABLE_NOTEBOOKS = {"zeppelin", 
"tensor-rstudio", "rstudio", "tensor", "superset", "jupyterlab", "jupyter", 
"deeplearning"};
 private static final String[] REPORT_HEADERS = {"DLab ID", "User", 
"Project", "DLab Resource Type", "Shape", "Product", "Cost"};
 private static final String REPORT_FIRST_LINE = "Service base name: %s. 
Available reporting period from: %s to: %s";
 private static final String TOTAL_LINE = "Total: %s

[incubator-dlab] branch DLAB-1571 updated (6b955d3 -> 7572611)

2020-04-03 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


from 6b955d3  Merge remote-tracking branch 'origin/DLAB-1571' into DLAB-1571
 new 23d4388  Remote billing
 new 329d6a8  Merge remote-tracking branch 'origin/DLAB-1571' into DLAB-1571
 add 1c0282c  [odahu-integration] Fixed jupyterlab image link
 add e1a5368  [DLAB-1679] Fixed bug with custom image creation
 add ac222f6  [DLAB-1689] Changes for group while adding endpoint
 new 0a8d98d  Merge branch 'develop' into DLAB-1571
 new 7572611  Remote billing

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:
 .../src/general/conf/dlab.ini  |  2 +-
 .../dlab/dto/exploratory/ExploratoryImageDTO.java  |  7 
 .../epam/dlab/backendapi/dao/UserRoleDaoImpl.java  | 32 +++-
 .../service/impl/BillingServiceImpl.java   | 44 +++---
 .../service/impl/ImageExploratoryServiceImpl.java  |  8 +++-
 .../epam/dlab/backendapi/util/BillingUtils.java| 22 +++
 .../epam/dlab/backendapi/util/RequestBuilder.java  |  5 ++-
 .../impl/ImageExploratoryServiceImplTest.java  | 24 +---
 8 files changed, 101 insertions(+), 43 deletions(-)


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



[incubator-dlab] 04/04: Remote billing

2020-04-03 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 757261106f6d51a705f9aa025d22431a9587f6e4
Author: Oleh Fuks 
AuthorDate: Fri Apr 3 18:10:21 2020 +0300

Remote billing
---
 .../epam/dlab/backendapi/dao/UserRoleDaoImpl.java  |  2 +-
 .../service/impl/BillingServiceImpl.java   | 33 +-
 .../epam/dlab/backendapi/util/BillingUtils.java|  4 ---
 3 files changed, 14 insertions(+), 25 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
index 7bd7b94..174e71f 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
@@ -108,7 +108,7 @@ public class UserRoleDaoImpl extends BaseDAO implements 
UserRoleDao {
.noneMatch(id -> 
id.equals(u.getId(
.forEach(this::insert);
 
-   addGroupToRole(aggregateRolesByGroup()
+   addGroupToRole(aggregateRolesByGroup(false)
.stream()
.map(UserGroupDto::getGroup)
.collect(Collectors.toSet()),
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
index 794ac33..7d6ab11 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
@@ -140,7 +140,7 @@ public class BillingServiceImpl implements BillingService {
 projects.addAll(projectService.getUserProjects(user, false));
 }
 
-final Map billableResources = 
getBillableResources(user, projects);
+final Map billableResources = 
getBillableResources(projects);
 
 List billingReport = getRemoteBillingData(user, 
filter)
 .stream()
@@ -153,8 +153,17 @@ public class BillingServiceImpl implements BillingService {
 return billingReport;
 }
 
-private Map getBillableResources(UserInfo user, 
Set projects) {
-Stream billableAdminResources = Stream.empty();
+private Map 
getBillableResources(Set projects) {
+final Stream ssnBillingDataStream = 
BillingUtils.ssnBillingDataStream(sbn);
+final Stream billableEdges = projects
+.stream()
+.collect(Collectors.toMap(ProjectDTO::getName, 
ProjectDTO::getEndpoints))
+.entrySet()
+.stream()
+.flatMap(e -> projectEdges(sbn, e.getKey(), e.getValue()));
+final Stream billableSharedEndpoints = 
endpointService.getEndpoints()
+.stream()
+.flatMap(endpoint -> 
BillingUtils.sharedEndpointBillingDataStream(endpoint.getName(), sbn));
 final Stream billableUserInstances = 
exploratoryService.findAll(projects)
 .stream()
 .filter(userInstance -> 
Objects.nonNull(userInstance.getExploratoryId()))
@@ -165,23 +174,7 @@ public class BillingServiceImpl implements BillingService {
 .flatMap(Collection::stream)
 .flatMap(i -> BillingUtils.customImageBillingDataStream(i, 
sbn));
 
-if (UserRoles.isAdmin(user)) {
-final Stream ssnBillingDataStream = 
BillingUtils.ssnBillingDataStream(sbn);
-final Stream billableEdges = projects
-.stream()
-.collect(Collectors.toMap(ProjectDTO::getName, 
ProjectDTO::getEndpoints))
-.entrySet()
-.stream()
-.flatMap(e -> projectEdges(sbn, e.getKey(), e.getValue()));
-final Stream billableSharedEndpoints = 
endpointService.getEndpoints()
-.stream()
-.flatMap(endpoint -> 
BillingUtils.sharedEndpointBillingDataStream(endpoint.getName(), sbn));
-
-billableAdminResources = Stream.of(billableEdges, 
ssnBillingDataStream, billableSharedEndpoints)
-.flatMap(s -> s);
-}
-
-final Map billableResources = 
Stream.of(billableUserInstances, customImages, billableAdminResources)
+final Map billableResources = 
Stream.of(ssnBillingDataStream, billableEdges, billableSharedEndpoints, 
billableUserInstances, customImages)
 .flatMap(s -> s)
 .collect(Collectors.toMap(BillingReportLine::getDlabId, b -> 
b));

[incubator-dlab] branch develop updated: [DLAB-1689] Changes for group while adding endpoint

2020-04-03 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new ac222f6  [DLAB-1689] Changes for group while adding endpoint
ac222f6 is described below

commit ac222f6109d5402b94d62152ffa8b0bc8f358ca9
Author: Oleh Fuks 
AuthorDate: Fri Apr 3 16:19:16 2020 +0300

[DLAB-1689] Changes for group while adding endpoint
---
 .../epam/dlab/backendapi/dao/UserRoleDaoImpl.java  | 32 --
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
index fffc70b..d4bb824 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
@@ -21,6 +21,7 @@ package com.epam.dlab.backendapi.dao;
 import com.epam.dlab.backendapi.resources.dto.UserGroupDto;
 import com.epam.dlab.backendapi.resources.dto.UserRoleDto;
 import com.epam.dlab.cloud.CloudProvider;
+import com.epam.dlab.exceptions.DlabException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.inject.Singleton;
@@ -33,9 +34,12 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 import static com.epam.dlab.backendapi.dao.MongoCollections.USER_GROUPS;
 import static com.mongodb.client.model.Aggregates.group;
@@ -92,11 +96,20 @@ public class UserRoleDaoImpl extends BaseDAO implements 
UserRoleDao {
 
@Override
public void updateMissingRoles(CloudProvider cloudProvider) {
-   getUserRoleFromFile(cloudProvider).stream()
-   .filter(u -> findAll().stream()
+   getUserRoleFromFile(cloudProvider)
+   .stream()
+   .peek(u -> u.setGroups(Collections.emptySet()))
+   .filter(u -> findAll()
+   .stream()
.map(UserRoleDto::getId)
.noneMatch(id -> 
id.equals(u.getId(
.forEach(this::insert);
+
+   addGroupToRole(aggregateRolesByGroup()
+   .stream()
+   .map(UserGroupDto::getGroup)
+   .collect(Collectors.toSet()),
+   getDefaultShapes(cloudProvider));
}
 
@Override
@@ -168,6 +181,21 @@ public class UserRoleDaoImpl extends BaseDAO implements 
UserRoleDao {
}
}
 
+   private Set getDefaultShapes(CloudProvider cloudProvider) {
+   if (cloudProvider == CloudProvider.AWS) {
+   return Stream.of("nbShapes_t2.medium_fetching", 
"compShapes_c4.xlarge_fetching")
+   .collect(Collectors.toSet());
+   } else if (cloudProvider == CloudProvider.GCP) {
+   return Stream.of("compShapes_n1-standard-2_fetching", 
"nbShapes_n1-standard-2_fetching")
+   .collect(Collectors.toSet());
+   } else if (cloudProvider == CloudProvider.AZURE) {
+   return Stream.of("nbShapes_Standard_E4s_v3_fetching", 
"compShapes_Standard_E4s_v3_fetching")
+   .collect(Collectors.toSet());
+   } else {
+   throw new DlabException("Unsupported cloud provider " + 
cloudProvider);
+   }
+   }
+
private Document roleDocument() {
return new Document().append(ID, "$" + ID)
.append(DESCRIPTION, "$" + DESCRIPTION)


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



[incubator-dlab] branch DLAB-1590 updated: Admin per project

2020-03-25 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1590 by this push:
 new 8fed687  Admin per project
8fed687 is described below

commit 8fed6876abe0284d3fea8eb6c9cd36e52286aca0
Author: Oleh Fuks 
AuthorDate: Wed Mar 25 15:56:04 2020 +0200

Admin per project
---
 .../com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 8a50de8..8b2806b 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
@@ -99,7 +99,7 @@ public class EnvironmentServiceImpl implements 
EnvironmentService {
public List getAllEnv(UserInfo user) {
log.debug("Getting all user's environment...");
List expList = exploratoryDAO.getInstances();
-   return projectService.getProjects()
+   return projectService.getProjects(user)
.stream()
.map(projectDTO -> getProjectEnv(projectDTO, 
expList))
.flatMap(Collection::stream)


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



[incubator-dlab] branch DLAB-1590 updated: Admin per project

2020-03-25 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1590 by this push:
 new e4bcf7c  Admin per project
e4bcf7c is described below

commit e4bcf7cb4eb8ea1775d669f8f922dd4b8a121d1a
Author: Oleh Fuks 
AuthorDate: Wed Mar 25 14:57:43 2020 +0200

Admin per project
---
 .../backendapi/resources/EnvironmentResource.java  | 18 -
 .../backendapi/service/EnvironmentService.java |  2 -
 .../service/impl/EnvironmentServiceImpl.java   | 42 +-
 .../resources/EnvironmentResourceTest.java | 89 --
 .../service/impl/EnvironmentServiceImplTest.java   | 47 
 5 files changed, 20 insertions(+), 178 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
index c92162f..3553ff4 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
@@ -49,14 +49,6 @@ public class EnvironmentResource {
}
 
@GET
-   @Path("user")
-   @Produces(MediaType.APPLICATION_JSON)
-   public Response getUsersWithActiveEnv(@Auth UserInfo userInfo) {
-   log.debug("User {} requested information about active 
environments", userInfo.getName());
-   return Response.ok(environmentService.getUsers()).build();
-   }
-
-   @GET
@Path("all")
@Produces(MediaType.APPLICATION_JSON)
public Response getAllEnv(@Auth UserInfo userInfo) {
@@ -67,16 +59,6 @@ public class EnvironmentResource {
@POST
@Consumes(MediaType.TEXT_PLAIN)
@Produces(MediaType.APPLICATION_JSON)
-   @Path("stop/{projectName}")
-   public Response stopEnv(@Auth UserInfo userInfo, @NotEmpty String user, 
@PathParam("projectName") String projectName) {
-   log.info("User {} is stopping {} environment", 
userInfo.getName(), user);
-   environmentService.stopEnvironment(userInfo, user, projectName);
-   return Response.ok().build();
-   }
-
-   @POST
-   @Consumes(MediaType.TEXT_PLAIN)
-   @Produces(MediaType.APPLICATION_JSON)
@Path("stop/{projectName}/{exploratoryName}")
public Response stopNotebook(@Auth UserInfo userInfo, @NotEmpty String 
user,
 
@PathParam("projectName") String projectName,
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 e342f76..c605131 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
@@ -32,8 +32,6 @@ public interface EnvironmentService {
 
void stopAll();
 
-   void stopEnvironment(UserInfo userInfo, String user, String project);
-
void stopEnvironmentWithServiceAccount(String user);
 
void stopProjectEnvironment(String project);
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 0bab2d6..8a50de8 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
@@ -55,23 +55,29 @@ import static java.util.stream.Collectors.toList;
 @Singleton
 @Slf4j
 public class EnvironmentServiceImpl implements EnvironmentService {
-
private static final String ERROR_MSG_FORMAT = "Can not %s environment 
because on of user resource is in status " +
"CREATING or STARTING";
+
+   private final EnvDAO envDAO;
+   private final UserSettingsDAO settingsDAO;
+   private final ExploratoryDAO exploratoryDAO;
+   private final ExploratoryService exploratoryService;
+   private final ComputationalService computationalService;
+   private final SecurityService securityService;
+   private final ProjectService projectService;
+
@Inject
-   private EnvDAO envDAO;
-   @Inject
-   private ExploratoryDAO exploratoryDAO;
-   @Inject
-   private ExploratoryService exploratoryService;
-   @Inject
-   private ComputationalService co

[incubator-dlab] branch DLAB-1590 updated: Admin per project

2020-03-25 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1590 by this push:
 new 555a485  Admin per project
555a485 is described below

commit 555a485c934810173e0435396010e6169c8fae11
Author: Oleh Fuks 
AuthorDate: Wed Mar 25 14:37:23 2020 +0200

Admin per project
---
 .../service/impl/EnvironmentServiceImpl.java   | 28 +++---
 .../src/main/resources/mongo/aws/mongo_roles.json  | 17 +
 .../main/resources/mongo/azure/mongo_roles.json| 17 +
 .../src/main/resources/mongo/gcp/mongo_roles.json  |  1 +
 4 files changed, 54 insertions(+), 9 deletions(-)

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 15607d3..0bab2d6 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
@@ -20,6 +20,9 @@
 package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.annotation.Project;
+import com.epam.dlab.backendapi.annotation.ProjectAdmin;
+import com.epam.dlab.backendapi.annotation.User;
 import com.epam.dlab.backendapi.dao.EnvDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.dao.UserSettingsDAO;
@@ -90,7 +93,7 @@ public class EnvironmentServiceImpl implements 
EnvironmentService {
public List getAllEnv(UserInfo user) {
log.debug("Getting all user's environment...");
List expList = exploratoryDAO.getInstances();
-   return projectService.getProjects(user)
+   return projectService.getProjects()
.stream()
.map(projectDTO -> getProjectEnv(projectDTO, 
expList))
.flatMap(Collection::stream)
@@ -135,24 +138,30 @@ public class EnvironmentServiceImpl implements 
EnvironmentService {
endpoint.getName(), project));
}
 
+   @ProjectAdmin
@Override
-   public void stopExploratory(UserInfo userInfo, String user, String 
project, String exploratoryName) {
+   public void stopExploratory(@User UserInfo userInfo, String user, 
@Project String project, String exploratoryName) {
exploratoryService.stop(new UserInfo(user, 
userInfo.getAccessToken()), project, exploratoryName);
}
 
+   @ProjectAdmin
@Override
-   public void stopComputational(UserInfo userInfo, String user, String 
project, String exploratoryName, String computationalName) {
+   public void stopComputational(@User UserInfo userInfo, String user, 
@Project String project, String exploratoryName,
+ String 
computationalName) {
computationalService.stopSparkCluster(new UserInfo(user, 
userInfo.getAccessToken()), project, exploratoryName,
computationalName);
}
 
+   @ProjectAdmin
@Override
-   public void terminateExploratory(UserInfo userInfo, String user, String 
project, String exploratoryName) {
+   public void terminateExploratory(@User UserInfo userInfo, String user, 
@Project String project, String exploratoryName) {
exploratoryService.terminate(new UserInfo(user, 
userInfo.getAccessToken()), project, exploratoryName);
}
 
+   @ProjectAdmin
@Override
-   public void terminateComputational(UserInfo userInfo, String user, 
String project, String exploratoryName, String computationalName) {
+   public void terminateComputational(@User UserInfo userInfo, String 
user, @Project String project,
+  
String exploratoryName, String computationalName) {
computationalService.terminateComputational(new UserInfo(user, 
userInfo.getAccessToken()), project, exploratoryName,
computationalName);
}
@@ -180,8 +189,10 @@ public class EnvironmentServiceImpl implements 
EnvironmentService {
}
 
private List getProjectEnv(ProjectDTO projectDTO, 
List allInstances) {
-   final Stream userResources = 
allInstances.stream()
-   .filter(instance -> 
instance.getProject().equals(projectDTO.getName())).map(this::toUserResourceInfo);
+   final Stream userResources = allInstances
+   .stream()
+   

[incubator-dlab] 02/03: Merge remote-tracking branch 'origin/DLAB-1590' into DLAB-1590

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit a6aa0d2ed07c427a43a7348f46a21e5dea5a1020
Merge: 9729f01 d753b18
Author: Oleh Fuks 
AuthorDate: Fri Mar 27 18:38:52 2020 +0200

Merge remote-tracking branch 'origin/DLAB-1590' into DLAB-1590

 .../webapp/src/app/administration/project/project.component.html| 2 +-
 .../main/resources/webapp/src/app/core/services/healthStatus.service.ts | 2 +-
 .../main/resources/webapp/src/app/shared/navbar/navbar.component.html   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


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



[incubator-dlab] 01/03: Admin per project

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 9729f016974942111925557a2f1fe2afeaec2dcc
Author: Oleh Fuks 
AuthorDate: Thu Mar 26 16:20:54 2020 +0200

Admin per project
---
 .../backendapi/resources/UserGroupResource.java| 86 +++---
 .../dlab/backendapi/service/UserGroupService.java  |  3 +-
 .../service/impl/UserGroupServiceImpl.java | 35 ++---
 .../src/main/resources/mongo/aws/mongo_roles.json  |  2 +
 .../main/resources/mongo/azure/mongo_roles.json|  2 +
 .../src/main/resources/mongo/gcp/mongo_roles.json  |  2 +
 .../resources/UserGroupResourceTest.java   |  2 +-
 .../service/impl/UserGroupServiceImplTest.java | 12 +--
 8 files changed, 82 insertions(+), 62 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
index 67aa073..df77307 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
@@ -20,13 +20,10 @@ package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.resources.dto.GroupDTO;
-import com.epam.dlab.backendapi.resources.dto.UpdateRoleGroupDto;
-import com.epam.dlab.backendapi.resources.dto.UpdateUserGroupDto;
 import com.epam.dlab.backendapi.service.UserGroupService;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
-import org.hibernate.validator.constraints.NotEmpty;
 
 import javax.annotation.security.RolesAllowed;
 import javax.validation.Valid;
@@ -38,14 +35,11 @@ import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
-import java.util.Set;
 
 @Slf4j
 @Path("group")
-@RolesAllowed("/roleManagement")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
 public class UserGroupResource {
@@ -59,6 +53,7 @@ public class UserGroupResource {
 
 
@POST
+   @RolesAllowed("/roleManagement/create")
public Response createGroup(@Auth UserInfo userInfo,
@Valid GroupDTO 
dto) {
log.debug("Creating new group {}", dto.getName());
@@ -67,39 +62,42 @@ public class UserGroupResource {
}
 
@PUT
+   @RolesAllowed("/roleManagement")
public Response updateGroup(@Auth UserInfo userInfo, @Valid GroupDTO 
dto) {
log.debug("Updating group {}", dto.getName());
-   userGroupService.updateGroup(dto.getName(), dto.getRoleIds(), 
dto.getUsers());
+   userGroupService.updateGroup(userInfo, dto.getName(), 
dto.getRoleIds(), dto.getUsers());
return Response.ok().build();
}
 
@GET
+   @RolesAllowed("/roleManagement")
public Response getGroups(@Auth UserInfo userInfo) {
log.debug("Getting all groups for admin {}...", 
userInfo.getName());
return 
Response.ok(userGroupService.getAggregatedRolesByGroup(userInfo)).build();
}
 
-   @PUT
-   @Path("role")
-   public Response updateRolesForGroup(@Auth UserInfo userInfo, @Valid 
UpdateRoleGroupDto updateRoleGroupDto) {
-   log.info("Admin {} is trying to add new group {} to roles {}", 
userInfo.getName(),
-   updateRoleGroupDto.getGroup(), 
updateRoleGroupDto.getRoleIds());
-   
userGroupService.updateRolesForGroup(updateRoleGroupDto.getGroup(), 
updateRoleGroupDto.getRoleIds());
-   return Response.ok().build();
-   }
-
-   @DELETE
-   @Path("role")
-   public Response deleteGroupFromRole(@Auth UserInfo userInfo,
-   
@QueryParam("group") @NotEmpty Set groups,
-   
@QueryParam("roleId") @NotEmpty Set roleIds) {
-   log.info("Admin {} is trying to delete groups {} from roles 
{}", userInfo.getName(), groups, roleIds);
-   userGroupService.removeGroupFromRole(groups, roleIds);
-   return Response.ok().build();
-   }
+// @PUT
+// @Path("role")
+// public Response updateRolesForGroup(@Auth UserInfo userInfo, @Valid 
UpdateRoleGroupDto updateRoleGroupDto) {
+// log.info("Admin {} is 

[incubator-dlab] branch DLAB-1590 updated (d753b18 -> bdaf53b)

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


from d753b18  [DLAB-1591]: Add parameters for admin per project
 new 9729f01  Admin per project
 new a6aa0d2  Merge remote-tracking branch 'origin/DLAB-1590' into DLAB-1590
 new bdaf53b  Admin per project refactoring

The 3 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/backendapi/dao/UserGroupDao.java |  2 -
 .../epam/dlab/backendapi/dao/UserGroupDaoImpl.java |  5 --
 .../com/epam/dlab/backendapi/dao/UserRoleDao.java  |  2 -
 .../epam/dlab/backendapi/dao/UserRoleDaoImpl.java  |  5 --
 .../backendapi/resources/UserGroupResource.java| 51 ++---
 .../dlab/backendapi/service/UserGroupService.java  |  9 +--
 .../service/impl/UserGroupServiceImpl.java | 56 +--
 .../src/main/resources/mongo/aws/mongo_roles.json  |  2 +
 .../main/resources/mongo/azure/mongo_roles.json|  2 +
 .../src/main/resources/mongo/gcp/mongo_roles.json  |  2 +
 .../administration/management/management.model.ts  |  1 +
 .../resources/UserGroupResourceTest.java   | 65 +-
 .../service/impl/UserGroupServiceImplTest.java | 65 ++
 13 files changed, 45 insertions(+), 222 deletions(-)


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



[incubator-dlab] 03/03: Admin per project refactoring

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit bdaf53bf304b793eacf3a3c30023c1dacaf94d0b
Author: Oleh Fuks 
AuthorDate: Fri Mar 27 19:12:11 2020 +0200

Admin per project refactoring
---
 .../com/epam/dlab/backendapi/dao/UserGroupDao.java |  2 -
 .../epam/dlab/backendapi/dao/UserGroupDaoImpl.java |  5 --
 .../com/epam/dlab/backendapi/dao/UserRoleDao.java  |  2 -
 .../epam/dlab/backendapi/dao/UserRoleDaoImpl.java  |  5 --
 .../backendapi/resources/UserGroupResource.java| 39 --
 .../dlab/backendapi/service/UserGroupService.java  |  8 ---
 .../service/impl/UserGroupServiceImpl.java | 21 
 .../administration/management/management.model.ts  |  1 +
 .../resources/UserGroupResourceTest.java   | 63 --
 .../service/impl/UserGroupServiceImplTest.java | 53 --
 10 files changed, 1 insertion(+), 198 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDao.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDao.java
index 0a4dde5..ae221f1 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDao.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDao.java
@@ -25,8 +25,6 @@ public interface UserGroupDao {
 
void updateUsers(String group, Set users);
 
-   void removeUser(String group, String user);
-
void removeGroup(String groupId);
 
Set getUserGroups(String user);
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDaoImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDaoImpl.java
index 03a6f51..cc0da31 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDaoImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserGroupDaoImpl.java
@@ -44,11 +44,6 @@ public class UserGroupDaoImpl extends BaseDAO implements 
UserGroupDao {
}
 
@Override
-   public void removeUser(String group, String user) {
-   updateOne(USER_GROUPS, eq(ID, group), pull(USERS_FIELD, user));
-   }
-
-   @Override
public void removeGroup(String groupId) {
deleteOne(USER_GROUPS, eq(ID, groupId));
}
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDao.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDao.java
index 530724b..c9b5585 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDao.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDao.java
@@ -39,8 +39,6 @@ public interface UserRoleDao {
 
boolean addGroupToRole(Set groups, Set roleIds);
 
-   boolean removeGroupFromRole(Set groups, Set roleIds);
-
void removeGroupWhenRoleNotIn(String group, Set roleIds);
 
void removeUnnecessaryRoles(CloudProvider cloudProviderToBeRemoved, 
List remainingProviders);
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
index 154cbf8..c256791 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
@@ -109,11 +109,6 @@ public class UserRoleDaoImpl extends BaseDAO implements 
UserRoleDao {
}
 
@Override
-   public boolean removeGroupFromRole(Set groups, Set 
roleIds) {
-   return conditionMatched(updateMany(MongoCollections.ROLES, 
in(ID, roleIds), pullAll(GROUPS_FIELD, groups)));
-   }
-
-   @Override
public void removeGroupWhenRoleNotIn(String group, Set roleIds) 
{
updateMany(MongoCollections.ROLES, not(in(ID, roleIds)), 
pull(GROUPS_FIELD, group));
}
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
index df77307..853067b 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
@@ -76,25 +76,6 @@ public class UserGroupResource {
return 
Response.ok(userGroupService.getAggregatedRolesByGroup(userInfo)).build();
}
 
-// @PUT
-// @Path("role")
-// public Response updateRolesForGroup(@Auth UserInfo userInfo, @Valid 
UpdateRoleGroupDto updateRoleGroupDto) {
-// log.info("Admin {} is trying to add new gr

[incubator-dlab] branch DLAB-1590 updated: Admin per project refactoring

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1590 by this push:
 new e266731  Admin per project refactoring
e266731 is described below

commit e26673135942e3b688f4d40186e296161bfe3b19
Author: Oleh Fuks 
AuthorDate: Fri Mar 27 19:13:07 2020 +0200

Admin per project refactoring
---
 .../java/com/epam/dlab/backendapi/resources/UserGroupResource.java  | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
index 853067b..8cd3381 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/UserGroupResource.java
@@ -54,8 +54,7 @@ public class UserGroupResource {
 
@POST
@RolesAllowed("/roleManagement/create")
-   public Response createGroup(@Auth UserInfo userInfo,
-   @Valid GroupDTO 
dto) {
+   public Response createGroup(@Auth UserInfo userInfo, @Valid GroupDTO 
dto) {
log.debug("Creating new group {}", dto.getName());
userGroupService.createGroup(dto.getName(), dto.getRoleIds(), 
dto.getUsers());
return Response.ok().build();
@@ -79,8 +78,7 @@ public class UserGroupResource {
@DELETE
@Path("{id}")
@RolesAllowed("/roleManagement/delete")
-   public Response deleteGroup(@Auth UserInfo userInfo,
-   
@PathParam("id") String group) {
+   public Response deleteGroup(@Auth UserInfo userInfo, @PathParam("id") 
String group) {
log.info("Admin {} is trying to delete group {} from 
application", userInfo.getName(), group);
userGroupService.removeGroup(group);
return Response.ok().build();


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



[incubator-dlab] branch DLAB-1571 updated: Admin per project

2020-03-31 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 09ffe7c  Admin per project
09ffe7c is described below

commit 09ffe7cc3eafd68701336b140f9ad1df4bdf566d
Author: Oleh Fuks 
AuthorDate: Tue Mar 31 14:12:18 2020 +0300

Admin per project
---
 .../dlab/backendapi/service/impl/BillingServiceImpl.java | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
index 3601d21..08502a2 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
@@ -147,28 +147,28 @@ public class BillingServiceImpl implements BillingService 
{
 
 private Map getBillableResources(UserInfo user, 
Set projects) {
 Stream billableAdminResources = Stream.empty();
-final Stream billableEdges = projects
-.stream()
-.collect(Collectors.toMap(ProjectDTO::getName, 
ProjectDTO::getEndpoints))
-.entrySet()
-.stream()
-.flatMap(e -> projectEdges(sbn, e.getKey(), e.getValue()));
 final Stream billableUserInstances = 
exploratoryService.findAll(projects)
 .stream()
 .filter(userInstance -> 
Objects.nonNull(userInstance.getExploratoryId()))
 .flatMap(ui -> BillingUtils.exploratoryBillingDataStream(ui, 
configuration.getMaxSparkInstanceCount()));
 
 if (UserRoles.isAdmin(user)) {
+final Stream billableEdges = projects
+.stream()
+.collect(Collectors.toMap(ProjectDTO::getName, 
ProjectDTO::getEndpoints))
+.entrySet()
+.stream()
+.flatMap(e -> projectEdges(sbn, e.getKey(), e.getValue()));
 final Stream ssnBillingDataStream = 
BillingUtils.ssnBillingDataStream(sbn);
 final Stream billableSharedEndpoints = 
endpointService.getEndpoints()
 .stream()
 .flatMap(endpoint -> 
BillingUtils.sharedEndpointBillingDataStream(endpoint.getName(), sbn));
 
-billableAdminResources = Stream.of(ssnBillingDataStream, 
billableSharedEndpoints)
+billableAdminResources = Stream.of(billableEdges, 
ssnBillingDataStream, billableSharedEndpoints)
 .flatMap(s -> s);
 }
 
-final Map billableResources = 
Stream.of(billableEdges, billableUserInstances, billableAdminResources)
+final Map billableResources = 
Stream.of(billableUserInstances, billableAdminResources)
 .flatMap(s -> s)
 .collect(Collectors.toMap(BillingReportLine::getDlabId, b -> 
b));
 log.debug("Billable resources are: {}", billableResources);


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



[incubator-dlab] branch develop updated (f75a6f0 -> 393108b)

2020-03-31 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


from f75a6f0  [DLAB-1676]: Fixed bugs for set of rules libraries 
installation (#683)
 add 393108b  [DLAB-1675] Fixed issue with edge node stopping

No new revisions were added by this update.

Summary of changes:
 .../main/java/com/epam/dlab/backendapi/dao/ExploratoryDAO.java| 4 
 .../com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java | 8 ++--
 2 files changed, 10 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 DLAB-1571 updated: Added standard image format

2020-03-31 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 41480c4  Added standard image format
41480c4 is described below

commit 41480c43d190134c9793c6022c9d76c38e1cdd21
Author: Oleh Fuks 
AuthorDate: Tue Mar 31 15:59:53 2020 +0300

Added standard image format
---
 .../java/com/epam/dlab/dto/billing/BillingResourceType.java |  3 ++-
 .../dlab/backendapi/service/impl/BillingServiceImpl.java|  2 +-
 .../java/com/epam/dlab/backendapi/util/BillingUtils.java| 13 +
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git 
a/services/dlab-model/src/main/java/com/epam/dlab/dto/billing/BillingResourceType.java
 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/billing/BillingResourceType.java
index ac02ab1..7ad1082 100644
--- 
a/services/dlab-model/src/main/java/com/epam/dlab/dto/billing/BillingResourceType.java
+++ 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/billing/BillingResourceType.java
@@ -26,5 +26,6 @@ public enum BillingResourceType {
 BUCKET,
 VOLUME,
 EXPLORATORY,
-COMPUTATIONAL
+COMPUTATIONAL,
+IMAGE
 }
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
index 08502a2..22a4a13 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
@@ -150,7 +150,7 @@ public class BillingServiceImpl implements BillingService {
 final Stream billableUserInstances = 
exploratoryService.findAll(projects)
 .stream()
 .filter(userInstance -> 
Objects.nonNull(userInstance.getExploratoryId()))
-.flatMap(ui -> BillingUtils.exploratoryBillingDataStream(ui, 
configuration.getMaxSparkInstanceCount()));
+.flatMap(ui -> BillingUtils.exploratoryBillingDataStream(ui, 
configuration.getMaxSparkInstanceCount(), sbn));
 
 if (UserRoles.isAdmin(user)) {
 final Stream billableEdges = projects
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
index 0fe4ebe..54489b2 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
@@ -41,11 +41,11 @@ import static 
com.epam.dlab.dto.billing.BillingResourceType.COMPUTATIONAL;
 import static com.epam.dlab.dto.billing.BillingResourceType.EDGE;
 import static com.epam.dlab.dto.billing.BillingResourceType.ENDPOINT;
 import static com.epam.dlab.dto.billing.BillingResourceType.EXPLORATORY;
+import static com.epam.dlab.dto.billing.BillingResourceType.IMAGE;
 import static com.epam.dlab.dto.billing.BillingResourceType.SSN;
 import static com.epam.dlab.dto.billing.BillingResourceType.VOLUME;
 
 public class BillingUtils {
-
 private static final String[] REPORT_HEADERS = {"DLab ID", "User", 
"Project", "DLab Resource Type", "Shape", "Product", "Cost"};
 private static final String REPORT_FIRST_LINE = "Service base name: %s. 
Available reporting period from: %s to: %s";
 private static final String TOTAL_LINE = "Total: %s %s";
@@ -59,9 +59,13 @@ public class BillingUtils {
 private static final String VOLUME_PRIMARY_COMPUTATIONAL_FORMAT = 
"%s-%s-volume-primary";
 private static final String VOLUME_SECONDARY_FORMAT = 
"%s-volume-secondary";
 private static final String VOLUME_SECONDARY_COMPUTATIONAL_FORMAT = 
"%s-%s-volume-secondary";
+private static final String IMAGE_STANDARD_FORMAT = 
"%s-%s-%s-%s-notebook-image";
+private static final String IMAGE_NAME_PREFIX = "docker.dlab-";
+
 private static final String VOLUME_PRIMARY = "Volume primary";
 private static final String VOLUME_SECONDARY = "Volume secondary";
 private static final String SHARED_RESOURCE = "Shared resource";
+private static final String IMAGE_NAME = "Image";
 
 private static final String DATAENGINE_NAME_FORMAT = "%d x %s";
 private static final String DATAENGINE_SERVICE_NAME_FORMAT = "Master: 
%s%sSlave:  %d x %s";
@@ -95,7 +99,7 @@ public class BillingUtils {
 );
 }
 
-public static Stream 
exploratoryBillingDataStream(UserInstanceDTO userInstance, Integer 
maxSparkInstanceCount) {
+public static S

[incubator-dlab] branch DLAB-1571 updated: Added custom image format

2020-03-31 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new a424388  Added custom image format
a424388 is described below

commit a4243886ca4bd458c93ddf1eef6cfef0885b7737
Author: Oleh Fuks 
AuthorDate: Tue Mar 31 17:09:28 2020 +0300

Added custom image format
---
 .../backendapi/service/impl/BillingServiceImpl.java| 12 ++--
 .../com/epam/dlab/backendapi/util/BillingUtils.java| 18 +++---
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
index 22a4a13..0d77367 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
@@ -21,6 +21,7 @@ package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
+import com.epam.dlab.backendapi.dao.ImageExploratoryDao;
 import com.epam.dlab.backendapi.domain.BillingReport;
 import com.epam.dlab.backendapi.domain.BillingReportLine;
 import com.epam.dlab.backendapi.domain.EndpointDTO;
@@ -79,17 +80,19 @@ public class BillingServiceImpl implements BillingService {
 private final ExploratoryService exploratoryService;
 private final SelfServiceApplicationConfiguration configuration;
 private final RESTService provisioningService;
+private final ImageExploratoryDao imageExploratoryDao;
 private final String sbn;
 
 @Inject
 public BillingServiceImpl(ProjectService projectService, EndpointService 
endpointService,
   ExploratoryService exploratoryService, 
SelfServiceApplicationConfiguration configuration,
-  @Named(ServiceConsts.PROVISIONING_SERVICE_NAME) 
RESTService provisioningService) {
+  @Named(ServiceConsts.PROVISIONING_SERVICE_NAME) 
RESTService provisioningService, ImageExploratoryDao imageExploratoryDao) {
 this.projectService = projectService;
 this.endpointService = endpointService;
 this.exploratoryService = exploratoryService;
 this.configuration = configuration;
 this.provisioningService = provisioningService;
+this.imageExploratoryDao = imageExploratoryDao;
 sbn = configuration.getServiceBaseName();
 }
 
@@ -151,6 +154,11 @@ public class BillingServiceImpl implements BillingService {
 .stream()
 .filter(userInstance -> 
Objects.nonNull(userInstance.getExploratoryId()))
 .flatMap(ui -> BillingUtils.exploratoryBillingDataStream(ui, 
configuration.getMaxSparkInstanceCount(), sbn));
+final Stream billingReportLineStream = projects
+.stream()
+.map(p -> imageExploratoryDao.getImagesForProject(p.getName()))
+.flatMap(Collection::stream)
+.flatMap(i -> BillingUtils.customImageBillingDataStream(i, 
sbn));
 
 if (UserRoles.isAdmin(user)) {
 final Stream billableEdges = projects
@@ -168,7 +176,7 @@ public class BillingServiceImpl implements BillingService {
 .flatMap(s -> s);
 }
 
-final Map billableResources = 
Stream.of(billableUserInstances, billableAdminResources)
+final Map billableResources = 
Stream.of(billableUserInstances, billingReportLineStream, 
billableAdminResources)
 .flatMap(s -> s)
 .collect(Collectors.toMap(BillingReportLine::getDlabId, b -> 
b));
 log.debug("Billable resources are: {}", billableResources);
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
index 54489b2..4995de4 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
@@ -20,6 +20,7 @@
 package com.epam.dlab.backendapi.util;
 
 import com.epam.dlab.backendapi.domain.BillingReportLine;
+import com.epam.dlab.backendapi.resources.dto.ImageInfoRecord;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.base.DataEngineType;
@@ -59,7 +60,9 @@ public class BillingUtils {
 private static final String VOLUME_PRIMARY_COMPUTATIONAL_FORMAT = 
"%s-%s-volume-primary";
 private static final String VOLUME_SECONDARY_FORMAT = 
"%s-volum

[incubator-dlab] branch develop updated: [DLAB-1639] Increased warmupPollTimeout

2020-03-31 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new bd59b30  [DLAB-1639] Increased warmupPollTimeout
 new 802d6e9  Merge remote-tracking branch 'origin/develop' into develop
bd59b30 is described below

commit bd59b308fee46f196245208c0b207c1e2ec7f272
Author: Oleh Fuks 
AuthorDate: Tue Mar 31 18:04:14 2020 +0300

[DLAB-1639] Increased warmupPollTimeout
---
 services/provisioning-service/provisioning.yml  | 2 +-
 .../dlab/backendapi/ProvisioningServiceApplicationConfiguration.java| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/services/provisioning-service/provisioning.yml 
b/services/provisioning-service/provisioning.yml
index d234e43..53c303e 100644
--- a/services/provisioning-service/provisioning.yml
+++ b/services/provisioning-service/provisioning.yml
@@ -27,7 +27,7 @@ keyDirectory: ${KEYS_DIR}
 responseDirectory: /opt/dlab/tmp
 handlerDirectory: /opt/dlab/handlers
 dockerLogDirectory: ${LOG_ROOT_DIR}
-warmupPollTimeout: 50s
+warmupPollTimeout: 2m
 resourceStatusPollTimeout: 300m
 keyLoaderPollTimeout: 30m
 requestEnvStatusTimeout: 50s
diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplicationConfiguration.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplicationConfiguration.java
index 8a11088..1025ad6 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplicationConfiguration.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplicationConfiguration.java
@@ -49,7 +49,7 @@ public class ProvisioningServiceApplicationConfiguration 
extends ServiceConfigur
private String handlerDirectory;
 
@JsonProperty
-   private Duration warmupPollTimeout = Duration.minutes(1);
+   private Duration warmupPollTimeout;
 
@JsonProperty
private Duration resourceStatusPollTimeout = Duration.minutes(3);


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



[incubator-dlab] branch DLAB-1571 updated (435d3a1 -> d96075e)

2020-03-29 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


from 435d3a1  Remote billing
 add 5e03cd4  [DLAB-1647]: Action for notebook depend on edge node status. 
(#669)
 add 0e3d531  [DLAB-1648]: Conveyed all resources which will be terminated 
during edge deletion (#670)
 add bf0e539  [DLAB-1657]: added endpoint name to notebook image name
 add 0f5b520  [DLAB-1657]: formatted code
 add c5fb923  Merge pull request #671 from apache/DLAB-1657
 add 658dfef  [Dlab 1661]: Grouped Compute/Notebook shapes by clouds (#673)
 add 239eb05  [DLAB-1654]: Made modal windows static if user is not 
assigned to a project (#674)
 add b9dc738  [DLAB-1590] Admin per project
 add e7ab0d7  Merge branch 'DLAB-1590' of github.com:apache/incubator-dlab 
into DLAB-1590
 add 3befbd18 Deleted requests which was not used
 add 555a485  Admin per project
 add e4bcf7c  Admin per project
 add 8fed687  Admin per project
 add ca73d94  Admin per project
 add 9729f01  Admin per project
 add d753b18  [DLAB-1591]: Add parameters for admin per project
 add a6aa0d2  Merge remote-tracking branch 'origin/DLAB-1590' into DLAB-1590
 add bdaf53b  Admin per project refactoring
 add e266731  Admin per project refactoring
 new b190bca  Merge branch 'DLAB-1590' into DLAB-1571
 new d96075e  Admin per project

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:
 .../general/scripts/aws/common_prepare_notebook.py |   6 +-
 .../scripts/azure/common_prepare_notebook.py   |   6 +-
 .../dlab/backendapi/annotation/ProjectAdmin.java   |   7 +-
 .../com/epam/dlab/backendapi/annotation/User.java  |   7 +-
 .../java/com/epam/dlab/backendapi/dao/EnvDAO.java  |  19 --
 .../epam/dlab/backendapi/dao/ExploratoryDAO.java   |   4 +
 .../com/epam/dlab/backendapi/dao/ProjectDAO.java   |   2 -
 .../epam/dlab/backendapi/dao/ProjectDAOImpl.java   |  11 +-
 .../com/epam/dlab/backendapi/dao/UserGroupDao.java |   2 -
 .../epam/dlab/backendapi/dao/UserGroupDaoImpl.java |   5 -
 .../com/epam/dlab/backendapi/dao/UserRoleDao.java  |   4 +-
 .../epam/dlab/backendapi/dao/UserRoleDaoImpl.java  |  20 +-
 .../dlab/backendapi/domain/ProjectManagingDTO.java |  16 --
 .../interceptor/ProjectAdminInterceptor.java   |  74 
 .../backendapi/modules/CloudProviderModule.java|   5 +
 .../backendapi/resources/EnvironmentResource.java  |  20 +-
 .../resources/InfrastructureInfoResource.java  |   4 +-
 .../dlab/backendapi/resources/ProjectResource.java |  52 ++
 .../backendapi/resources/UserGroupResource.java|  67 ++-
 .../backendapi/resources/UserRoleResource.java |   8 +-
 .../resources/dto/HealthStatusPageDTO.java | 129 +
 .../dlab/backendapi/resources/dto/UserRoleDto.java |   2 +
 .../com/epam/dlab/backendapi/roles/UserRole.java   |  13 +-
 .../com/epam/dlab/backendapi/roles/UserRoles.java  |  58 --
 .../backendapi/service/EnvironmentService.java |   8 +-
 .../backendapi/service/ExploratoryService.java |   4 +
 .../service/InfrastructureInfoService.java |   2 +-
 .../dlab/backendapi/service/ProjectService.java|  13 +-
 .../dlab/backendapi/service/UserGroupService.java  |  12 +-
 .../dlab/backendapi/service/UserRoleService.java   |   3 +-
 .../backendapi/service/UserRoleServiceImpl.java|  20 +-
 .../service/impl/BillingServiceImpl.java   |  64 ---
 .../service/impl/EnvironmentServiceImpl.java   |  81 
 .../service/impl/ExploratoryServiceImpl.java   |  10 +
 .../impl/InfrastructureInfoServiceImpl.java|  22 ++-
 .../service/impl/ProjectServiceImpl.java   |  65 ++-
 .../service/impl/UserGroupServiceImpl.java |  86 +
 .../src/main/resources/mongo/aws/mongo_roles.json  |  47 +
 .../main/resources/mongo/azure/mongo_roles.json|  42 +
 .../src/main/resources/mongo/gcp/mongo_roles.json  |  46 +
 .../management/management.component.ts |  73 
 .../administration/management/management.model.ts  |   1 +
 .../administration/project/project.component.html  |   5 +-
 .../administration/project/project.component.ts|  37 +++-
 .../app/administration/roles/roles.component.ts|   9 +-
 .../services/applicationServiceFacade.service.ts   |  16 --
 .../src/app/core/services/healthStatus.service.ts  |  11 +-
 .../src/app/core/services/project.service.ts   |  27 ---
 .../ami-create-dialog.component.html   |   4 +-
 .../resources-grid/resources-grid.component.html   |   6 +-
 .../resources-grid/resources-grid.component.ts |  10 +-
 .../src/app/resources/resources.component.html |   2

[incubator-dlab] 01/02: Merge branch 'DLAB-1590' into DLAB-1571

2020-03-29 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit b190bcaaa1de0b90c09720fdcfcb55df019ec047
Merge: 435d3a1 e266731
Author: Oleh Fuks 
AuthorDate: Sun Mar 29 16:30:15 2020 +0300

Merge branch 'DLAB-1590' into DLAB-1571

# Conflicts:
#   
services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
#   
services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts
#   
services/self-service/src/test/java/com/epam/dlab/backendapi/resources/InfrastructureInfoResourceTest.java

 .../general/scripts/aws/common_prepare_notebook.py |   6 +-
 .../scripts/azure/common_prepare_notebook.py   |   6 +-
 .../ProjectAdmin.java} |  20 ++-
 .../UserRoleService.java => annotation/User.java}  |  20 ++-
 .../java/com/epam/dlab/backendapi/dao/EnvDAO.java  |  19 ---
 .../com/epam/dlab/backendapi/dao/ProjectDAO.java   |   2 -
 .../epam/dlab/backendapi/dao/ProjectDAOImpl.java   |  11 +-
 .../com/epam/dlab/backendapi/dao/UserGroupDao.java |   2 -
 .../epam/dlab/backendapi/dao/UserGroupDaoImpl.java |   5 -
 .../com/epam/dlab/backendapi/dao/UserRoleDao.java  |   4 +-
 .../epam/dlab/backendapi/dao/UserRoleDaoImpl.java  |  20 +--
 .../dlab/backendapi/domain/ProjectManagingDTO.java |  16 ---
 .../interceptor/ProjectAdminInterceptor.java   |  74 ++
 .../backendapi/modules/CloudProviderModule.java|   5 +
 .../backendapi/resources/EnvironmentResource.java  |  20 +--
 .../resources/InfrastructureInfoResource.java  |   4 +-
 .../dlab/backendapi/resources/ProjectResource.java |  52 +++
 .../backendapi/resources/UserGroupResource.java|  67 +++--
 .../backendapi/resources/UserRoleResource.java |   8 +-
 .../resources/dto/HealthStatusPageDTO.java | 129 +
 .../dlab/backendapi/resources/dto/UserRoleDto.java |   2 +
 .../com/epam/dlab/backendapi/roles/UserRole.java   |  13 +-
 .../com/epam/dlab/backendapi/roles/UserRoles.java  |  58 ++--
 .../backendapi/service/EnvironmentService.java |   8 +-
 .../service/InfrastructureInfoService.java |   2 +-
 .../dlab/backendapi/service/ProjectService.java|  13 +-
 .../dlab/backendapi/service/UserGroupService.java  |  12 +-
 .../dlab/backendapi/service/UserRoleService.java   |   3 +-
 .../backendapi/service/UserRoleServiceImpl.java|  20 ++-
 .../service/impl/EnvironmentServiceImpl.java   |  81 +--
 .../impl/InfrastructureInfoServiceImpl.java|  21 +--
 .../service/impl/ProjectServiceImpl.java   |  65 +++--
 .../service/impl/UserGroupServiceImpl.java |  86 +++-
 .../src/main/resources/mongo/aws/mongo_roles.json  |  47 +++
 .../main/resources/mongo/azure/mongo_roles.json|  42 ++
 .../src/main/resources/mongo/gcp/mongo_roles.json  |  46 ++
 .../management/management.component.ts |  73 +-
 .../administration/management/management.model.ts  |   1 +
 .../administration/project/project.component.html  |   5 +-
 .../administration/project/project.component.ts|  37 -
 .../app/administration/roles/roles.component.ts|   9 +-
 .../services/applicationServiceFacade.service.ts   |  16 ---
 .../src/app/core/services/healthStatus.service.ts  |  11 +-
 .../src/app/core/services/project.service.ts   |  27 
 .../ami-create-dialog.component.html   |   4 +-
 .../resources-grid/resources-grid.component.html   |   6 +-
 .../resources-grid/resources-grid.component.ts |  10 +-
 .../src/app/resources/resources.component.html |   2 +-
 .../multi-level-select-dropdown.component.html |  26 +++-
 .../multi-level-select-dropdown.component.scss |   4 +-
 .../multi-level-select-dropdown.component.ts   |  39 +-
 .../notification-dialog.component.ts   |  36 -
 .../src/app/shared/navbar/navbar.component.html|   2 +-
 .../webapp/src/assets/styles/_dialogs.scss |   1 +
 .../resources/EnvironmentResourceTest.java |  97 +
 .../resources/InfrastructureInfoResourceTest.java  |  23 +--
 .../backendapi/resources/ProjectResourceTest.java  |  24 +---
 .../resources/UserGroupResourceTest.java   | 155 +++--
 .../backendapi/resources/UserRoleResourceTest.java |  11 +-
 .../service/UserRoleServiceImplTest.java   |  42 ++
 .../service/impl/EnvironmentServiceImplTest.java   |  71 --
 .../service/impl/UserGroupServiceImplTest.java | 150 +++-
 62 files changed, 850 insertions(+), 1041 deletions(-)

diff --cc 
services/self-service/src/main/java/com/epam/dlab/backendapi/modules/CloudProviderModule.java
index f251b01,2884aa6..8b41baf
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/CloudProviderModule.java
+++ 
b/services/self-service/src/m

[incubator-dlab] branch DLAB-1571 updated: Remote billing

2020-03-30 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 1b229fb  Remote billing
 new b557d00  Merge remote-tracking branch 'origin/DLAB-1571' into DLAB-1571
1b229fb is described below

commit 1b229fb44e42badf70abeb252c0fda8a89bd286a
Author: Oleh Fuks 
AuthorDate: Mon Mar 30 17:24:34 2020 +0300

Remote billing
---
 services/billing-gcp/pom.xml   |  5 
 .../billing/gcp/controller/BillingController.java  |  7 --
 .../com/epam/dlab/billing/gcp/dao/BillingDAO.java  |  2 +-
 .../billing/gcp/dao/impl/BigQueryBillingDAO.java   | 26 ---
 .../service/impl/BillingServiceImpl.java   | 29 ++
 5 files changed, 47 insertions(+), 22 deletions(-)

diff --git a/services/billing-gcp/pom.xml b/services/billing-gcp/pom.xml
index e562089..43dff3b 100644
--- a/services/billing-gcp/pom.xml
+++ b/services/billing-gcp/pom.xml
@@ -98,6 +98,11 @@
 dlab-model
 ${project.parent.version}
 
+
+org.apache.commons
+commons-lang3
+3.7
+
 
 
 
diff --git 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/controller/BillingController.java
 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/controller/BillingController.java
index 525be72..2967d2a 100644
--- 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/controller/BillingController.java
+++ 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/controller/BillingController.java
@@ -44,7 +44,10 @@ public class BillingController {
 }
 
 @GetMapping("/report")
-public ResponseEntity> getBilling() {
-return new ResponseEntity<>(billingDAO.getBillingReport(), 
HttpStatus.OK);
+public ResponseEntity> 
getBilling(@RequestParam("date-start") String dateStart,
+
@RequestParam("date-end") String dateEnd,
+
@RequestParam("dlab-id") String dlabId,
+
@RequestParam("product") List products) {
+return new ResponseEntity<>(billingDAO.getBillingReport(dateStart, 
dateEnd, dlabId, products), HttpStatus.OK);
 }
 }
diff --git 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/BillingDAO.java
 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/BillingDAO.java
index 7288614..430ade7 100644
--- 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/BillingDAO.java
+++ 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/BillingDAO.java
@@ -28,7 +28,7 @@ public interface BillingDAO {
 
 List getBillingData() throws InterruptedException;
 
-List getBillingReport();
+List getBillingReport(String dateStart, String dateEnd, 
String dlabId, List products);
 
 List getBillingReport(List dlabIds);
 }
diff --git 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
index 5b92d82..6db993a 100644
--- 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
+++ 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
@@ -33,9 +33,11 @@ import com.google.cloud.bigquery.QueryParameterValue;
 import com.google.cloud.bigquery.Table;
 import com.google.cloud.bigquery.TableInfo;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.mongodb.core.MongoTemplate;
 import org.springframework.data.mongodb.core.aggregation.Aggregation;
+import org.springframework.data.mongodb.core.aggregation.AggregationOperation;
 import org.springframework.data.mongodb.core.aggregation.GroupOperation;
 import org.springframework.data.mongodb.core.aggregation.MatchOperation;
 import org.springframework.data.mongodb.core.query.Criteria;
@@ -46,8 +48,10 @@ import java.time.Instant;
 import java.time.LocalDate;
 import java.time.ZoneId;
 import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import java.util.stream.StreamSupport;
@@ -104,10 +108,20 @@ public class BigQueryBillingDAO implements BillingDAO {
}
 
@Override
-   public List getBillingReport() {
+   public List getBillingReport(String dateStart, String 
dateEnd, String dlabId, List products) {
   

[incubator-dlab] branch DLAB-1571 updated: Remote billing

2020-03-30 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 760f769  Remote billing
760f769 is described below

commit 760f769c78205e62349f55c28df508c71a092ac7
Author: Oleh Fuks 
AuthorDate: Mon Mar 30 18:09:56 2020 +0300

Remote billing
---
 .../azure/controller/BillingController.java|  7 --
 .../epam/dlab/billing/azure/dao/BillingDAO.java|  2 +-
 .../billing/azure/dao/impl/BillingDAOImpl.java | 25 +++---
 3 files changed, 28 insertions(+), 6 deletions(-)

diff --git 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/controller/BillingController.java
 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/controller/BillingController.java
index 53227a2..eb728c9 100644
--- 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/controller/BillingController.java
+++ 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/controller/BillingController.java
@@ -44,7 +44,10 @@ public class BillingController {
 }
 
 @GetMapping("/report")
-public ResponseEntity> getBilling() {
-return new ResponseEntity<>(billingDAO.getBillingReport(), 
HttpStatus.OK);
+public ResponseEntity> 
getBilling(@RequestParam("date-start") String dateStart,
+
@RequestParam("date-end") String dateEnd,
+
@RequestParam("dlab-id") String dlabId,
+
@RequestParam("product") List products) {
+return new ResponseEntity<>(billingDAO.getBillingReport(dateStart, 
dateEnd, dlabId, products), HttpStatus.OK);
 }
 }
diff --git 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/BillingDAO.java
 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/BillingDAO.java
index 1f578b1..793d7cb 100644
--- 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/BillingDAO.java
+++ 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/BillingDAO.java
@@ -25,7 +25,7 @@ import java.util.List;
 
 public interface BillingDAO {
 
-List getBillingReport();
+List getBillingReport(String dateStart, String dateEnd, 
String dlabId, List products);
 
 List getBillingReport(List dlabIds);
 }
diff --git 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
index 2e3da13..c39385a 100644
--- 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
+++ 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
@@ -24,8 +24,10 @@ import 
com.epam.dlab.billing.azure.model.AzureDailyResourceInvoice;
 import com.epam.dlab.dto.billing.BillingData;
 import com.epam.dlab.exceptions.DlabException;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.data.mongodb.core.MongoTemplate;
 import org.springframework.data.mongodb.core.aggregation.Aggregation;
+import org.springframework.data.mongodb.core.aggregation.AggregationOperation;
 import org.springframework.data.mongodb.core.aggregation.GroupOperation;
 import org.springframework.data.mongodb.core.aggregation.MatchOperation;
 import org.springframework.data.mongodb.core.query.Criteria;
@@ -33,6 +35,7 @@ import org.springframework.stereotype.Component;
 
 import java.math.BigDecimal;
 import java.time.LocalDate;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
 import java.util.stream.Collectors;
@@ -50,10 +53,20 @@ public class BillingDAOImpl implements BillingDAO {
 }
 
 @Override
-public List getBillingReport() {
+public List getBillingReport(String dateStart, String 
dateEnd, String dlabId, List products) {
 try {
-GroupOperation groupOperation = getGroupOperation();
-Aggregation aggregation = newAggregation(groupOperation);
+List aggregationOperations = new 
ArrayList<>();
+
aggregationOperations.add(Aggregation.match(Criteria.where("dlabId").regex(dlabId,
 "i")));
+if (!products.isEmpty()) {
+
aggregationOperations.add(Aggregation.match(Criteria.where("meterCategory").in(products)));
+}
+getMatchCriteria(dateStart, Criteria.where("day").gte(dateStart))
+.ifPresent(aggregationOperations::add);
+getMatchCriteria(dateEnd, Criteria.where("day").lte(dateEnd))
+.if

[incubator-dlab] branch DLAB-1571 updated: Remote billing

2020-03-30 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 95911ca  Remote billing
95911ca is described below

commit 95911ca7671933c5fdd363a60ee4b2bc1a9bc807
Author: Oleh Fuks 
AuthorDate: Mon Mar 30 18:22:04 2020 +0300

Remote billing
---
 .../epam/dlab/controller/BillingController.java|  7 --
 .../main/java/com/epam/dlab/dao/BillingDAO.java|  2 +-
 .../com/epam/dlab/dao/impl/BillingDAOImpl.java | 25 +++---
 3 files changed, 28 insertions(+), 6 deletions(-)

diff --git 
a/services/billing-aws/src/main/java/com/epam/dlab/controller/BillingController.java
 
b/services/billing-aws/src/main/java/com/epam/dlab/controller/BillingController.java
index 82d6d16..8f70083 100644
--- 
a/services/billing-aws/src/main/java/com/epam/dlab/controller/BillingController.java
+++ 
b/services/billing-aws/src/main/java/com/epam/dlab/controller/BillingController.java
@@ -44,7 +44,10 @@ public class BillingController {
 }
 
 @GetMapping("/report")
-public ResponseEntity> getBilling() {
-return new ResponseEntity<>(billingDAO.getBillingReport(), 
HttpStatus.OK);
+public ResponseEntity> 
getBilling(@RequestParam("date-start") String dateStart,
+
@RequestParam("date-end") String dateEnd,
+
@RequestParam("dlab-id") String dlabId,
+
@RequestParam("product") List products) {
+return new ResponseEntity<>(billingDAO.getBillingReport(dateStart, 
dateEnd, dlabId, products), HttpStatus.OK);
 }
 }
diff --git 
a/services/billing-aws/src/main/java/com/epam/dlab/dao/BillingDAO.java 
b/services/billing-aws/src/main/java/com/epam/dlab/dao/BillingDAO.java
index 8ecaddf..f72fa99 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/dao/BillingDAO.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/dao/BillingDAO.java
@@ -25,7 +25,7 @@ import java.util.List;
 
 public interface BillingDAO {
 
-List getBillingReport();
+List getBillingReport(String dateStart, String dateEnd, 
String dlabId, List products);
 
 List getBillingReport(List dlabIds);
 }
diff --git 
a/services/billing-aws/src/main/java/com/epam/dlab/dao/impl/BillingDAOImpl.java 
b/services/billing-aws/src/main/java/com/epam/dlab/dao/impl/BillingDAOImpl.java
index 4fe4606..b0ff9f1 100644
--- 
a/services/billing-aws/src/main/java/com/epam/dlab/dao/impl/BillingDAOImpl.java
+++ 
b/services/billing-aws/src/main/java/com/epam/dlab/dao/impl/BillingDAOImpl.java
@@ -23,9 +23,11 @@ import com.epam.dlab.dao.BillingDAO;
 import com.epam.dlab.dto.billing.BillingData;
 import com.epam.dlab.exceptions.DlabException;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.bson.Document;
 import org.springframework.data.mongodb.core.MongoTemplate;
 import org.springframework.data.mongodb.core.aggregation.Aggregation;
+import org.springframework.data.mongodb.core.aggregation.AggregationOperation;
 import org.springframework.data.mongodb.core.aggregation.GroupOperation;
 import org.springframework.data.mongodb.core.aggregation.MatchOperation;
 import org.springframework.data.mongodb.core.query.Criteria;
@@ -33,6 +35,7 @@ import org.springframework.stereotype.Component;
 
 import java.math.BigDecimal;
 import java.time.LocalDate;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
 import java.util.stream.Collectors;
@@ -56,10 +59,20 @@ public class BillingDAOImpl implements BillingDAO {
 }
 
 @Override
-public List getBillingReport() {
+public List getBillingReport(String dateStart, String 
dateEnd, String dlabId, List products) {
 try {
-GroupOperation groupOperation = getGroupOperation();
-Aggregation aggregation = newAggregation(groupOperation);
+List aggregationOperations = new 
ArrayList<>();
+
aggregationOperations.add(Aggregation.match(Criteria.where(FIELD_DLAB_ID).regex(dlabId,
 "i")));
+if (!products.isEmpty()) {
+
aggregationOperations.add(Aggregation.match(Criteria.where(FIELD_PRODUCT).in(products)));
+}
+getMatchCriteria(dateStart, 
Criteria.where(FIELD_USAGE_DATE).gte(dateStart))
+.ifPresent(aggregationOperations::add);
+getMatchCriteria(dateEnd, 
Criteria.where(FIELD_USAGE_DATE).lte(dateEnd))
+.ifPresent(aggregationOperations::add);
+aggregationOperations.add(getGroupOperation());
+
+Aggregation aggregation = newAggregation(aggregationOperations);
 
 retu

[incubator-dlab] branch DLAB-1571 updated: Remote billing

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 435d3a1  Remote billing
435d3a1 is described below

commit 435d3a1867cf0a7a5f5ae5aff3d7e481783293b6
Author: Oleh Fuks 
AuthorDate: Fri Mar 27 18:35:36 2020 +0200

Remote billing
---
 services/billing-aws/billing.yml   |  1 +
 .../java/com/epam/dlab/mongo/AdapterMongoDb.java   | 23 ++
 2 files changed, 24 insertions(+)

diff --git a/services/billing-aws/billing.yml b/services/billing-aws/billing.yml
index 510411f..e90978c 100644
--- a/services/billing-aws/billing.yml
+++ b/services/billing-aws/billing.yml
@@ -57,6 +57,7 @@ adapterOut:
 database: dlabdb
 #bufferSize: 1
 upsert: true
+serviceBaseName: 
 
 # Filter for source and converted data.
 filter:
diff --git 
a/services/billing-aws/src/main/java/com/epam/dlab/mongo/AdapterMongoDb.java 
b/services/billing-aws/src/main/java/com/epam/dlab/mongo/AdapterMongoDb.java
index e0af4e6..994522d 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/mongo/AdapterMongoDb.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/mongo/AdapterMongoDb.java
@@ -31,12 +31,17 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonTypeName;
 import com.google.common.base.MoreObjects.ToStringHelper;
 import com.mongodb.client.MongoCollection;
+import com.mongodb.client.model.UpdateOptions;
 import org.bson.Document;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.TreeSet;
 
+import static com.epam.dlab.mongo.MongoConstants.COLLECTION_SETTINGS;
+import static com.epam.dlab.mongo.MongoConstants.FIELD_SERIVICE_BASE_NAME;
+import static com.mongodb.client.model.Filters.eq;
+
 /**
  * The adapter for file system.
  */
@@ -67,6 +72,17 @@ public class AdapterMongoDb extends DBAdapterBase {
@JsonProperty
private boolean upsert = false;
 
+   @JsonProperty
+   private String serviceBaseName;
+
+   public String getServiceBaseName() {
+   return serviceBaseName;
+   }
+
+   public void setServiceBaseName(String serviceBaseName) {
+   this.serviceBaseName = serviceBaseName;
+   }
+
/**
 * Return the size of buffer for bulk insert.
 */
@@ -142,6 +158,7 @@ public class AdapterMongoDb extends DBAdapterBase {
throw new AdapterException("Mode of " + 
getType() + " adapter may be " + Mode.WRITE + " only.");
}
connection = new MongoDbConnection(getHost(), 
getPort(), getDatabase(), getUsername(), getPassword());
+   setServiceBaseName();
collection = 
connection.getCollection(MongoConstants.COLLECTION_BILLING);
try {
resourceTypeDAO = new 
DlabResourceTypeDAO(connection);
@@ -158,6 +175,12 @@ public class AdapterMongoDb extends DBAdapterBase {
}
}
 
+   private void setServiceBaseName() {
+   connection.getCollection(COLLECTION_SETTINGS)
+   .updateOne(eq("_id", FIELD_SERIVICE_BASE_NAME), 
new Document("$set", new Document("value", serviceBaseName)),
+   new 
UpdateOptions().upsert(true));
+   }
+
@Override
public void close() throws AdapterException {
if (connection != null) {


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



[incubator-dlab] branch DLAB-1571 updated: Remote billing

2020-03-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 8232671  Remote billing
8232671 is described below

commit 8232671ffd1ccb9295e61a011fb7ccf536d4bc9a
Author: Oleh Fuks 
AuthorDate: Fri Mar 27 17:42:15 2020 +0200

Remote billing
---
 services/billing-azure/src/main/resources/application.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/services/billing-azure/src/main/resources/application.yml 
b/services/billing-azure/src/main/resources/application.yml
index ebc4dac..eba7073 100644
--- a/services/billing-azure/src/main/resources/application.yml
+++ b/services/billing-azure/src/main/resources/application.yml
@@ -46,7 +46,7 @@ dlab:
   currency: 
   locale: 
   regionInfo: 
-  initialDelay: 10
+  initialDelay: 1
   period: 60
   aggregationOutputMongoDataSource:
 host: localhost


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



[incubator-dlab] branch DLAB-1571 updated: Fixed issue with displaying list of resources

2020-03-26 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new bf314b8  Fixed issue with displaying list of resources
bf314b8 is described below

commit bf314b8f2968694ccfbfc94c677c5e8ea49a00e4
Author: Oleh Fuks 
AuthorDate: Thu Mar 26 13:45:17 2020 +0200

Fixed issue with displaying list of resources
---
 .../service/impl/InfrastructureInfoServiceImpl.java | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
index eaf7071..deb0019 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
@@ -44,6 +44,7 @@ import com.jcabi.manifests.Manifests;
 import lombok.extern.slf4j.Slf4j;
 import org.bson.Document;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
@@ -98,8 +99,16 @@ public class InfrastructureInfoServiceImpl implements 
InfrastructureInfoService
 
List collect = 
e.getValue()
.stream()
-   .map(exp -> 
billingServiceNew.getExploratoryRemoteBillingData(user, (String) 
exp.get("endpoint"),
-   
expDAO.findExploratories(e.getKey(), (String) exp.get("endpoint"), 
user.getName(
+   .map(exp -> {
+   
List exploratoryRemoteBillingData = new ArrayList<>();
+   try {
+   
exploratoryRemoteBillingData = 
billingServiceNew.getExploratoryRemoteBillingData(user, (String) 
exp.get("endpoint"),
+   
expDAO.findExploratories(e.getKey(), (String) 
exp.get("endpoint"), user.getName()));
+   } catch 
(Exception ex) {
+   
log.error("Cannot retrieve billing information", ex);
+   }
+   return 
exploratoryRemoteBillingData;
+   })

.flatMap(Collection::stream)

.collect(Collectors.toList());
 


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



[incubator-dlab] 01/02: Merge branch 'develop' into DLAB-1571

2020-03-25 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 8feb625f1b65477ddd6c474c0b6183f37504194d
Merge: cb63850 3f5451e
Author: Oleh Fuks 
AuthorDate: Wed Mar 25 11:27:51 2020 +0200

Merge branch 'develop' into DLAB-1571

# Conflicts:
#   
services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryDAO.java
#   
services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExploratoryService.java
#   
services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImpl.java
#   
services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.html
#   
services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.scss
#   
services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts

 .../scripts/deploy_repository/deploy_repository.py |   2 +-
 .../scripts/configure_deep_learning_node.py|   4 +-
 infrastructure-provisioning/src/edge/fabfile.py|  76 --
 .../src/general/lib/aws/actions_lib.py |  60 +-
 .../src/general/lib/azure/actions_lib.py   |  45 +-
 .../src/general/lib/gcp/actions_lib.py |  14 +-
 .../src/general/lib/gcp/meta_lib.py|  19 +-
 .../src/general/lib/os/debian/edge_lib.py  |  27 +-
 .../src/general/lib/os/fab.py  |  15 +-
 .../scripts/aws/common_create_notebook_image.py|  48 +-
 .../general/scripts/aws/common_create_policy.py|  14 +-
 .../general/scripts/aws/common_create_subnet.py|   2 +-
 .../scripts/aws/common_download_git_certfile.py|   2 +-
 ...common_notebook_configure_dataengine-service.py | 110 ++-
 .../aws/common_notebook_configure_dataengine.py|  73 +-
 .../general/scripts/aws/common_prepare_notebook.py | 173 ++--
 .../general/scripts/aws/common_start_notebook.py   |  39 +-
 .../general/scripts/aws/common_stop_notebook.py|  47 +-
 .../scripts/aws/common_terminate_notebook.py   |  38 +-
 .../scripts/aws/common_terminate_notebook_image.py |  17 +-
 .../scripts/aws/dataengine-service_configure.py| 198 ++--
 .../scripts/aws/dataengine-service_prepare.py  | 257 +++---
 .../scripts/aws/dataengine-service_terminate.py|  37 +-
 .../general/scripts/aws/dataengine_configure.py| 254 +++---
 .../src/general/scripts/aws/dataengine_prepare.py  | 156 ++--
 .../src/general/scripts/aws/dataengine_start.py|  44 +-
 .../src/general/scripts/aws/dataengine_stop.py |  28 +-
 .../general/scripts/aws/dataengine_terminate.py|  39 +-
 .../general/scripts/aws/deeplearning_configure.py  | 318 +++
 .../src/general/scripts/aws/edge_configure.py  | 279 +++---
 .../src/general/scripts/aws/edge_start.py  |  31 +-
 .../src/general/scripts/aws/edge_status.py |  23 +-
 .../src/general/scripts/aws/edge_stop.py   |  26 +-
 .../src/general/scripts/aws/jupyter_configure.py   | 316 +++
 .../general/scripts/aws/jupyterlab_configure.py| 306 ---
 .../src/general/scripts/aws/project_prepare.py | 432 -
 .../src/general/scripts/aws/project_terminate.py   | 111 ++-
 .../src/general/scripts/aws/rstudio_configure.py   | 314 +++
 .../src/general/scripts/aws/ssn_configure.py   | 428 -
 .../src/general/scripts/aws/ssn_prepare.py | 713 ---
 .../src/general/scripts/aws/ssn_terminate.py   |  33 +-
 .../scripts/aws/ssn_terminate_aws_resources.py | 100 ++-
 .../scripts/aws/tensor-rstudio_configure.py| 338 +++
 .../src/general/scripts/aws/tensor_configure.py| 324 +++
 .../src/general/scripts/aws/zeppelin_configure.py  | 326 +++
 .../scripts/azure/common_create_instance.py|   2 +-
 .../scripts/azure/common_create_notebook_image.py  |  78 +-
 .../scripts/azure/common_download_git_certfile.py  |   6 +-
 .../azure/common_notebook_configure_dataengine.py  |  84 +-
 .../scripts/azure/common_prepare_notebook.py   | 103 ++-
 .../general/scripts/azure/common_start_notebook.py |  53 +-
 .../general/scripts/azure/common_stop_notebook.py  |  43 +-
 .../scripts/azure/common_terminate_notebook.py |  41 +-
 .../azure/common_terminate_notebook_image.py   |  18 +-
 .../general/scripts/azure/dataengine_configure.py  | 224 ++---
 .../general/scripts/azure/dataengine_prepare.py| 103 +--
 .../src/general/scripts/azure/dataengine_start.py  |  52 +-
 .../src/general/scripts/azure/dataengine_stop.py   |  44 +-
 .../general/scripts/azure/dataengine_terminate.py  |  48 +-
 .../scripts/azure/deeplearning_configure.py| 173 ++--
 .../src/general/scripts/azure/edge_configure.py| 357 +++-
 .../src/general/scripts/azure/edge_prepare.py  |   6 +-
 .../src/general/scripts/azure/edge_start.py|  36 +-
 .../src/general/scripts/azure

[incubator-dlab] branch DLAB-1571 updated (cb63850 -> 2566f24)

2020-03-25 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


from cb63850  Merge pull request #672 from apache/DLAB-1565-aws
 add a72d83d  [DLAB-1546]: added name convention changes
 add d1d33c1  [DLAB-1546]: added name convention changes
 add 1a91f08  [DLAB-1546]: added name convention changes
 add 438ef06  [DLAB-1546]: added name convention changes
 add 4eccb95  [DLAB-1546]: added name convention changes
 add d43e92f  [DLAB-1546]: added name convention changes
 add a319ef9  [DLAB-1546]: added name convention changes
 add 88b7c21  [DLAB-1546]: added name convention changes
 add e22fed8  [DLAB-1546]: added name convention changes
 add 054af0f  [DLAB-1546]: added name convention changes
 add dcef057  [DLAB-1546]: added name convention changes
 add e8dc4ad  [DLAB-1546]: added name convention changes
 add a4798b1  Merge branch 'develop' of github.com:apache/incubator-dlab 
into DLAB-1546
 add 4bf39e9  [DLAB-1546]: added name convention changes
 add faa4f12  [DLAB-1546]: added name convention changes
 add feba37c  [DLAB-1546]: added name convention changes
 add c098a7a  [DLAB-1546]: added name convention changes
 add 2ef159f  [DLAB-1546]: added name convention changes
 add 52b6642  [DLAB-1546]: added name convention changes
 add 30389c9  [DLAB-1546]: added name convention changes
 add 881bb4e  [DLAB-1546]: added name convention changes
 add defd3d5  [DLAB-1546]: added name convention changes
 add eb4f7f7  [DLAB-1546]: added name convention changes
 add d609425  [DLAB-1546]: added name convention changes
 add 812c8c8  [DLAB-1546]: added name convention changes
 add 5375125  [DLAB-1546]: added name convention changes
 add 0d58ec2  [DLAB-1546]: added name convention changes
 add 1cf6c14  [DLAB-1546]: added name convention changes
 add e7399ab  [DLAB-1546]: added name convention changes
 add 7465e6d  [DLAB-1546]: added name convention changes
 add 66778c7  [DLAB-1546]: added name convention changes
 add 0742f2c  [DLAB-1546]: added name convention changes
 add 40fdff7  [DLAB-1546]: added name convention changes
 add bbea296  [DLAB-1546]: added name convention changes
 add 749b31d  [DLAB-1546]: added name convention changes
 add fa9bafb  [DLAB-1546]: added name convention changes
 add bdda302  [DLAB-1546]: added name convention changes
 add 5c64fa1  Added endpoint name while stopping dataengine
 add 77ac1ef  Added endpoint name for some action
 add d37f095  Merge branch 'develop' of github.com:apache/incubator-dlab 
into DLAB-1546
 add dbd4a08  [DLAB-1546]: added name convention changes
 add 866c6d9  Merge remote-tracking branch 'origin/DLAB-1546' into DLAB-1546
 add 71520e1  [DLAB-1546]: added name convention changes
 add 78ee925  [DLAB-1546]: added name convention changes
 add 93d85d0  [DLAB-1546]: added name convention changes
 add ee708a2  [DLAB-1546]: added name convention changes
 add 790de25  [DLAB-1546]: added name convention changes
 add 8dca3f4  [DLAB-1546]: added name convention changes
 add 557ac99  [DLAB-1546]: added name convention changes
 add 323087b  [DLAB-1546]: added name convention changes
 add e7aeca5  [DLAB-1546]: added name convention changes
 add a3112d0  [DLAB-1546]: added name convention changes
 add 8f04434  [DLAB-1546]: added name convention changes
 add 87d4897  [DLAB-1546]: added name convention changes
 add cad6bee  [DLAB-1546]: added name convention changes
 add e7b0448  [DLAB-1546]: added name convention changes
 add 1910739  [DLAB-1546]: added name convention changes
 add 8b2f231  [DLAB-1546]: added name convention changes
 add 538862f  [DLAB-1546]: added name convention changes
 add a946003  [DLAB-1546]: added name convention changes
 add a1c7dc9  [DLAB-1546]: added name convention changes
 add 1bfc7b6  [DLAB-1604] Make Cluster name unique per project
 add 865f70e  Merge remote-tracking branch 'origin/DLAB-1546' into DLAB-1546
 add 7bfdc29  [DLAB-1546]: added name convention changes
 add 21e893b  Made cluster name unique per project
 add 3819859  Merge remote-tracking branch 'origin/DLAB-1546' into DLAB-1546
 add 3e5b854  Merge remote-tracking branch 'origin/DLAB-1546' into DLAB-1546
 add 6ebf686  [DLAB-1546]: added name convention changes
 add 14f0044  [DLAB-1599]: Adjusted billing acording to multicloud support 
(#632)
 add 79ca168  [DLAB-1510] All resources are stopped with project (#611)
 add 532573c  [DLAB-1606]: Fixed small css bugs (#634)
 add 30045cd  [DLAB-1609]: Conveyed 'Resource Type' value to UI (#635)
 add f778f0c  [DlAB-1520] Filter the projects with terminated nodes (#633)
 add a7c9a81  DLAB-1539 added check if custom tag is defined
 add 1a0355b

[incubator-dlab] 02/02: Fixed merge conflicts

2020-03-25 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 2566f24ebae9e7f645cd0c5138320088f80a154c
Author: Oleh Fuks 
AuthorDate: Wed Mar 25 11:41:32 2020 +0200

Fixed merge conflicts
---
 .../java/com/epam/dlab/backendapi/service/ExploratoryService.java| 3 +--
 .../epam/dlab/backendapi/service/impl/ExploratoryServiceImpl.java| 5 +
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExploratoryService.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExploratoryService.java
index 2fe7d8e..f6bcb64 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExploratoryService.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ExploratoryService.java
@@ -45,9 +45,8 @@ public interface ExploratoryService {
 void updateClusterConfig(UserInfo userInfo, String project, String 
exploratoryName, List config);
 
 Optional getUserInstance(String user, String project, 
String exploratoryName);
-   List findAll();
 
-   void updateClusterConfig(UserInfo userInfo, String exploratoryName, 
List config);
+List findAll();
 
 List getClusterConfig(UserInfo user, String project, String 
exploratoryName);
 
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 77d870b..ffa3a6b 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
@@ -194,6 +194,11 @@ public class ExploratoryServiceImpl implements 
ExploratoryService {
}
 
@Override
+   public List findAll() {
+   return exploratoryDAO.getInstances();
+   }
+
+   @Override
public List getClusterConfig(UserInfo user, String 
project, String exploratoryName) {
return exploratoryDAO.getClusterConfig(user.getName(), project, 
exploratoryName);
}


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



[incubator-dlab] branch DLAB-1661 updated: Added 'cloud' parameter

2020-03-25 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1661 by this push:
 new d73056e  Added 'cloud' parameter
 new d5012da  Merge remote-tracking branch 'origin/DLAB-1661' into DLAB-1661
d73056e is described below

commit d73056e66f3bff7a06ddd2509cdb881434217185
Author: Oleh Fuks 
AuthorDate: Wed Mar 25 12:06:38 2020 +0200

Added 'cloud' parameter
---
 .../src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java | 2 ++
 .../main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java   | 2 ++
 2 files changed, 4 insertions(+)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
index f4deb0a..fffc70b 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/UserRoleDaoImpl.java
@@ -56,6 +56,7 @@ public class UserRoleDaoImpl extends BaseDAO implements 
UserRoleDao {
private static final String GROUPS_FIELD = "groups";
private static final String DESCRIPTION = "description";
private static final String TYPE = "type";
+   private static final String CLOUD = "cloud";
private static final String ROLES = "roles";
private static final String GROUPS = "$groups";
private static final String GROUP = "group";
@@ -171,6 +172,7 @@ public class UserRoleDaoImpl extends BaseDAO implements 
UserRoleDao {
return new Document().append(ID, "$" + ID)
.append(DESCRIPTION, "$" + DESCRIPTION)
.append(TYPE, "$" + TYPE)
+   .append(CLOUD, "$" + CLOUD)
.append(USERS_FIELD, "$" + USERS_FIELD)
.append(EXPLORATORY_SHAPES_FIELD, "$" + 
EXPLORATORY_SHAPES_FIELD)
.append(PAGES_FIELD, "$" + PAGES_FIELD)
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
index b1d3337..5c90602 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
@@ -18,6 +18,7 @@
  */
 package com.epam.dlab.backendapi.resources.dto;
 
+import com.epam.dlab.cloud.CloudProvider;
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Getter;
@@ -35,6 +36,7 @@ public class UserRoleDto {
private String id;
private String description;
private Type type;
+   private CloudProvider cloud;
private Set pages;
private Set computationals;
private Set exploratories;


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



[incubator-dlab] branch DLAB-1590 created (now b9dc738)

2020-03-25 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


  at b9dc738  [DLAB-1590] Admin per project

This branch includes the following new commits:

 new b9dc738  [DLAB-1590] Admin per project

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-1590] Admin per project

2020-03-25 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit b9dc738fdfe689a41d7b381c0d22251924f093c4
Author: Oleh Fuks 
AuthorDate: Tue Mar 24 18:58:57 2020 +0200

[DLAB-1590] Admin per project
---
 .../ProjectAdmin.java} |  21 ++--
 .../User.java} |  21 ++--
 .../java/com/epam/dlab/backendapi/dao/EnvDAO.java  |  19 ---
 .../com/epam/dlab/backendapi/dao/ProjectDAO.java   |   2 -
 .../epam/dlab/backendapi/dao/ProjectDAOImpl.java   |  11 +-
 .../dlab/backendapi/domain/ProjectManagingDTO.java |  16 ---
 .../interceptor/ProjectAdminInterceptor.java   |  74 
 .../backendapi/modules/AwsSelfServiceModule.java   |  83 -
 .../backendapi/modules/AzureSelfServiceModule.java |  81 -
 .../backendapi/modules/CloudProviderModule.java|   5 +
 .../backendapi/modules/GcpSelfServiceModule.java   |  84 --
 .../dlab/backendapi/modules/ModuleFactory.java |  13 ---
 .../backendapi/resources/EnvironmentResource.java  |   2 +-
 .../resources/InfrastructureInfoResource.java  |  11 +-
 .../dlab/backendapi/resources/ProjectResource.java |  52 +++--
 .../resources/dto/HealthStatusPageDTO.java | 129 +
 .../com/epam/dlab/backendapi/roles/UserRole.java   |  13 +--
 .../com/epam/dlab/backendapi/roles/UserRoles.java  |  58 ++---
 .../backendapi/service/EnvironmentService.java |   6 +-
 .../service/InfrastructureInfoService.java |   2 +-
 .../dlab/backendapi/service/ProjectService.java|  13 +--
 .../service/impl/EnvironmentServiceImpl.java   |  13 +--
 .../impl/InfrastructureInfoServiceImpl.java|  22 ++--
 .../service/impl/ProjectServiceImpl.java   |  65 +++
 .../service/impl/UserGroupServiceImpl.java |   6 +-
 .../src/main/resources/mongo/gcp/mongo_roles.json  |  17 +++
 .../resources/EnvironmentResourceTest.java |   8 +-
 .../resources/InfrastructureInfoResourceTest.java  |  34 --
 .../backendapi/resources/ProjectResourceTest.java  |  24 ++--
 .../service/impl/EnvironmentServiceImplTest.java   |  24 
 .../service/impl/UserGroupServiceImplTest.java |  13 ++-
 31 files changed, 284 insertions(+), 658 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureInfoService.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/ProjectAdmin.java
similarity index 59%
copy from 
services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureInfoService.java
copy to 
services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/ProjectAdmin.java
index aa23d1d..2fca3cd 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureInfoService.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/ProjectAdmin.java
@@ -17,19 +17,14 @@
  * under the License.
  */
 
-package com.epam.dlab.backendapi.service;
+package com.epam.dlab.backendapi.annotation;
 
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.resources.dto.HealthStatusPageDTO;
-import com.epam.dlab.backendapi.resources.dto.ProjectInfrastructureInfo;
-import com.epam.dlab.dto.InfrastructureMetaInfoDTO;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 
-import java.util.List;
-
-public interface InfrastructureInfoService {
-   List getUserResources(String user);
-
-   HealthStatusPageDTO getHeathStatus(UserInfo user, boolean fullReport, 
boolean isAdmin);
-
-   InfrastructureMetaInfoDTO getInfrastructureMetaInfo();
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ProjectAdmin {
 }
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureInfoService.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/User.java
similarity index 59%
copy from 
services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureInfoService.java
copy to 
services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/User.java
index aa23d1d..b56dd20 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/InfrastructureInfoService.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/User.java
@@ -17,19 +17,14 @@
  * under the License.
  */
 
-package com.epam.dlab.backendapi.service;
+package com.epam.dlab.backendapi.annotation;
 
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.resources.dto.HealthStatusPageDTO;
-import com.epam.dlab.backendapi.resources.dto.ProjectInfrastructureInfo;
-import

[incubator-dlab] annotated tag 2.3.0 updated (3b67611 -> 29d95b1)

2020-04-27 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a change to annotated tag 2.3.0
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


*** WARNING: tag 2.3.0 was modified! ***

from 3b67611  (commit)
  to 29d95b1  (tag)
 tagging 3b6761159d39388a4221ef4001f78e8b8a06de3e (commit)
  by Oleh Fuks
  on Mon Apr 27 11:03:51 2020 +0300

- Log -
DLab 2.3.0 release
---


No new revisions were added by this update.

Summary of changes:


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



svn commit: r39127 - in /dev/incubator/dlab/2.3: apache-dlab-2.3.0-incubating.tar.gz apache-dlab-2.3.0-incubating.tar.gz.asc apache-dlab-2.3.0-incubating.tar.gz.sha512

2020-04-27 Thread ofuks
Author: ofuks
Date: Mon Apr 27 08:26:58 2020
New Revision: 39127

Log:
DLab 2.3.0 release

Added:
dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz   (with props)
dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.asc
dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.sha512

Added: dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz
==
Binary file - no diff available.

Propchange: dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz
--
svn:mime-type = application/octet-stream

Added: dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.asc
==
--- dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.asc (added)
+++ dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.asc Mon Apr 27 
08:26:58 2020
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCAAdFiEErZFJiVV29w/QhFgmOeCfJZBfoakFAl6mlsEACgkQOeCfJZBf
+oalWog//YsvS7C4k4aZ1XMI8NslXRzYguBtMAcXqleKtsUCULeWIjEyz3rqtdkH4
+ImCjnBcb3xZJzMkFCXE2BSTQeP7Y+qqar7bYOjN4+iWgKB09OTOgeOU5VxylkxeR
+qijZxDOA8v82C7x7Eomqqajxhs10n78M/eSERhAXV9r2QMkFOKWNWjxB8Mv8GbVk
+bLm32w079ZLJCzZDpL4rUmCjkk1GO/9Ox8Cbv854Re09MoCpYgkcQXOk38l3mkKf
+aY6G93QTBjRF5+/nax7N3QAzZsyJO0Lkm+thjQqNuzVfGS0l+3+54d4TFq6sRCCC
+cQXPYmxLj10YoAZzbqiQuUwJV+ivPmFQ/bSaCWrr5NXQORoJJbhRpFRJ1x2BwOmZ
+VhrgPIih26LbkcKn2M0Xog0y+faVfqIW+yXvLYpK1WINDf/gnydg8aohHREZoHRq
+qRQdDnMX+L71yDVo9VX02pSr6BnlFFdqtlh9shoDfp8nZty+8HlBHVKo4pKX7AQy
+o4YOkfjjb4Tobo6JwgWs87EI0YLgTePtDXdpY9ZS3OWEbZRLzbrxg3nvh0fr4G/K
+iE3aYWyb/bDnYojKyWsyyuCfE/97qhkuawguXjaCcqwfY9Pni6nOSNX/zGLFldLe
+f79Erd0EfC/YutwxvHDJFuWH7VdxZLZ9955qeFXaheQ9x1uEw1k=
+=VaNS
+-END PGP SIGNATURE-

Added: dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.sha512
==
--- dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.sha512 (added)
+++ dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.sha512 Mon Apr 
27 08:26:58 2020
@@ -0,0 +1,3 @@
+/Users/ofuks/work/release/2.3.0/apache-dlab-2.3.0-incubating.tar.gz: 
+F37F0C61 6D40BA47 70DA37B6 A56025CB 7FDD2E88 62D847AE D95D979F BDB3A447 
E9C072EA
+ C8EB2D9D BEB86CC9 7DE4E7FD 31388EA6 7EF881D9 12961D80 48FC3D46



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



svn commit: r39126 - in /dev/incubator/dlab/2.3: apache-dlab-2.3.0-incubating.tar.gz apache-dlab-2.3.0-incubating.tar.gz.asc apache-dlab-2.3.0-incubating.tar.gz.sha512

2020-04-27 Thread ofuks
Author: ofuks
Date: Mon Apr 27 08:22:19 2020
New Revision: 39126

Log:
Deleted files becuase of missing copyright

Removed:
dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz
dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.asc
dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.sha512


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



[incubator-dlab] 02/06: Merge remote-tracking branch 'origin/bucket-browser-gcp' into bucket-browser-gcp

2020-04-28 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 40d6e90e1d30d51dc6d8e8075a04b99773439f8f
Merge: 5dc1b13 f45a0d7
Author: Oleh Fuks 
AuthorDate: Fri Apr 24 11:33:06 2020 +0300

Merge remote-tracking branch 'origin/bucket-browser-gcp' into 
bucket-browser-gcp

 .../core/interceptors/http.token.interceptor.ts|   2 +-
 .../services/applicationServiceFacade.service.ts   |  29 +++
 .../app/core/services/bucket-browser.service.ts| 153 +
 .../bucket-browser/bucket-browser.component.html   |  90 
 .../bucket-browser/bucket-browser.component.scss   | 243 +
 .../bucket-browser/bucket-browser.component.ts | 205 +
 .../folder-tree/folder-tree.component.html |  32 +++
 .../folder-tree/folder-tree.component.scss |  38 
 .../folder-tree/folder-tree.component.ts   | 191 
 .../detail-dialog/detail-dialog.component.html |   4 +-
 .../detail-dialog/detail-dialog.component.scss |   1 +
 .../detail-dialog/detail-dialog.component.ts   |  11 +-
 .../src/app/resources/resources.component.html |   3 +
 .../src/app/resources/resources.component.ts   |   6 +
 .../webapp/src/app/resources/resources.module.ts   |  12 +-
 .../webapp/src/assets/styles/_dialogs.scss |   1 +
 16 files changed, 1013 insertions(+), 8 deletions(-)


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



[incubator-dlab] 03/06: Merge remote-tracking branch 'origin/bucket-browser-gcp' into bucket-browser-gcp

2020-04-28 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 59dc52b3a3d0053869d951cc2868ff6439602942
Merge: 40d6e90 2f2f49d
Author: Oleh Fuks 
AuthorDate: Mon Apr 27 17:53:43 2020 +0300

Merge remote-tracking branch 'origin/bucket-browser-gcp' into 
bucket-browser-gcp

 .../src/ssn/templates/ssn_nginx.conf   |   4 +-
 .../administration/project/project.component.ts|   1 -
 .../core/interceptors/http.token.interceptor.ts|  10 +-
 .../src/app/core/services/appRouting.service.ts|   1 +
 .../services/applicationServiceFacade.service.ts   |  21 ++--
 .../app/core/services/bucket-browser.service.ts| 104 ++-
 .../webapp/src/app/core/util/fileUtils.ts  |  10 ++
 .../bucket-browser/bucket-browser.component.html   |  29 +++---
 .../bucket-browser/bucket-browser.component.scss   |  16 +++
 .../bucket-browser/bucket-browser.component.ts | 100 ++
 .../bucket-browser/bucket-data.service.ts  | 108 
 .../folder-tree/folder-tree.component.ts   | 113 -
 .../detail-dialog/detail-dialog.component.html |   4 +-
 .../detail-dialog/detail-dialog.component.ts   |   4 +-
 .../webapp/src/app/resources/resources.module.ts   |   3 +
 15 files changed, 289 insertions(+), 239 deletions(-)


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



[incubator-dlab] 06/06: Added permission for bucket browser

2020-04-28 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 894465b7f9f87fd435fbb70d39340470f444afc5
Author: Oleh Fuks 
AuthorDate: Tue Apr 28 15:51:49 2020 +0300

Added permission for bucket browser
---
 .../backendapi/resources/dto/HealthStatusPageDTO.java  | 11 +++
 .../service/impl/InfrastructureInfoServiceImpl.java| 18 --
 .../src/main/resources/mongo/aws/mongo_roles.json  |  1 +
 .../src/main/resources/mongo/azure/mongo_roles.json|  1 +
 4 files changed, 29 insertions(+), 2 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusPageDTO.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusPageDTO.java
index 17e7b91..4eb0b3b 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusPageDTO.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/HealthStatusPageDTO.java
@@ -47,4 +47,15 @@ public class HealthStatusPageDTO {
private int billingUserQuoteUsed;
@JsonProperty
private boolean projectAssigned;
+   @JsonProperty
+   private BucketBrowser bucketBrowser;
+
+   @Builder
+   @Data
+   public static class BucketBrowser {
+   private final boolean view;
+   private final boolean upload;
+   private final boolean download;
+   private final boolean delete;
+   }
 }
\ No newline at end of file
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
index b1eac51..4063ca1 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
@@ -29,6 +29,7 @@ import com.epam.dlab.backendapi.domain.ProjectEndpointDTO;
 import com.epam.dlab.backendapi.resources.dto.HealthStatusEnum;
 import com.epam.dlab.backendapi.resources.dto.HealthStatusPageDTO;
 import com.epam.dlab.backendapi.resources.dto.ProjectInfrastructureInfo;
+import com.epam.dlab.backendapi.roles.RoleType;
 import com.epam.dlab.backendapi.roles.UserRoles;
 import com.epam.dlab.backendapi.service.BillingService;
 import com.epam.dlab.backendapi.service.EndpointService;
@@ -55,9 +56,12 @@ import java.util.stream.StreamSupport;
 
 @Slf4j
 public class InfrastructureInfoServiceImpl implements 
InfrastructureInfoService {
+   private static final String RELEASE_NOTES_FORMAT = 
"https://github.com/apache/incubator-dlab/blob/%s/RELEASE_NOTES.md;;
+   private static final String PERMISSION_VIEW = "/api/bucket/view";
+   private static final String PERMISSION_UPLOAD = "/api/bucket/upload";
+   private static final String PERMISSION_DOWNLOAD = 
"/api/bucket/download";
+   private static final String PERMISSION_DELETE = "/api/bucket/delete";
 
-   private static final String RELEASE_NOTES_FORMAT = 
"https://github.com/apache/incubator-dlab/blob/%s; +
-   "/RELEASE_NOTES.md";
private final ExploratoryDAO expDAO;
private final SelfServiceApplicationConfiguration configuration;
private final BillingDAO billingDAO;
@@ -134,6 +138,12 @@ public class InfrastructureInfoServiceImpl implements 
InfrastructureInfoService

.projectAssigned(projectService.isAnyProjectAssigned(userInfo))

.billingQuoteUsed(billingDAO.getBillingQuoteUsed())

.billingUserQuoteUsed(billingDAO.getBillingUserQuoteUsed(user))
+   
.bucketBrowser(HealthStatusPageDTO.BucketBrowser.builder()
+   
.view(checkAccess(userInfo, PERMISSION_VIEW))
+   
.upload(checkAccess(userInfo, PERMISSION_UPLOAD))
+   
.download(checkAccess(userInfo, PERMISSION_DOWNLOAD))
+   
.delete(checkAccess(userInfo, PERMISSION_DELETE))
+   .build())
.build();
} catch (Exception e) {
log.warn("Could not return status of resources for user 
{}: {}", user, e.getLocalizedMessage(), e);
@@ -183,4 +193,8 @@ public class InfrastructureInfoServiceImpl implements 
InfrastructureInfoService
 
return sha

[incubator-dlab] branch bucket-browser-gcp updated (2f2f49d -> 894465b)

2020-04-28 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a change to branch bucket-browser-gcp
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


from 2f2f49d  Fix merge bug
 new 5dc1b13  bucket browser aws
 new 40d6e90  Merge remote-tracking branch 'origin/bucket-browser-gcp' into 
bucket-browser-gcp
 new 59dc52b  Merge remote-tracking branch 'origin/bucket-browser-gcp' into 
bucket-browser-gcp
 new e84ca63  Added permissions for bucket browser
 add 0d48523  [odahu-integration] Created Odahu template
 add 930d2d1  [odahu-integration] Created Odahu template
 add c908b19  [odahu-integration] Created Odahu template
 add ae3aaad  [odahu-integration] Added all parameters and fixed some issues
 add 1a33442  [odahu-integration] Changed input method for certificates for 
Odahu
 add 71fe6e9  [odahu-integration] Added support of nexus repository
 add 7d977b9  [odahu-integration] Bugfix
 add 9b6ef03  [odahu-integration] Bugfix
 add 066ebf1  [odahu-integration] Bugfix
 add 2f45bba  [odahu-integration] Added test print functions
 add 256b5dc  [odahu-integration] Added test print functions
 add 095b7f8  [odahu-integration] Added test print functions
 add 5650fb1  [odahu-integration] Bugfix
 add 36056b7  [odahu-integration] Bugfix
 add 04a5fad  [odahu-integration] Bugfix
 add be8b5c6  [odahu-integration] Bugfix
 add 7373ba7  [odahu-integration] Bugfix
 add 79cd655  [odahu-integration] Added Nexus authentication
 add 6ee5e52  [odahu-integration] Bugfixing
 add a0c2e62  [odahu-integration] Bugfixing
 add f3922f1  [odahu-integration] Bugfixing
 add a43330c  [odahu-integration] Bugfixing and added function that gets 
available zones
 add e89888e  [DLAB-1357]: Added page Legion deployment
 add 09efef4  [DLAB-1357]: Added legion icon to Resource page
 add c0d4694  [DLAB-1357]: Added condition for empty clusters list
 add 13050f5  [DLAB-1357]: Added legion icon to Resource page
 add fbcc5f2  [DLAB-1451]: Added url to application facade
 add 34fc749  Added create odahu cluster feature
 add eb1bf66  Merge branch 'DLAB-1357' of github.com:apache/incubator-dlab 
into DLAB-1357
 add f2c3da1  [DLAB-1357]: Started to add connection with backend
 add 7914e54  Added edge_user_name parameter
 add a6544f3  Merge remote-tracking branch 'origin/DLAB-1357' into DLAB-1357
 add b7d6ed5  [DLAB-1457]: Added create and get odahu request
 add af2b549  Updated callback functionality
 add b9a993b  Merge remote-tracking branch 'origin/DLAB-1357' into DLAB-1357
 add ac3285d  [DLAB-1357]: Small fixes
 add 248cb1c  [DLAB-1357]: Odahu grid style fixed
 add acdf862  Added start/stop/terminate features
 add 79a5018  Merge branch 'DLAB-1357' of github.com:apache/incubator-dlab 
into DLAB-1357
 add 722ff6e  [DLAB-1357]: Added stop/start action for ODAHU
 add e415821  [DLAB-1357]: Fixed terminate action, added validation
 add 6833966  Small fix
 add 2178ea1  Default Changelist
 add 20b1df1  Added confirmation dialog for clusters action
 add 505c9ea  Hided odahu for for AWS, Azure
 add 231f2cc  Default Changelist
 add f509cda  Changed HTTP method from DELETE to POST
 add ab979e2  Merge remote-tracking branch 'origin/DLAB-1357' into DLAB-1357
 add 33de467  Secured APIs
 add 41f3742  Stop/terminate odahu iun case of stopping/terminating 
project/endpoint
 add 15b134a  Disable action if cluster terminated
 add ab94068  Merge remote-tracking branch 'origin/DLAB-1357' into DLAB-1357
 add 0ee7696  Merge remote-tracking branch 'origin/DLAB-1357' into DLAB-1357
 add 047ce4d  Added Odahu on 'List of Resources' and 'Environment 
Management' pages
 add c01ee33  small fixes
 add 16e0e1a  Added tags functionality for Odahu
 add 0f9a92f  Fixed bug with displaying on 'List of Resources' page
 add 0156872  Added Odahu to resources.
 add 7c211ea  Fixed error message position
 add c625c6b  Merge branch 'DLAB-1357' into odahu-integration
 add f6e8de6  Merge remote-tracking branch 'origin/odahu-integration' into 
odahu-integration
 add 66807b6  [odahu-integration] Bugfixing
 add 875c5e0  [odahu-integration] Bugfixing
 add c31fa9d  Increased warmupPollTimeout
 add dc6f0c5  Merge branch 'develop' into odahu-integration
 add fc6ffdc  Added some changes after merge
 add 0810373  Merge pull request #621 from apache/DLAB-625
 add b0e5737  [odahu-integration] Temporarily removed preparation of odahu 
image
 add 9f01030  [odahu-integration] Fixed link to jupyterlab image
 add 032c5ca  Small fixes
 add a4d320a  Merge remote-tracking branch 'origin/odahu-integration' into 
odahu-integration
 add c7be71b  Merge remote-tracking branch 'origin/odahu-integration' into 
odahu-integration
 add df99320  [odahu-integration] Fixed scripts

[incubator-dlab] 04/06: Added permissions for bucket browser

2020-04-28 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit e84ca635019c375a6ac3089658edcfee72045d18
Author: Oleh Fuks 
AuthorDate: Tue Apr 28 12:35:54 2020 +0300

Added permissions for bucket browser
---
 .../dlab/backendapi/resources/BucketResource.java  |  5 +++
 .../dlab/backendapi/resources/dto/UserRoleDto.java |  1 +
 .../src/main/resources/mongo/aws/mongo_roles.json  | 48 ++
 .../main/resources/mongo/azure/mongo_roles.json| 48 ++
 .../src/main/resources/mongo/gcp/mongo_roles.json  | 48 ++
 5 files changed, 150 insertions(+)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
index a98daa2..7198e35 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
@@ -27,6 +27,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
 import org.glassfish.jersey.media.multipart.FormDataParam;
 
+import javax.annotation.security.RolesAllowed;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
@@ -54,6 +55,7 @@ public class BucketResource {
 @Path("/{bucket}/endpoint/{endpoint}")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@RolesAllowed("/api/bucket/view")
 public Response getListOfObjects(@Auth UserInfo userInfo,
  @PathParam("bucket") String bucket,
  @PathParam("endpoint") String endpoint) {
@@ -64,6 +66,7 @@ public class BucketResource {
 @Path("/upload")
 @Consumes(MediaType.MULTIPART_FORM_DATA)
 @Produces(MediaType.APPLICATION_JSON)
+@RolesAllowed("/api/bucket/upload")
 public Response uploadObject(@Auth UserInfo userInfo,
  @FormDataParam("object") String object,
  @FormDataParam("bucket") String bucket,
@@ -78,6 +81,7 @@ public class BucketResource {
 @Path("/{bucket}/object/{object}/endpoint/{endpoint}/download")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_OCTET_STREAM)
+@RolesAllowed("/api/bucket/download")
 public Response downloadObject(@Auth UserInfo userInfo,
@PathParam("bucket") String bucket,
@PathParam("object") String object,
@@ -91,6 +95,7 @@ public class BucketResource {
 @Path("/{bucket}/object/{object}/endpoint/{endpoint}")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
+@RolesAllowed("/api/bucket/delete")
 public Response deleteObject(@Auth UserInfo userInfo,
  @PathParam("bucket") String bucket,
  @PathParam("object") String object,
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
index 5c90602..84551af 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
@@ -50,6 +50,7 @@ public class UserRoleDto {
NOTEBOOK_SHAPE,
COMPUTATIONAL_SHAPE,
BILLING,
+   BUCKET_BROWSER,
ADMINISTRATION
}
 }
diff --git 
a/services/self-service/src/main/resources/mongo/aws/mongo_roles.json 
b/services/self-service/src/main/resources/mongo/aws/mongo_roles.json
index 9998d84..076dc75 100644
--- a/services/self-service/src/main/resources/mongo/aws/mongo_roles.json
+++ b/services/self-service/src/main/resources/mongo/aws/mongo_roles.json
@@ -324,6 +324,54 @@
 ]
   },
   {
+"_id": "bucketBrowserView",
+"description": "Allow to view objects within the bucket",
+"type": "BUCKET_BROWSER",
+"cloud": "GCP",
+"pages": [
+  "/api/bucket/view"
+],
+"groups": [
+  "$anyuser"
+]
+  },
+  {
+"_id": "bucketBrowserUpload",
+"description": "Allow to upload object to the bucket",
+"type": "BUCKET_BROWSER",
+"cloud": &q

[incubator-dlab] 01/06: bucket browser aws

2020-04-28 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 5dc1b13e3f41b74e374646bb3e7ba11360e4bb13
Author: Oleh Fuks 
AuthorDate: Thu Apr 23 15:31:48 2020 +0300

bucket browser aws
---
 .../src/ssn/templates/ssn.yml  |   2 +-
 services/provisioning-service/pom.xml  |  16 +++
 .../dlab/backendapi/modules/ProductionModule.java  |  29 ++---
 .../backendapi/modules/ProvisioningDevModule.java  |   9 +-
 .../dlab/backendapi/resources/BucketResource.java  |   8 --
 .../service/impl/aws/BucketServiceAwsImpl.java | 125 +
 6 files changed, 164 insertions(+), 25 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/templates/ssn.yml 
b/infrastructure-provisioning/src/ssn/templates/ssn.yml
index 949ddf9..503116f 100644
--- a/infrastructure-provisioning/src/ssn/templates/ssn.yml
+++ b/infrastructure-provisioning/src/ssn/templates/ssn.yml
@@ -64,7 +64,7 @@ provisioningService:
 
 bucketService:
   jerseyClient:
-timeout: 5m
+timeout: 10m
 connectionTimeout: 3s
 
 # Log out user on inactivity
diff --git a/services/provisioning-service/pom.xml 
b/services/provisioning-service/pom.xml
index 78bc19b..2fc22bd 100644
--- a/services/provisioning-service/pom.xml
+++ b/services/provisioning-service/pom.xml
@@ -38,6 +38,13 @@
 pom
 import
 
+
+software.amazon.awssdk
+bom
+2.11.9
+pom
+import
+
 
 
 
@@ -85,6 +92,15 @@
 google-cloud-storage
 1.106.0
 
+
+software.amazon.awssdk
+s3
+
+
+org.apache.httpcomponents
+httpclient
+4.5.9
+
 
 
 commons-io
diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
index d01ebc5..6ba8505 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
@@ -34,6 +34,7 @@ import 
com.epam.dlab.backendapi.service.RestoreCallbackHandlerService;
 import com.epam.dlab.backendapi.service.impl.CheckInactivityServiceImpl;
 import com.epam.dlab.backendapi.service.impl.ProjectServiceImpl;
 import com.epam.dlab.backendapi.service.impl.RestoreCallbackHandlerServiceImpl;
+import com.epam.dlab.backendapi.service.impl.aws.BucketServiceAwsImpl;
 import com.epam.dlab.backendapi.service.impl.gcp.BucketServiceGcpImpl;
 import com.epam.dlab.cloud.CloudProvider;
 import com.epam.dlab.constants.ServiceConsts;
@@ -67,17 +68,19 @@ public class ProductionModule extends 
ModuleBasehttp://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.service.impl.aws;
+
+import com.epam.dlab.backendapi.service.BucketService;
+import com.epam.dlab.dto.bucket.BucketDTO;
+import com.epam.dlab.exceptions.DlabException;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import software.amazon.awssdk.awscore.exception.AwsServiceException;
+import software.amazon.awssdk.core.sync.RequestBody;
+import software.amazon.awssdk.core.sync.ResponseTransformer;
+import software.amazon.awssdk.services.s3.S3Client;
+import software.amazon.awssdk.services.s3.model.DeleteObjectRequest;
+import software.amazon.awssdk.services.s3.model.GetObjectRequest;
+import software.amazon.awssdk.services.s3.model.ListObjectsRequest;
+import software.amazon.awssdk.services.s3.model.PutObjectRequest;
+import software.amazon.awssdk.services.s3.model.S3Object;
+
+import java.io.InputStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Slf4j
+public class BucketServiceAwsImpl implements BucketService {
+
+@Override
+public List getObjects(String bucket) {
+try {
+S3Client s3 = S3Client.create();
+ListObjectsRequest getRequest = ListObjectsRequest
+.builder()
+.bucket(bucket)
+.build();
+
+return s3.listObjects(getRequest).contents()
+.stream()
+.map(o -> toBucket

[incubator-dlab] 05/06: Merge branch 'develop' into bucket-browser-gcp

2020-04-28 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit dcf66f15fd3b625356a357e90a286ac40f9ac738
Merge: e84ca63 915a149
Author: Oleh Fuks 
AuthorDate: Tue Apr 28 12:42:45 2020 +0300

Merge branch 'develop' into bucket-browser-gcp

# Conflicts:
#   infrastructure-provisioning/src/ssn/templates/ssn.yml
#   
services/dlab-webapp-common/src/main/java/com/epam/dlab/ServiceConfiguration.java
#   
services/dlab-webapp-common/src/main/java/com/epam/dlab/constants/ServiceConsts.java
#   
services/dlab-webapp-common/src/main/java/com/epam/dlab/rest/client/RESTService.java
#   
services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java
#   
services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
#   services/self-service/src/main/resources/mongo/aws/mongo_roles.json
#   services/self-service/src/main/resources/mongo/azure/mongo_roles.json
#   services/self-service/src/main/resources/mongo/gcp/mongo_roles.json

 README.md  | 503 +
 USER_GUIDE.md  | 476 ++-
 doc/billing_filter.png | Bin 18705 -> 41447 bytes
 doc/billing_page.png   | Bin 18577 -> 264721 bytes
 doc/bin_icon.png   | Bin 0 -> 4379 bytes
 doc/computational_scheduler.png| Bin 33900 -> 35577 bytes
 doc/computational_scheduler_create.png | Bin 3893 -> 3277 bytes
 doc/connect_endpoint.png   | Bin 0 -> 202030 bytes
 doc/create_notebook_from_ami.png   | Bin 27066 -> 35594 bytes
 doc/dataproc_create.png| Bin 0 -> 129369 bytes
 doc/delete_btn.png | Bin 0 -> 4155 bytes
 doc/delete_group.png   | Bin 34704 -> 45914 bytes
 doc/dlab_aws.png   | Bin 0 -> 96693 bytes
 doc/dlab_azure.png | Bin 0 -> 94589 bytes
 doc/dlab_gcp.png   | Bin 0 -> 108227 bytes
 doc/emr_creating.png   | Bin 37126 -> 43196 bytes
 doc/emr_terminate_confirm.png  | Bin 1760535 -> 14257 bytes
 doc/endpoint_list.png  | Bin 0 -> 181738 bytes
 doc/environment_management.png | Bin 66404 -> 90301 bytes
 doc/git_creds_window.png   | Bin 7190623 -> 25654 bytes
 doc/git_creds_window2.png  | Bin 5946035 -> 26511 bytes
 doc/main_page.png  | Bin 4746590 -> 35533 bytes
 doc/main_page2.png | Bin 8157879 -> 49611 bytes
 doc/main_page3.png | Bin 8157879 -> 48735 bytes
 doc/main_page_filter.png   | Bin 62679 -> 79991 bytes
 doc/manage_env_confirm.png | Bin 10464 -> 14049 bytes
 doc/manage_environment.png | Bin 21334 -> 18263 bytes
 doc/manage_role.png| Bin 108456 -> 28068 bytes
 doc/managemanage_resource_actions.png  | Bin 4997 -> 4976 bytes
 doc/notebook_create.png| Bin 41323 -> 33033 bytes
 doc/notebook_info.png  | Bin 157517 -> 42371 bytes
 doc/notebook_libs_status.png   | Bin 50720 -> 59233 bytes
 doc/notebook_scheduler.png | Bin 36928 -> 39368 bytes
 doc/notebook_terminated.png| Bin 38113 -> 56038 bytes
 doc/notebook_terminating.png   | Bin 39506 -> 56292 bytes
 doc/pen_icon.png   | Bin 0 -> 4171 bytes
 doc/project_menu.png   | Bin 0 -> 86667 bytes
 doc/project_view.png   | Bin 0 -> 234276 bytes
 doc/roles.png  | Bin 0 -> 198223 bytes
 doc/scheduler_by_inactivity.png| Bin 0 -> 22076 bytes
 doc/spark_stop_confirm.png | Bin 10920 -> 12767 bytes
 doc/upload_or_generate_user_key.png| Bin 17078 -> 37302 bytes
 .../files/aws/deeplearning_description.json|   4 +-
 .../files/azure/deeplearning_description.json  |   4 +-
 .../general/files/azure/tensor_description.json|   4 +-
 .../files/gcp/deeplearning_description.json|   4 +-
 .../src/general/lib/os/debian/ssn_lib.py   |  29 +-
 .../src/general/scripts/aws/ssn_configure.py   |  10 +-
 .../src/general/scripts/azure/ssn_configure.py |  30 +

[incubator-dlab] branch bucket-browser-gcp updated: bucket browser azure configs

2020-04-28 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/bucket-browser-gcp by this 
push:
 new 416556b  bucket browser azure configs
416556b is described below

commit 416556b2c8d9e15ed520863f1dee8bb35c949b3f
Author: Oleh Fuks 
AuthorDate: Tue Apr 28 18:31:22 2020 +0300

bucket browser azure configs
---
 .../dlab/backendapi/modules/ProductionModule.java  |  3 ++
 .../backendapi/modules/ProvisioningDevModule.java  |  9 ++--
 .../service/impl/azure/BucketServiceAzureImpl.java | 48 ++
 3 files changed, 57 insertions(+), 3 deletions(-)

diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
index 6ba8505..3aac3cd 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
@@ -35,6 +35,7 @@ import 
com.epam.dlab.backendapi.service.impl.CheckInactivityServiceImpl;
 import com.epam.dlab.backendapi.service.impl.ProjectServiceImpl;
 import com.epam.dlab.backendapi.service.impl.RestoreCallbackHandlerServiceImpl;
 import com.epam.dlab.backendapi.service.impl.aws.BucketServiceAwsImpl;
+import com.epam.dlab.backendapi.service.impl.azure.BucketServiceAzureImpl;
 import com.epam.dlab.backendapi.service.impl.gcp.BucketServiceGcpImpl;
 import com.epam.dlab.cloud.CloudProvider;
 import com.epam.dlab.constants.ServiceConsts;
@@ -81,6 +82,8 @@ public class ProductionModule extends 
ModuleBasehttp://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.service.impl.azure;
+
+import com.epam.dlab.backendapi.service.BucketService;
+import com.epam.dlab.dto.bucket.BucketDTO;
+
+import java.io.InputStream;
+import java.util.List;
+
+public class BucketServiceAzureImpl implements BucketService {
+@Override
+public List getObjects(String bucket) {
+return null;
+}
+
+@Override
+public void uploadObject(String bucket, String object, InputStream stream) 
{
+
+}
+
+@Override
+public byte[] downloadObject(String bucket, String object) {
+return new byte[0];
+}
+
+@Override
+public void deleteObject(String bucket, String object) {
+
+}
+}


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



[incubator-dlab] 01/01: Merge branch 'bucket-browser-gcp' into develop

2020-04-28 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 604348251c872dc862aaa0092fce86f1effd1320
Merge: 50d7885 416556b
Author: Oleh Fuks 
AuthorDate: Tue Apr 28 18:32:33 2020 +0300

Merge branch 'bucket-browser-gcp' into develop

 .../src/ssn/templates/ssn.yml  |   5 +
 .../src/ssn/templates/ssn_nginx.conf   |   2 +-
 .../java/com/epam/dlab/dto/bucket/BucketDTO.java}  |  34 +--
 .../epam/dlab/dto/bucket/BucketDownloadDTO.java}   |  22 +-
 services/dlab-webapp-common/pom.xml|   5 +
 .../java/com/epam/dlab/ServiceConfiguration.java   |   9 +
 .../com/epam/dlab/constants/ServiceConsts.java |  19 +-
 .../com/epam/dlab/rest/client/RESTService.java |  62 -
 .../epam/dlab/rest/client/RESTServiceFactory.java  |   5 +-
 services/provisioning-service/pom.xml  |  43 
 .../backendapi/ProvisioningServiceApplication.java |  34 ++-
 .../backendapi/modules/GcpProvisioningModule.java  |   1 +
 .../dlab/backendapi/modules/ProductionModule.java  |  12 +
 .../backendapi/modules/ProvisioningDevModule.java  |  37 ++-
 .../dlab/backendapi/resources/BucketResource.java  |  93 
 .../dlab/backendapi/service/BucketService.java}|  30 ++-
 .../service/impl/aws/BucketServiceAwsImpl.java | 125 ++
 .../impl/azure/BucketServiceAzureImpl.java}|  52 ++--
 .../service/impl/gcp/BucketServiceGcpImpl.java | 109 +
 .../backendapi/modules/CloudProviderModule.java|   2 +
 .../epam/dlab/backendapi/modules/DevModule.java|   6 +
 .../dlab/backendapi/modules/ProductionModule.java  |   6 +
 .../dlab/backendapi/resources/BucketResource.java  | 106 +
 ...thStatusPageDTO.java => BucketDownloadDTO.java} |  37 +--
 .../resources/dto/HealthStatusPageDTO.java |  11 +
 .../dlab/backendapi/resources/dto/UserRoleDto.java |   1 +
 .../dlab/backendapi/service/BucketService.java}|  25 +-
 .../backendapi/service/impl/BucketServiceImpl.java | 129 ++
 .../impl/InfrastructureInfoServiceImpl.java|  18 +-
 .../src/main/resources/mongo/aws/mongo_roles.json  |  49 
 .../main/resources/mongo/azure/mongo_roles.json|  49 
 .../src/main/resources/mongo/gcp/mongo_roles.json  |  48 
 .../administration/management/management.model.ts  |   1 +
 .../administration/project/project.component.ts|   1 -
 .../core/interceptors/http.token.interceptor.ts|  10 +-
 .../src/app/core/services/appRouting.service.ts|   1 +
 .../services/applicationServiceFacade.service.ts   |  40 +++-
 .../app/core/services/bucket-browser.service.ts|  61 +
 .../webapp/src/app/core/util/fileUtils.ts  |  10 +
 .../bucket-browser/bucket-browser.component.html   | 131 +++
 .../bucket-browser/bucket-browser.component.scss   | 262 +
 .../bucket-browser/bucket-browser.component.ts | 173 ++
 .../bucket-browser/bucket-data.service.ts  | 108 +
 .../folder-tree/folder-tree.component.html |  32 +++
 .../folder-tree/folder-tree.component.scss |  38 +++
 .../folder-tree/folder-tree.component.ts   | 211 +
 .../detail-dialog/detail-dialog.component.html |  23 +-
 .../detail-dialog/detail-dialog.component.scss |   5 +
 .../detail-dialog/detail-dialog.component.ts   |  24 +-
 .../resources-grid/resources-grid.component.ts |  15 +-
 .../src/app/resources/resources.component.html |   3 +
 .../src/app/resources/resources.component.ts   |   6 +
 .../webapp/src/app/resources/resources.module.ts   |  15 +-
 .../multi-level-select-dropdown.component.ts   |   6 +-
 .../webapp/src/assets/styles/_dialogs.scss |   1 +
 .../InfrastructureTemplateServiceBaseTest.java |  18 +-
 56 files changed, 2187 insertions(+), 194 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 (50d7885 -> 6043482)

2020-04-28 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


from 50d7885  [DLAB-1702]: Fixed time circle on scheduler (#711)
 add 6c28123  gcp bucket browser
 add 235798f  update BucketDTO
 add 94aa13c  code refactoring
 add 5dc1b13  bucket browser aws
 add f45a0d7  [DLAB-1551]: Merge UI in bucket browser (#701)
 add 40d6e90  Merge remote-tracking branch 'origin/bucket-browser-gcp' into 
bucket-browser-gcp
 add 1be8402  Update ssn_nginx.conf
 add 3b3a0fe  [Dlab 1551]: Fixed bug file download (#708)
 add d9074f8  Small fix
 add 2f2f49d  Fix merge bug
 add 59dc52b  Merge remote-tracking branch 'origin/bucket-browser-gcp' into 
bucket-browser-gcp
 add e84ca63  Added permissions for bucket browser
 add dcf66f1  Merge branch 'develop' into bucket-browser-gcp
 add 894465b  Added permission for bucket browser
 add 2153e48  [DLAB-1757]: Updated bucket browser according to roles
 add 416556b  bucket browser azure configs
 new 6043482  Merge branch 'bucket-browser-gcp' into develop

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/templates/ssn.yml  |   5 +
 .../src/ssn/templates/ssn_nginx.conf   |   2 +-
 .../java/com/epam/dlab/dto/bucket/BucketDTO.java}  |  17 +-
 .../epam/dlab/dto/bucket/BucketDownloadDTO.java}   |  16 +-
 services/dlab-webapp-common/pom.xml|   5 +
 .../java/com/epam/dlab/ServiceConfiguration.java   |   9 +
 .../com/epam/dlab/constants/ServiceConsts.java |  19 +-
 .../com/epam/dlab/rest/client/RESTService.java |  62 -
 .../epam/dlab/rest/client/RESTServiceFactory.java  |   5 +-
 services/provisioning-service/pom.xml  |  43 
 .../backendapi/ProvisioningServiceApplication.java |  34 ++-
 .../backendapi/modules/GcpProvisioningModule.java  |   1 +
 .../dlab/backendapi/modules/ProductionModule.java  |  12 +
 .../backendapi/modules/ProvisioningDevModule.java  |  37 ++-
 .../dlab/backendapi/resources/BucketResource.java  |  93 
 .../dlab/backendapi/service/BucketService.java}|  14 +-
 .../service/impl/aws/BucketServiceAwsImpl.java | 125 ++
 .../impl/azure/BucketServiceAzureImpl.java}|  42 ++--
 .../service/impl/gcp/BucketServiceGcpImpl.java | 109 +
 .../backendapi/modules/CloudProviderModule.java|   2 +
 .../epam/dlab/backendapi/modules/DevModule.java|   6 +
 .../dlab/backendapi/modules/ProductionModule.java  |   6 +
 .../dlab/backendapi/resources/BucketResource.java  | 106 +
 ...ImageInfoRecord.java => BucketDownloadDTO.java} |  18 +-
 .../resources/dto/HealthStatusPageDTO.java |  11 +
 .../dlab/backendapi/resources/dto/UserRoleDto.java |   1 +
 .../{UserGroupService.java => BucketService.java}  |  16 +-
 .../backendapi/service/impl/BucketServiceImpl.java | 129 ++
 .../impl/InfrastructureInfoServiceImpl.java|  18 +-
 .../src/main/resources/mongo/aws/mongo_roles.json  |  49 
 .../main/resources/mongo/azure/mongo_roles.json|  49 
 .../src/main/resources/mongo/gcp/mongo_roles.json  |  48 
 .../administration/management/management.model.ts  |   1 +
 .../administration/project/project.component.ts|   1 -
 .../core/interceptors/http.token.interceptor.ts|  10 +-
 .../src/app/core/services/appRouting.service.ts|   1 +
 .../services/applicationServiceFacade.service.ts   |  40 +++-
 .../app/core/services/bucket-browser.service.ts|  61 +
 .../webapp/src/app/core/util/fileUtils.ts  |  10 +
 .../bucket-browser/bucket-browser.component.html   | 131 +++
 .../bucket-browser/bucket-browser.component.scss   | 262 +
 .../bucket-browser/bucket-browser.component.ts | 173 ++
 .../bucket-browser/bucket-data.service.ts  | 108 +
 .../folder-tree/folder-tree.component.html |  32 +++
 .../folder-tree/folder-tree.component.scss |  38 +++
 .../folder-tree/folder-tree.component.ts   | 211 +
 .../detail-dialog/detail-dialog.component.html |  23 +-
 .../detail-dialog/detail-dialog.component.scss |   5 +
 .../detail-dialog/detail-dialog.component.ts   |  24 +-
 .../resources-grid/resources-grid.component.ts |  15 +-
 .../src/app/resources/resources.component.html |   3 +
 .../src/app/resources/resources.component.ts   |   6 +
 .../webapp/src/app/resources/resources.module.ts   |  15 +-
 .../multi-level-select-dropdown.component.ts   |   6 +-
 .../webapp/src/assets/styles/_dialogs.scss |   1 +
 .../InfrastructureTemplateServiceBaseTest.java |  18 +-
 56 files change

[incubator-dlab] branch develop updated: [DLAB-1698]: Updated user guide according to release 2.3 (#692)

2020-04-24 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new 915a149  [DLAB-1698]: Updated user guide according to release 2.3 
(#692)
915a149 is described below

commit 915a149412017087ffcec1b1a19b0f3c483e62b9
Author: viravit 
AuthorDate: Fri Apr 24 14:28:27 2020 +0300

[DLAB-1698]: Updated user guide according to release 2.3 (#692)

[DLAB-1698]: Updated user guide according to release 2.3
---
 USER_GUIDE.md  | 476 ++---
 doc/billing_filter.png | Bin 18705 -> 41447 bytes
 doc/billing_page.png   | Bin 18577 -> 264721 bytes
 doc/bin_icon.png   | Bin 0 -> 4379 bytes
 doc/computational_scheduler.png| Bin 33900 -> 35577 bytes
 doc/computational_scheduler_create.png | Bin 3893 -> 3277 bytes
 doc/connect_endpoint.png   | Bin 0 -> 202030 bytes
 doc/create_notebook_from_ami.png   | Bin 27066 -> 35594 bytes
 doc/dataproc_create.png| Bin 0 -> 129369 bytes
 doc/delete_btn.png | Bin 0 -> 4155 bytes
 doc/delete_group.png   | Bin 34704 -> 45914 bytes
 doc/emr_creating.png   | Bin 37126 -> 43196 bytes
 doc/emr_terminate_confirm.png  | Bin 1760535 -> 14257 bytes
 doc/endpoint_list.png  | Bin 0 -> 181738 bytes
 doc/environment_management.png | Bin 66404 -> 90301 bytes
 doc/git_creds_window.png   | Bin 7190623 -> 25654 bytes
 doc/git_creds_window2.png  | Bin 5946035 -> 26511 bytes
 doc/main_page.png  | Bin 4746590 -> 35533 bytes
 doc/main_page2.png | Bin 8157879 -> 49611 bytes
 doc/main_page3.png | Bin 8157879 -> 48735 bytes
 doc/main_page_filter.png   | Bin 62679 -> 79991 bytes
 doc/manage_env_confirm.png | Bin 10464 -> 14049 bytes
 doc/manage_environment.png | Bin 21334 -> 18263 bytes
 doc/manage_role.png| Bin 108456 -> 28068 bytes
 doc/managemanage_resource_actions.png  | Bin 4997 -> 4976 bytes
 doc/notebook_create.png| Bin 41323 -> 33033 bytes
 doc/notebook_info.png  | Bin 157517 -> 42371 bytes
 doc/notebook_libs_status.png   | Bin 50720 -> 59233 bytes
 doc/notebook_scheduler.png | Bin 36928 -> 39368 bytes
 doc/notebook_terminated.png| Bin 38113 -> 56038 bytes
 doc/notebook_terminating.png   | Bin 39506 -> 56292 bytes
 doc/pen_icon.png   | Bin 0 -> 4171 bytes
 doc/project_menu.png   | Bin 0 -> 86667 bytes
 doc/project_view.png   | Bin 0 -> 234276 bytes
 doc/roles.png  | Bin 0 -> 198223 bytes
 doc/scheduler_by_inactivity.png| Bin 0 -> 22076 bytes
 doc/spark_stop_confirm.png | Bin 10920 -> 12767 bytes
 doc/upload_or_generate_user_key.png| Bin 17078 -> 37302 bytes
 .../resources-grid/resources-grid.component.ts |   1 +
 39 files changed, 234 insertions(+), 243 deletions(-)

diff --git a/USER_GUIDE.md b/USER_GUIDE.md
index d821a93..78876fc 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 project](#setup_edge_node)
 
 [Setting up analytical environment and managing computational 
power](#setup_environmen)
 
@@ -26,35 +26,34 @@ DLab is an essential toolset for analytics. It is a 
self-service Web Console, us
 
 [Deploy Computational 
resource](#computational_deploy)
 
-[Stop Apache Spark cluster](#spark_stop)
+[Stop Standalone Apache Spark cluster](#spark_stop)
 
 [Terminate Computational 
resource](#computational_terminate)
 
+[Scheduler](#scheduler)
+
 [Collaboration space](#collaboration_space)
 
 [Manage Git 
credentials](#git_creds)
 
 [Git UI tool 
(ungit)](#git_ui)
 
-[DLab Health Status Page](#health_page)
+[Administration](#administration)
 
-[Backup](#backup)
+ [Manage roles](#manage_roles)
 
-[Manage 
environment](#manage_environment)
+ [Project management](#project_management)
 
-[

[incubator-dlab] branch v2.3-RC1 updated: changed version

2020-04-24 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/v2.3-RC1 by this push:
 new c244866  changed version
c244866 is described below

commit c2448668898dcca4bdc99f8651d1bd1c0f5831fa
Author: Oleh Fuks 
AuthorDate: Fri Apr 24 15:17:41 2020 +0300

changed version
---
 build.properties   |  2 +-
 .../azure_templates/deeplearning/deeplearning-notebook.json| 10 +-
 .../ec2_templates/deeplearning/deeplearning-notebook.json  | 10 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/build.properties b/build.properties
index 9265e7e..d765398 100644
--- a/build.properties
+++ b/build.properties
@@ -16,4 +16,4 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-dlab.version=2.2
\ No newline at end of file
+dlab.version=2.3
\ No newline at end of file
diff --git 
a/integration-tests/examples/azure_templates/deeplearning/deeplearning-notebook.json
 
b/integration-tests/examples/azure_templates/deeplearning/deeplearning-notebook.json
index bf0159d..478b1aa 100644
--- 
a/integration-tests/examples/azure_templates/deeplearning/deeplearning-notebook.json
+++ 
b/integration-tests/examples/azure_templates/deeplearning/deeplearning-notebook.json
@@ -1,7 +1,7 @@
 {
-  "image" : "docker.dlab-deeplearning",
-  "name" : "set the name",
-  "shape" : "Standard_NC6",
-  "version" : "deeplearning-2.2",
-  "template_name" : "Deep Learning 2.2"
+  "image": "docker.dlab-deeplearning",
+  "name": "set the name",
+  "shape": "Standard_NC6",
+  "version": "deeplearning-2.3",
+  "template_name": "Deep Learning 2.3"
 }
\ No newline at end of file
diff --git 
a/integration-tests/examples/ec2_templates/deeplearning/deeplearning-notebook.json
 
b/integration-tests/examples/ec2_templates/deeplearning/deeplearning-notebook.json
index 846203b..933faf0 100644
--- 
a/integration-tests/examples/ec2_templates/deeplearning/deeplearning-notebook.json
+++ 
b/integration-tests/examples/ec2_templates/deeplearning/deeplearning-notebook.json
@@ -1,7 +1,7 @@
 {
-  "image" : "docker.dlab-deeplearning",
-  "name" : "set the name",
-  "shape" : "p2.xlarge",
-  "version" : "deeplearning-2.2",
-  "template_name" : "Deep Learning 2.2"
+  "image": "docker.dlab-deeplearning",
+  "name": "set the name",
+  "shape": "p2.xlarge",
+  "version": "deeplearning-2.3",
+  "template_name": "Deep Learning 2.3"
 }
\ 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] 02/04: updated copyright

2020-04-24 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit ce38274449eaa148e5eba86fcc992155924ae372
Author: Oleh Fuks 
AuthorDate: Fri Apr 24 16:15:28 2020 +0300

updated copyright
---
 .../aws/computational_resources/main/main.tf   |  21 +++
 .../aws/computational_resources/main/variables.tf  |  21 +++
 .../ssn-helm-charts/main/step-ca-chart/.helmignore |  21 +++
 .../ssn-helm-charts/main/step-ca-chart/Chart.yaml  |  23 ++-
 .../main/step-ca-chart/templates/_helpers.tpl  |  21 +++
 .../main/step-ca-chart/templates/bootstrap.yaml|  47 +++--
 .../main/step-ca-chart/templates/ca.yaml   | 203 -
 .../main/step-ca-chart/templates/configmaps.yaml   | 117 +++-
 .../main/step-ca-chart/templates/ingress.yaml  |  63 ---
 .../main/step-ca-chart/templates/rbac.yaml |  23 ++-
 .../main/step-ca-chart/templates/secrets.yaml  |  21 +++
 .../main/step-ca-chart/templates/service.yaml  |  35 +++-
 .../templates/tests/test-connection.yaml   |  27 ++-
 .../ssn-helm-charts/main/step-ca-chart/values.yaml |  25 ++-
 .../aws/ssn-k8s/main/files/ssn-policy.json.tpl |  20 ++
 .../terraform/bin/deploy/billing_app_aws.yml   |  21 +++
 .../terraform/bin/deploy/billing_azure.yml |  21 +++
 .../terraform/bin/deploy/billing_gcp.yml   |  21 +++
 .../terraform/bin/deploy/endpoint_fab.py   |  33 +++-
 infrastructure-provisioning/terraform/bin/dlab.py  |  24 ++-
 .../terraform/bin/terraform-cli.py |  35 +++-
 .../terraform/gcp/endpoint/provisioning.py |  29 ++-
 .../terraform/gcp/main/main.tf |  21 +++
 .../terraform/gcp/main/variables.tf|  21 +++
 .../terraform/gcp/modules/common/iam.tf|  21 +++
 .../terraform/gcp/modules/common/network.tf|  21 +++
 .../terraform/gcp/modules/common/variables.tf  |  21 +++
 .../terraform/gcp/modules/data_engine/instance.tf  |  21 +++
 .../terraform/gcp/modules/data_engine/variables.tf |  21 +++
 .../terraform/gcp/modules/dataproc/instance.tf |  21 +++
 .../terraform/gcp/modules/dataproc/variables.tf|  21 +++
 .../terraform/gcp/modules/notebook/instance.tf |  21 +++
 .../terraform/gcp/modules/notebook/variables.tf|  21 +++
 .../helm_charts/files/get_configmap_values.sh  |  21 +++
 .../modules/helm_charts/step-ca-chart/.helmignore  |  21 +++
 .../modules/helm_charts/step-ca-chart/Chart.yaml   |  23 ++-
 .../step-ca-chart/templates/_helpers.tpl   |  21 +++
 .../step-ca-chart/templates/bootstrap.yaml |  47 +++--
 .../helm_charts/step-ca-chart/templates/ca.yaml| 203 -
 .../step-ca-chart/templates/configmaps.yaml| 117 +++-
 .../step-ca-chart/templates/ingress.yaml   |  63 ---
 .../helm_charts/step-ca-chart/templates/rbac.yaml  |  23 ++-
 .../step-ca-chart/templates/secrets.yaml   |  21 +++
 .../step-ca-chart/templates/service.yaml   |  35 +++-
 .../templates/tests/test-connection.yaml   |  27 ++-
 .../modules/helm_charts/step-ca-chart/values.yaml  |  25 ++-
 .../dlab/login/resources/css/login.css |  19 ++
 .../keycloak-theme/dlab/login/theme.properties |  33 ++--
 .../epam/dlab/dto/base/project/ProjectResult.java  |  29 ++-
 .../epam/dlab/dto/project/ProjectActionDTO.java|  27 ++-
 .../epam/dlab/dto/project/ProjectCreateDTO.java|  33 +++-
 .../DropwizardBearerTokenFilterImpl.java   |  19 ++
 .../response/handlers/ProjectCallbackHandler.java  |  19 ++
 .../dlab/backendapi/resources/ProjectResource.java |  19 ++
 .../dlab/backendapi/service/ProjectService.java|  27 ++-
 .../service/impl/ProjectServiceImpl.java   |  19 ++
 56 files changed, 1566 insertions(+), 428 deletions(-)

diff --git 
a/infrastructure-provisioning/terraform/aws/computational_resources/main/main.tf
 
b/infrastructure-provisioning/terraform/aws/computational_resources/main/main.tf
index 1fb08e5..c8bea60 100644
--- 
a/infrastructure-provisioning/terraform/aws/computational_resources/main/main.tf
+++ 
b/infrastructure-provisioning/terraform/aws/computational_resources/main/main.tf
@@ -1,3 +1,24 @@
+# *
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is d

[incubator-dlab] 04/04: updated copyright

2020-04-24 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 724250dddcee37c61f78dbae282a6bb455bdccf6
Author: Oleh Fuks 
AuthorDate: Fri Apr 24 16:27:40 2020 +0300

updated copyright
---
 .../aws/ssn-k8s/main/files/ssn-policy.json.tpl | 20 -
 pom.xml|  1 +
 .../billing-aws/src/main/resources/application.yml | 21 ++
 .../src/main/resources/application.yml | 21 ++
 services/billing-gcp/billing.yml   | 21 ++
 .../dlab/billing/gcp/model/BillingHistory.java | 25 +++---
 .../gcp/repository/BillingHistoryRepository.java   | 19 
 .../billing-gcp/src/main/resources/application.yml | 21 ++
 services/self-service/entrypoint.sh| 20 +
 .../src/main/resources/webapp/browserslist | 23 +++-
 10 files changed, 168 insertions(+), 24 deletions(-)

diff --git 
a/infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/ssn-policy.json.tpl
 
b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/ssn-policy.json.tpl
index e75717d..e197744 100644
--- 
a/infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/ssn-policy.json.tpl
+++ 
b/infrastructure-provisioning/terraform/aws/ssn-k8s/main/files/ssn-policy.json.tpl
@@ -1,23 +1,3 @@
-# *
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://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.
-#
-# 
**
 {
   "Version": "2012-10-17",
   "Statement": [
diff --git a/pom.xml b/pom.xml
index b6808a8..46b9616 100644
--- a/pom.xml
+++ b/pom.xml
@@ -240,6 +240,7 @@
 **/*.ipynb
 **/*.iml
 **/*.json
+**/*.json.tpl
 **/*.r
 **/__init__.py
 **/*.conf
diff --git a/services/billing-aws/src/main/resources/application.yml 
b/services/billing-aws/src/main/resources/application.yml
index ece61aa..8bd3a4f 100644
--- a/services/billing-aws/src/main/resources/application.yml
+++ b/services/billing-aws/src/main/resources/application.yml
@@ -1,3 +1,24 @@
+# *
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://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.
+#
+# 
**
+
 spring:
   main:
 allow-bean-definition-overriding: true
diff --git a/services/billing-azure/src/main/resources/application.yml 
b/services/billing-azure/src/main/resources/application.yml
index eba7073..482a78d 100644
--- a/services/billing-azure/src/main/resources/application.yml
+++ b/services/billing-azure/src/main/resources/application.yml
@@ -1,3 +1,24 @@
+# *
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 

[incubator-dlab] branch v2.3.0 created (now 724250d)

2020-04-24 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


  at 724250d  updated copyright

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] 03/04: updated copyright

2020-04-24 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit e1eab32583c06323903a9cda784a439e0d1e4490
Author: Oleh Fuks 
AuthorDate: Fri Apr 24 16:17:32 2020 +0300

updated copyright
---
 .../com/epam/dlab/backendapi/annotation/Project.java  | 19 +++
 .../dlab/backendapi/auth/KeycloakAuthenticator.java   | 19 +++
 .../auth/filters/DropwizardBearerTokenFilterImpl.java | 19 +++
 .../epam/dlab/backendapi/conf/CloudConfiguration.java | 19 +++
 .../dlab/backendapi/conf/KeycloakConfiguration.java   | 19 +++
 .../java/com/epam/dlab/backendapi/dao/ProjectDAO.java | 19 +++
 .../com/epam/dlab/backendapi/dao/ProjectDAOImpl.java  | 19 +++
 .../epam/dlab/backendapi/domain/CreateProjectDTO.java | 19 +++
 .../com/epam/dlab/backendapi/domain/ProjectDTO.java   | 19 +++
 .../dlab/backendapi/domain/ProjectEndpointDTO.java| 19 +++
 .../backendapi/domain/UpdateProjectBudgetDTO.java | 19 +++
 .../epam/dlab/backendapi/domain/UpdateProjectDTO.java | 19 +++
 .../dropwizard/bundles/DlabKeycloakBundle.java| 19 +++
 .../dropwizard/listeners/MongoStartupListener.java| 19 +++
 .../dlab/backendapi/resources/KeycloakResource.java   | 19 +++
 .../dlab/backendapi/resources/ProjectResource.java| 19 +++
 .../resources/callback/ProjectCallback.java   | 19 +++
 .../epam/dlab/backendapi/resources/dto/KeysDTO.java   | 19 +++
 .../resources/dto/ProjectActionFormDTO.java   | 19 +++
 .../epam/dlab/backendapi/service/EndpointService.java | 19 +++
 .../dlab/backendapi/service/GuacamoleService.java | 19 +++
 .../epam/dlab/backendapi/service/KeycloakService.java | 19 +++
 .../dlab/backendapi/service/KeycloakServiceImpl.java  | 19 +++
 .../epam/dlab/backendapi/service/ProjectService.java  | 19 +++
 .../epam/dlab/backendapi/service/SecurityService.java | 19 +++
 .../dlab/backendapi/service/SecurityServiceImpl.java  | 19 +++
 .../com/epam/dlab/backendapi/service/TagService.java  | 19 +++
 .../epam/dlab/backendapi/service/TagServiceImpl.java  | 19 +++
 .../backendapi/service/impl/EndpointServiceImpl.java  | 19 +++
 .../backendapi/service/impl/GuacamoleServiceImpl.java | 19 +++
 .../backendapi/service/impl/ProjectServiceImpl.java   | 19 +++
 .../servlet/guacamole/GuacamoleServlet.java   | 19 +++
 .../com/epam/dlab/backendapi/util/KeycloakUtil.java   | 19 +++
 .../src/app/webterminal/webterminal.component.html|  2 +-
 .../backendapi/resources/KeycloakResourceTest.java| 19 +++
 .../backendapi/resources/ProjectResourceTest.java | 19 +++
 .../backendapi/service/KeycloakServiceImplTest.java   | 19 +++
 37 files changed, 685 insertions(+), 1 deletion(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/Project.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/Project.java
index 5a1e5d4..0ce3414 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/Project.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/Project.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://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.annotation;
 
 import java.lang.annotation.ElementType;
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/auth/KeycloakAuthenticator.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/auth/KeycloakAuthenticator.java
index 5c24010..2c2e0d1 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/auth/KeycloakAuthe

[incubator-dlab] branch v2.3-RC1 updated (c244866 -> 724250d)

2020-04-24 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a change to branch v2.3-RC1
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


from c244866  changed version
 new 09c6e45  deleted integration tests
 new ce38274  updated copyright
 new e1eab32  updated copyright
 new 724250d  updated copyright

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:
 .../aws/computational_resources/main/main.tf   |  21 +
 .../aws/computational_resources/main/variables.tf  |  21 +
 .../ssn-helm-charts/main/step-ca-chart/.helmignore |  21 +
 .../ssn-helm-charts/main/step-ca-chart/Chart.yaml  |  23 +-
 .../main/step-ca-chart/templates/_helpers.tpl  |  21 +
 .../main/step-ca-chart/templates/bootstrap.yaml|  47 +-
 .../main/step-ca-chart/templates/ca.yaml   | 203 +++---
 .../main/step-ca-chart/templates/configmaps.yaml   | 117 ++--
 .../main/step-ca-chart/templates/ingress.yaml  |  63 +-
 .../main/step-ca-chart/templates/rbac.yaml |  23 +-
 .../main/step-ca-chart/templates/secrets.yaml  |  21 +
 .../main/step-ca-chart/templates/service.yaml  |  35 +-
 .../templates/tests/test-connection.yaml   |  27 +-
 .../ssn-helm-charts/main/step-ca-chart/values.yaml |  25 +-
 .../terraform/bin/deploy/billing_app_aws.yml   |  21 +
 .../terraform/bin/deploy/billing_azure.yml |  21 +
 .../terraform/bin/deploy/billing_gcp.yml   |  21 +
 .../terraform/bin/deploy/endpoint_fab.py   |  33 +-
 infrastructure-provisioning/terraform/bin/dlab.py  |  24 +-
 .../terraform/bin/terraform-cli.py |  35 +-
 .../terraform/gcp/endpoint/provisioning.py |  29 +-
 .../terraform/gcp/main/main.tf |  21 +
 .../terraform/gcp/main/variables.tf|  21 +
 .../terraform/gcp/modules/common/iam.tf|  21 +
 .../terraform/gcp/modules/common/network.tf|  21 +
 .../terraform/gcp/modules/common/variables.tf  |  21 +
 .../terraform/gcp/modules/data_engine/instance.tf  |  21 +
 .../terraform/gcp/modules/data_engine/variables.tf |  21 +
 .../terraform/gcp/modules/dataproc/instance.tf |  21 +
 .../terraform/gcp/modules/dataproc/variables.tf|  21 +
 .../terraform/gcp/modules/notebook/instance.tf |  21 +
 .../terraform/gcp/modules/notebook/variables.tf|  21 +
 .../helm_charts/files/get_configmap_values.sh  |  21 +
 .../modules/helm_charts/step-ca-chart/.helmignore  |  21 +
 .../modules/helm_charts/step-ca-chart/Chart.yaml   |  23 +-
 .../step-ca-chart/templates/_helpers.tpl   |  21 +
 .../step-ca-chart/templates/bootstrap.yaml |  47 +-
 .../helm_charts/step-ca-chart/templates/ca.yaml| 203 +++---
 .../step-ca-chart/templates/configmaps.yaml| 117 ++--
 .../step-ca-chart/templates/ingress.yaml   |  63 +-
 .../helm_charts/step-ca-chart/templates/rbac.yaml  |  23 +-
 .../step-ca-chart/templates/secrets.yaml   |  21 +
 .../step-ca-chart/templates/service.yaml   |  35 +-
 .../templates/tests/test-connection.yaml   |  27 +-
 .../modules/helm_charts/step-ca-chart/values.yaml  |  25 +-
 .../dlab/login/resources/css/login.css |  19 +
 .../keycloak-theme/dlab/login/theme.properties |  33 +-
 integration-tests-cucumber/pom.xml | 114 ---
 .../main/java/org/apache/dlab/dto/EndpointDTO.java |  19 -
 .../java/org/apache/dlab/mongo/MongoDBHelper.java  |  14 -
 .../java/org/apache/dlab/util/JacksonMapper.java   |  16 -
 .../java/org/apache/dlab/util/PropertyHelper.java  |  23 -
 .../src/test/java/dlab/Constants.java  |   5 -
 .../src/test/java/dlab/RunCucumberTest.java|  10 -
 .../src/test/java/dlab/endpoint/EndpointSteps.java |  97 ---
 .../src/test/java/dlab/login/LoginSteps.java   |  44 --
 .../src/test/resources/config.properties   |   2 -
 .../src/test/resources/dlab/endpoint.feature   |  57 --
 .../src/test/resources/dlab/login.feature  |  12 -
 integration-tests/README.MD|  80 ---
 .../deeplearning/deeplearning-notebook.json|   7 -
 .../deeplearning/spark_cluster.json|   8 -
 .../azure_templates/jupyter/jupyter-notebook.json  |   7 -
 .../azure_templates/jupyter/spark_cluster.json |   8 -
 .../azure_templates/rstudio/rstudio-notebook.json  |   7 -
 .../azure_templates/rstudio/spark_cluster.json |   8 -
 .../azure_templates/tensor/spark_cluster.json  |   8 -
 .../azure_templates/tensor/tensor-notebook.json|   7 -
 .../azure_templates/zeppelin/spark_cluster.json|   8 -
 .../zeppelin/zeppelin-notebook.json|   7 -
 integration-tests/examples/config.properties   |  89 ---
 integration-tests/examples/copy_file

svn commit: r39105 - in /dev/incubator/dlab/2.3: ./ apache-dlab-2.3.0-incubating.tar.gz apache-dlab-2.3.0-incubating.tar.gz.asc apache-dlab-2.3.0-incubating.tar.gz.sha512

2020-04-24 Thread ofuks
Author: ofuks
Date: Fri Apr 24 14:09:25 2020
New Revision: 39105

Log:
DLab release 2.3

Added:
dev/incubator/dlab/2.3/
dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz   (with props)
dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.asc
dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.sha512

Added: dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz
==
Binary file - no diff available.

Propchange: dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz
--
svn:mime-type = application/octet-stream

Added: dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.asc
==
--- dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.asc (added)
+++ dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.asc Fri Apr 24 
14:09:25 2020
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCAAdFiEErZFJiVV29w/QhFgmOeCfJZBfoakFAl6i8a0ACgkQOeCfJZBf
+oanMVhAAj2+TqFzbkZSWv0KCukevBPYBzJle2vLkbXzeGGj9sAHgTOK1wg81cXaQ
+D9VY25WPTUa43DzhfYmnLu1MfIaMDOPfXeJnhZ71pe+ls4wnAUyh8rfa5YV/jP1N
+38NNe0GlTisGMYhrkPGpWJHm0itpb9CVBhl2gLDsApDVo4zG4eogq5Il6BgXrp6U
+RG6p0J4AIs0cZFgfDVXI9Hk2ItHeJ3186Mj8CM13HMJ0vM09P8jEs4GzfTEaOTcq
+i4nxHTZDQvxcbCJ1eocPd5bDTz3Sq6P+Lbi8pjYgK1xK7OjxuU6351/DZ7JuUoTC
+vRxVZkxsFSyK6Aaw4/RUfTgi13kWqq7zst1EXPyQHdbhJtAiufDFNt7G2e44WMKL
+OlXfOqP3sRKdxsPl6Zsvb9DOIRN/f5aWgmxeIrDZkAJPDU6tf6WbTi7ErEGZbyV0
+QIqosAHZVfwtCNBxLc987wDoTQtUP78ByoWvOi35yUnjAAIk8wtEA1C2Mt++68lO
+KTS3JDaZ7DtirlOzpBBkHLN3+UcYn/s4QrbuN7ZmT0xvb/o3jiWhIYfvX7GFnpmc
+fUBgpU4uIT+sUJwgbplDMHfGiHVMdbMHLoh7SiLnV5CJdr4Tcnvbl4ZnA8jTxcXy
+5OyfcdI2FI/5rBUPE+1CduNlKWhAF9XU9fXO9If4nnuUolFaKlk=
+=i7pX
+-END PGP SIGNATURE-

Added: dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.sha512
==
--- dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.sha512 (added)
+++ dev/incubator/dlab/2.3/apache-dlab-2.3.0-incubating.tar.gz.sha512 Fri Apr 
24 14:09:25 2020
@@ -0,0 +1,3 @@
+/Users/ofuks/work/release/2.3.0/apache-dlab-2.3.0-incubating.tar.gz: 
+769452B3 A3335A52 69748A12 29CA31EB 3DBC2B54 1762C083 3DF73F64 169CE701 
A5510BC4
+ 2B0B46FE AD968096 E552730C 8445F697 22CC2457 1127EB66 14C51F73



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



[incubator-dlab] branch v2.3-RC1 updated: [DLAB-1698]: Updated user guide according to release 2.3 (#692)

2020-04-24 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/v2.3-RC1 by this push:
 new f12f7b6  [DLAB-1698]: Updated user guide according to release 2.3 
(#692)
 new 572d3b2  Merge remote-tracking branch 'origin/v2.3-RC1' into v2.3-RC1
f12f7b6 is described below

commit f12f7b6150b1de32d0e3a57cb66999a2d76cbc28
Author: viravit 
AuthorDate: Fri Apr 24 14:28:27 2020 +0300

[DLAB-1698]: Updated user guide according to release 2.3 (#692)

[DLAB-1698]: Updated user guide according to release 2.3
---
 USER_GUIDE.md  | 476 ++---
 doc/billing_filter.png | Bin 18705 -> 41447 bytes
 doc/billing_page.png   | Bin 18577 -> 264721 bytes
 doc/bin_icon.png   | Bin 0 -> 4379 bytes
 doc/computational_scheduler.png| Bin 33900 -> 35577 bytes
 doc/computational_scheduler_create.png | Bin 3893 -> 3277 bytes
 doc/connect_endpoint.png   | Bin 0 -> 202030 bytes
 doc/create_notebook_from_ami.png   | Bin 27066 -> 35594 bytes
 doc/dataproc_create.png| Bin 0 -> 129369 bytes
 doc/delete_btn.png | Bin 0 -> 4155 bytes
 doc/delete_group.png   | Bin 34704 -> 45914 bytes
 doc/emr_creating.png   | Bin 37126 -> 43196 bytes
 doc/emr_terminate_confirm.png  | Bin 1760535 -> 14257 bytes
 doc/endpoint_list.png  | Bin 0 -> 181738 bytes
 doc/environment_management.png | Bin 66404 -> 90301 bytes
 doc/git_creds_window.png   | Bin 7190623 -> 25654 bytes
 doc/git_creds_window2.png  | Bin 5946035 -> 26511 bytes
 doc/main_page.png  | Bin 4746590 -> 35533 bytes
 doc/main_page2.png | Bin 8157879 -> 49611 bytes
 doc/main_page3.png | Bin 8157879 -> 48735 bytes
 doc/main_page_filter.png   | Bin 62679 -> 79991 bytes
 doc/manage_env_confirm.png | Bin 10464 -> 14049 bytes
 doc/manage_environment.png | Bin 21334 -> 18263 bytes
 doc/manage_role.png| Bin 108456 -> 28068 bytes
 doc/managemanage_resource_actions.png  | Bin 4997 -> 4976 bytes
 doc/notebook_create.png| Bin 41323 -> 33033 bytes
 doc/notebook_info.png  | Bin 157517 -> 42371 bytes
 doc/notebook_libs_status.png   | Bin 50720 -> 59233 bytes
 doc/notebook_scheduler.png | Bin 36928 -> 39368 bytes
 doc/notebook_terminated.png| Bin 38113 -> 56038 bytes
 doc/notebook_terminating.png   | Bin 39506 -> 56292 bytes
 doc/pen_icon.png   | Bin 0 -> 4171 bytes
 doc/project_menu.png   | Bin 0 -> 86667 bytes
 doc/project_view.png   | Bin 0 -> 234276 bytes
 doc/roles.png  | Bin 0 -> 198223 bytes
 doc/scheduler_by_inactivity.png| Bin 0 -> 22076 bytes
 doc/spark_stop_confirm.png | Bin 10920 -> 12767 bytes
 doc/upload_or_generate_user_key.png| Bin 17078 -> 37302 bytes
 .../resources-grid/resources-grid.component.ts |   1 +
 39 files changed, 234 insertions(+), 243 deletions(-)

diff --git a/USER_GUIDE.md b/USER_GUIDE.md
index d821a93..78876fc 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 project](#setup_edge_node)
 
 [Setting up analytical environment and managing computational 
power](#setup_environmen)
 
@@ -26,35 +26,34 @@ DLab is an essential toolset for analytics. It is a 
self-service Web Console, us
 
 [Deploy Computational 
resource](#computational_deploy)
 
-[Stop Apache Spark cluster](#spark_stop)
+[Stop Standalone Apache Spark cluster](#spark_stop)
 
 [Terminate Computational 
resource](#computational_terminate)
 
+[Scheduler](#scheduler)
+
 [Collaboration space](#collaboration_space)
 
 [Manage Git 
credentials](#git_creds)
 
 [Git UI tool 
(ungit)](#git_ui)
 
-[DLab Health Status Page](#health_page)
+[Administration](#administration)
 
-[Backup](#backup)
+ [Manage roles](#manage_roles)
 
-[Manage 
environment

[incubator-dlab] annotated tag 2.2-RC1 updated (4947b77 -> bb05045)

2020-04-24 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a change to annotated tag 2.2-RC1
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


*** WARNING: tag 2.2-RC1 was modified! ***

from 4947b77  (commit)
  to bb05045  (tag)
 tagging 4947b776b92173c9df709e5e73920e861009c91c (commit)
  by Oleh Fuks
  on Wed Nov 20 16:09:23 2019 +0200

- Log -
Release 2.2 RC1
---


No new revisions were added by this update.

Summary of changes:


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



[incubator-dlab] annotated tag 2.3.0 updated (724250d -> d9e82d1)

2020-04-24 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a change to annotated tag 2.3.0
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


*** WARNING: tag 2.3.0 was modified! ***

from 724250d  (commit)
  to d9e82d1  (tag)
 tagging 724250dddcee37c61f78dbae282a6bb455bdccf6 (commit)
  by Oleh Fuks
  on Fri Apr 24 16:32:12 2020 +0300

- Log -
DLab 2.3 release
---


No new revisions were added by this update.

Summary of changes:


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



[incubator-dlab] branch v2.3.0 updated: updated copyright

2020-04-24 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/v2.3.0 by this push:
 new 3b67611  updated copyright
3b67611 is described below

commit 3b6761159d39388a4221ef4001f78e8b8a06de3e
Author: Oleh Fuks 
AuthorDate: Fri Apr 24 19:00:39 2020 +0300

updated copyright
---
 .../scripts/deploy_keycloak/templates/nginx.conf| 21 +
 .../terraform/bin/deploy/__init__.py| 20 
 .../src/app/core/services/progress-bar.service.ts   | 19 +++
 .../webapp/src/app/core/util/http-methods.ts| 20 +++-
 .../edge-action-dialog.component.ts | 19 +++
 5 files changed, 98 insertions(+), 1 deletion(-)

diff --git 
a/infrastructure-provisioning/scripts/deploy_keycloak/templates/nginx.conf 
b/infrastructure-provisioning/scripts/deploy_keycloak/templates/nginx.conf
index d2b3307..32ffa5e 100644
--- a/infrastructure-provisioning/scripts/deploy_keycloak/templates/nginx.conf
+++ b/infrastructure-provisioning/scripts/deploy_keycloak/templates/nginx.conf
@@ -1,3 +1,24 @@
+# *
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://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.
+#
+# 
**
+
 server {
listen external_port;
 
diff --git a/infrastructure-provisioning/terraform/bin/deploy/__init__.py 
b/infrastructure-provisioning/terraform/bin/deploy/__init__.py
index e69de29..b639f64 100644
--- a/infrastructure-provisioning/terraform/bin/deploy/__init__.py
+++ b/infrastructure-provisioning/terraform/bin/deploy/__init__.py
@@ -0,0 +1,20 @@
+# *
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://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.
+#
+# 
**
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/services/progress-bar.service.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/services/progress-bar.service.ts
index c8dcd72..7e0dabb 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/services/progress-bar.service.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/services/progress-bar.service.ts
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://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.
+ */
+
 import { Injectable } from '@angular/core';
 import { Subject } from "rxjs";
 

[incubator-dlab] branch bucket-browser-gcp updated: code refactoring

2020-04-23 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/bucket-browser-gcp by this 
push:
 new 94aa13c  code refactoring
94aa13c is described below

commit 94aa13c7f9013896fdeeb0c8ba4e6c0cd40e19ad
Author: Oleh Fuks 
AuthorDate: Thu Apr 23 15:08:58 2020 +0300

code refactoring
---
 .../src/main/java/com/epam/dlab/backendapi/service/BucketService.java   | 2 ++
 .../com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
index 772fd0d..f3ed208 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
@@ -25,6 +25,8 @@ import java.io.InputStream;
 import java.util.List;
 
 public interface BucketService {
+String DATE_FORMAT = "dd-M- hh:mm:ss";
+
 List getObjects(String bucket);
 
 void uploadObject(String bucket, String object, InputStream stream);
diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
index bc9c261..1c17142 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
@@ -98,7 +98,7 @@ public class BucketServiceGcpImpl implements BucketService {
 private BucketDTO toBucketDTO(BlobInfo blobInfo) {
 final String size = 
FileUtils.byteCountToDisplaySize(blobInfo.getSize());
 Date date = new Date(blobInfo.getUpdateTime());
-SimpleDateFormat formatter = new SimpleDateFormat("dd-M- 
hh:mm:ss");
+SimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT);
 return BucketDTO.builder()
 .bucket(blobInfo.getBucket())
 .object(blobInfo.getName())


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



[incubator-dlab] branch bucket-browser-gcp created (now 6c28123)

2020-04-23 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a change to branch bucket-browser-gcp
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


  at 6c28123  gcp bucket browser

This branch includes the following new commits:

 new 6c28123  gcp bucket browser

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 branch 'DLAB-1571' into develop

2020-04-22 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 838bcd2da213ccf73ff95ac381539b50bd44b765
Merge: 4d86331 b34898c
Author: Oleh Fuks 
AuthorDate: Wed Apr 22 12:36:55 2020 +0300

Merge branch 'DLAB-1571' into develop

 .../src/general/lib/os/debian/ssn_lib.py   |  29 +-
 .../src/general/scripts/aws/ssn_configure.py   |  10 +-
 .../src/general/scripts/azure/ssn_configure.py |  30 +-
 .../src/general/scripts/gcp/project_prepare.py |   6 +-
 .../src/general/scripts/gcp/ssn_configure.py   |  11 +-
 .../src/ssn/scripts/configure_billing.py   | 125 --
 .../src/ssn/scripts/configure_ui.py|   8 +-
 .../src/ssn/templates/ssn.yml  |   5 +
 .../terraform/aws/endpoint/main/network.tf |   7 +
 .../terraform/aws/endpoint/main/variables.tf   |  22 +-
 .../terraform/azure/endpoint/main/sg.tf|  14 +
 .../terraform/azure/endpoint/main/variables.tf |  20 +-
 .../terraform/bin/deploy/billing_app_aws.yml   |  34 ++
 .../terraform/bin/deploy/billing_aws.yml   |  35 +-
 .../terraform/bin/deploy/billing_azure.yml |  59 +++
 .../terraform/bin/deploy/billing_gcp.yml   |  38 ++
 .../terraform/bin/deploy/endpoint_fab.py   | 339 +++-
 .../bin/deploy/mongo_files/configure_mongo.py  |  95 +
 .../bin/deploy/mongo_files}/gcp/mongo_roles.json   |  52 ---
 .../deploy/mongo_files/mongod.service_template}|  56 +--
 .../terraform/bin/deploy/provisioning.yml  |   7 +-
 .../terraform/bin/deploy/renew_certificates.sh |   2 +-
 .../terraform/bin/deploy/supervisor_svc.conf   |  10 +
 infrastructure-provisioning/terraform/bin/dlab.py  |  22 +
 .../terraform/gcp/endpoint/main/network.tf |   2 +-
 .../terraform/gcp/endpoint/main/variables.tf   |   8 +
 .../terraform/gcp/endpoint/provisioning.yml|   2 +-
 pom.xml|   2 +-
 services/billing-aws/billing.yml   |  37 +-
 services/billing-aws/pom.xml   | 128 +++---
 .../java/com/epam/dlab/BillingAwsApplication.java} |  13 +-
 .../main/java/com/epam/dlab/BillingScheduler.java  | 267 -
 .../main/java/com/epam/dlab/BillingService.java}   |  10 +-
 .../java/com/epam/dlab/BillingServiceImpl.java | 128 ++
 .../src/main/java/com/epam/dlab/BillingTool.java   |  20 +-
 .../src/main/java/com/epam/dlab/Help.java  |  19 +-
 .../java/com/epam/dlab/conf/SecurityConfig.java|  66 +++
 .../configuration/BillingToolConfiguration.java|  30 --
 .../dlab/configuration/SchedulerConfiguration.java | 213 --
 .../epam/dlab/controller/BillingController.java}   |  31 +-
 .../main/java/com/epam/dlab/core/AdapterBase.java  |   4 +-
 .../java/com/epam/dlab/core/parser/ParserBase.java |  22 +-
 .../com/epam/dlab/core/parser/ParserByLine.java|  11 +-
 .../java/com/epam/dlab/module/AdapterConsole.java  |   4 +-
 .../java/com/epam/dlab/module/AdapterFile.java |  23 +-
 .../com/epam/dlab/module/aws/AdapterS3File.java|   3 +-
 .../java/com/epam/dlab/mongo/AdapterMongoDb.java   |  63 +--
 .../com/epam/dlab/mongo/DlabResourceTypeDAO.java   | 297 +-
 .../java/com/epam/dlab/mongo/ResourceItem.java | 152 ---
 .../java/com/epam/dlab/mongo/ResourceItemList.java | 136 ---
 .../billing-aws/src/main/resources/application.yml |  34 ++
 .../com/epam/dlab/mongo/ResourceItemListTest.java  |  54 ---
 services/billing-azure/billing.yml | 111 +++---
 services/billing-azure/pom.xml | 109 ++---
 .../azure/AzureBillableResourcesService.java   | 315 ---
 .../billing/azure/AzureBillingDetailsService.java  | 194 -
 .../azure/AzureInvoiceCalculationService.java  |  60 +--
 .../billing/azure/BillingAzureApplication.java}|   8 +-
 .../dlab/billing/azure/BillingSchedulerAzure.java  | 314 ---
 .../billing/azure/CalculateBillingService.java}|   9 +-
 .../billing/azure/CalculateBillingServiceImpl.java | 245 
 .../azure/config/BillingConfigurationAzure.java|   6 +-
 .../dlab/billing/azure/config/SecurityConfig.java  |  66 +++
 .../azure/controller/BillingController.java}   |  31 +-
 .../azure/model/AzureDailyResourceInvoice.java |  34 +-
 .../src/main/resources/application.yml |  59 +++
 services/billing-gcp/billing.yml   |  34 +-
 services/billing-gcp/pom.xml   |  30 ++
 .../dlab/billing/gcp/BillingGcpApplication.java|   2 -
 .../gcp/conf/BillingApplicationConfiguration.java  |   2 -
 .../epam/dlab/billing/gcp/conf/SecurityConfig.java |  66 +++
 .../BillingController.java}|  32 +-
 .../com/epam/dlab/billing/gcp/dao/BillingDAO.java  |   5 +-
 .../billing/gcp/dao/impl/BigQueryBillingDAO.java   |  44

[incubator-dlab] branch v2.3-RC1 created (now 838bcd2)

2020-04-22 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a change to branch v2.3-RC1
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


  at 838bcd2  Merge branch 'DLAB-1571' into develop

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 (4d86331 -> 838bcd2)

2020-04-22 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


from 4d86331  Revert merge
 add 72a2f1c  [DLAB-1571] Convey billing for remote gcp endpoint
 add 1c2288e  Added some changes
 add cf65de2  Added billing filter functionality
 add 1a24f7e  Added some changes
 add b687782  Added shape and status filter
 add 66cb878  Added metadata to billing report
 add a2bd9fa  Refactoring
 add 06dd176  Refactoring
 add 8aa8ec3  Added download report feature
 add 3713da8  Refactoring
 add d383c85  Merge branch 'develop' into DLAB-1571
 add 375d4b5  Added Get API by dlabIds
 add dcab9cb  [DLAB-1566]: Changed billing model for remote endpoints
 add 525c476  Added detailed billing feature
 add bf010b4  Code refactoring
 add becd827  Merge remote-tracking branch 'origin/DLAB-1571' into DLAB-1571
 add 581c5a2  Code refactoring
 add d97da87  Code refactoring
 add 099d952  [DLAB-1565]: Convey billing for remote endpoints
 add aa5a8ca  [DLAB-1565]: Convey billing for remote endpoints - variables 
for GCP added
 add 002a3e0  [DLAB-1565]: Convey billing for remote endpoints - variables 
for GCP  main.tf added
 add 762b99f  [DLAB-1565]: Convey billing for remote endpoints - put 
billing.yml fixed
 add 76561bd  [DLAB-1565]: Convey billing for remote endpoints - 
billing.yml added
 add fee0e82  [DLAB-1565]: Convey billing for remote endpoints - sed 
parameters in billing.yml fixed
 add a457dc5  [DLAB-1565]: Convey billing for remote endpoints - 
billing.yml according to cloud provider fixed
 add e2816f8  [DLAB-1565]: Convey billing for remote endpoints - 
billing.yml according to cloud provider fixed again
 add b1019df  [DLAB-1565]: Convey billing for remote endpoints - 
billing.yml according to cloud provider fixed again
 add c40ec2e  [DLAB-1565]: Convey billing for remote endpoints - [GCP] 
implemented
 add 025d788  [DLAB-1565]: Convey billing for remote endpoints - [GCP] fixed
 add 3018eb8  [DLAB-1565]: Convey billing for remote endpoints - [GCP] fixed
 add fa19a8a  [DLAB-1565]: Convey billing for remote endpoints - [GCP] fixed
 add a5ba7b9  [DLAB-1565]: Convey billing for remote endpoints - [GCP] fixed
 add f888554  Merge pull request #638 from apache/DLAB-1565
 add f0d7635  Changed port to 8088
 add 4b791b9  [DLAB-643] Conveyed billing for remote aws endpoint
 add 101fa77  Refactoring
 add 9b09d6a  Fixed search by dlabId
 add 35d053a  Refactoring
 add f74a6be  Changed billing for remote endpoint on UI
 add 3d9e518  Merge remote-tracking branch 'origin/DLAB-1571' into DLAB-1571
 add 667524f  Conveyed billing for Azure remote endpoint
 add 27bd697  Changed config file
 add 6579e18  [DLAB-1565]: Convey billing for remote endpoints - [GCP] 
billing added to supervisor
 add b7e6253  [DLAB-1565]: Convey billing for remote endpoints - [GCP] 
billing added to supervisor
 add f3a312c  [DLAB-1565]: Convey billing for remote endpoints - [GCP] 
billing.yml and variables fixed
 add 2490ac7  [DLAB-1565]: Convey billing for remote endpoints - [GCP] 
billing.yml and variables fixed
 add 80075f6  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint added
 add 73205b8  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint fixed
 add c0d8b04  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint fixed
 add f34781e  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint fixed
 add b453d50  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint fixed
 add da81d30  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint fixed
 add 4b9669d  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint installation fixed
 add 1954560  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint installation fixed
 add fb3dd9d  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint installation fixed
 add d015791  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint installation fixed
 add d5a00cf  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint installation fixed
 add a3bd962  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint installation fixed
 add eaeb086  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint installation fixed
 add 3603ce6  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint installation fixed, pymongo added
 add c154402  [DLAB-1565]: Convey billing for remote endpoints - Mongo on 
endpoint installation fixed, pymongo added
 add 96b0510  [DLAB-1565]: Convey billing for remote endpoints - python 
libs added
 add 2ae11d2  [DLAB-1565]: Convey

[incubator-dlab] 01/01: gcp bucket browser

2020-04-23 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 6c28123370488f391010405aa105a6d8d8239c8e
Author: Oleh Fuks 
AuthorDate: Mon Apr 13 18:48:54 2020 +0300

gcp bucket browser
---
 .../src/ssn/templates/ssn.yml  |   5 +
 .../java/com/epam/dlab/dto/bucket/BucketDTO.java}  |  22 ++--
 .../epam/dlab/dto/bucket/BucketDownloadDTO.java}   |  21 ++--
 services/dlab-webapp-common/pom.xml|   5 +
 .../java/com/epam/dlab/ServiceConfiguration.java   |   9 ++
 .../com/epam/dlab/constants/ServiceConsts.java |   1 +
 .../com/epam/dlab/rest/client/RESTService.java |  78 ++---
 .../epam/dlab/rest/client/RESTServiceFactory.java  |   5 +-
 services/provisioning-service/pom.xml  |  27 +
 .../backendapi/ProvisioningServiceApplication.java |  34 --
 .../backendapi/modules/GcpProvisioningModule.java  |   1 +
 .../dlab/backendapi/modules/ProductionModule.java  |  26 +++--
 .../backendapi/modules/ProvisioningDevModule.java  |  31 ++---
 .../dlab/backendapi/resources/BucketResource.java  | 101 
 .../dlab/backendapi/service/BucketService.java}|  23 ++--
 .../service/impl/gcp/BucketServiceGcpImpl.java | 109 +
 .../backendapi/modules/CloudProviderModule.java|   2 +
 .../epam/dlab/backendapi/modules/DevModule.java|  89 +++---
 .../dlab/backendapi/modules/ProductionModule.java  |  93 ---
 .../dlab/backendapi/resources/BucketResource.java  | 101 
 .../resources/dto/BucketDownloadDTO.java}  |  23 ++--
 .../dlab/backendapi/service/BucketService.java}|  24 ++--
 .../backendapi/service/impl/BucketServiceImpl.java | 129 +
 .../InfrastructureTemplateServiceBaseTest.java |  28 +++--
 24 files changed, 848 insertions(+), 139 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/templates/ssn.yml 
b/infrastructure-provisioning/src/ssn/templates/ssn.yml
index fffa7d2..949ddf9 100644
--- a/infrastructure-provisioning/src/ssn/templates/ssn.yml
+++ b/infrastructure-provisioning/src/ssn/templates/ssn.yml
@@ -62,5 +62,10 @@ provisioningService:
 timeout: 3s
 connectionTimeout: 3s
 
+bucketService:
+  jerseyClient:
+timeout: 5m
+connectionTimeout: 3s
+
 # Log out user on inactivity
 inactiveUserTimeoutMillSec: 720
diff --git 
a/services/dlab-webapp-common/src/main/java/com/epam/dlab/constants/ServiceConsts.java
 b/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDTO.java
similarity index 61%
copy from 
services/dlab-webapp-common/src/main/java/com/epam/dlab/constants/ServiceConsts.java
copy to 
services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDTO.java
index d376665..5f260b7 100644
--- 
a/services/dlab-webapp-common/src/main/java/com/epam/dlab/constants/ServiceConsts.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDTO.java
@@ -17,16 +17,18 @@
  * under the License.
  */
 
-package com.epam.dlab.constants;
+package com.epam.dlab.dto.bucket;
 
-public final class ServiceConsts {
-   public static final String MONGO_NAME = "mongo";
-   public static final String PROVISIONING_SERVICE_NAME = 
"provisioningService";
-   public static final String MAVEN_SEARCH_API = "mavenSearchService";
-   public static final String SECURITY_SERVICE_NAME = "securityService";
-   public static final String SELF_SERVICE_NAME = "selfService";
-   public static final String PROVISIONING_USER_AGENT = 
"provisioning-service";
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Builder;
+import lombok.Data;
 
-   private ServiceConsts() {
-   }
+@Data
+@Builder
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class BucketDTO {
+private final String bucket;
+private final String object;
+private final String size;
+private final String creationDate;
 }
diff --git 
a/services/dlab-webapp-common/src/main/java/com/epam/dlab/constants/ServiceConsts.java
 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDownloadDTO.java
similarity index 61%
copy from 
services/dlab-webapp-common/src/main/java/com/epam/dlab/constants/ServiceConsts.java
copy to 
services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDownloadDTO.java
index d376665..b1201e6 100644
--- 
a/services/dlab-webapp-common/src/main/java/com/epam/dlab/constants/ServiceConsts.java
+++ 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDownloadDTO.java
@@ -17,16 +17,17 @@
  * under the License.
  */
 
-package com.epam.dlab.constants;
+package com.epam.dlab.dto.bucket;
 
-public final class ServiceConsts {
-   public static final String MONGO_NAME = "mongo";
-   public static final String PROVISIONING_SER

[incubator-dlab] branch bucket-browser-gcp updated: update BucketDTO

2020-04-23 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/bucket-browser-gcp by this 
push:
 new 235798f  update BucketDTO
235798f is described below

commit 235798f21aecf4598da20cbf3e9eda6c1d74e138
Author: Oleh Fuks 
AuthorDate: Thu Apr 23 11:52:34 2020 +0300

update BucketDTO
---
 .../dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDTO.java  | 2 +-
 .../epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDTO.java 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDTO.java
index 5f260b7..369c866 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDTO.java
@@ -30,5 +30,5 @@ public class BucketDTO {
 private final String bucket;
 private final String object;
 private final String size;
-private final String creationDate;
+private final String lastModifiedDate;
 }
diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
index 6bc0a8d..bc9c261 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
@@ -97,13 +97,13 @@ public class BucketServiceGcpImpl implements BucketService {
 
 private BucketDTO toBucketDTO(BlobInfo blobInfo) {
 final String size = 
FileUtils.byteCountToDisplaySize(blobInfo.getSize());
-Date date = new Date(blobInfo.getCreateTime());
+Date date = new Date(blobInfo.getUpdateTime());
 SimpleDateFormat formatter = new SimpleDateFormat("dd-M- 
hh:mm:ss");
 return BucketDTO.builder()
 .bucket(blobInfo.getBucket())
 .object(blobInfo.getName())
 .size(size)
-.creationDate(formatter.format(date))
+.lastModifiedDate(formatter.format(date))
 .build();
 }
 }


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



[incubator-dlab] branch audit created (now e688b73)

2020-05-04 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


  at e688b73  Added audit support for projects

This branch includes the following new commits:

 new e688b73  Added audit support for projects

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: Added audit support for projects

2020-05-04 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit e688b732aa1f87bbff80544ca44b0045a9e951c9
Author: Oleh Fuks 
AuthorDate: Mon May 4 17:44:34 2020 +0300

Added audit support for projects
---
 services/self-service/self-service.yml |   6 +-
 .../com/epam/dlab/backendapi/annotation/Audit.java |  33 +++
 .../com/epam/dlab/backendapi/annotation/Info.java  |  30 +++
 .../dlab/backendapi/annotation/ResourceName.java   |  30 +++
 .../conf/SelfServiceApplicationConfiguration.java  |   7 ++
 .../com/epam/dlab/backendapi/dao/AuditDAO.java |  26 ++
 .../com/epam/dlab/backendapi/dao/AuditDAOImpl.java |  31 +++
 .../java/com/epam/dlab/backendapi/dao/BaseDAO.java |   2 +
 .../dlab/backendapi/domain/AuditActionEnum.java|  24 +
 .../AuditCreateDTO.java}   |  42 ++---
 .../com/epam/dlab/backendapi/domain/AuditDTO.java  |  32 +++
 .../backendapi/interceptor/AuditInterceptor.java   | 100 +
 .../backendapi/modules/CloudProviderModule.java|  11 ++-
 .../epam/dlab/backendapi/modules/DevModule.java|   6 ++
 .../dlab/backendapi/modules/ProductionModule.java  |   6 ++
 .../dlab/backendapi/resources/ProjectResource.java |   8 +-
 .../resources/dto/HealthStatusPageDTO.java |   2 +
 .../epam/dlab/backendapi/service/AuditService.java |  26 ++
 .../dlab/backendapi/service/ProjectService.java|   5 +-
 .../backendapi/service/impl/AuditServiceImpl.java  |  39 
 .../impl/InfrastructureInfoServiceImpl.java|   1 +
 .../service/impl/ProjectServiceImpl.java   |  95 
 22 files changed, 499 insertions(+), 63 deletions(-)

diff --git a/services/self-service/self-service.yml 
b/services/self-service/self-service.yml
index df92c25..a5e2c15 100644
--- a/services/self-service/self-service.yml
+++ b/services/self-service/self-service.yml
@@ -50,8 +50,10 @@ roleDefaultAccess: true
 
 # Set to true to enable the scheduler of billing report.
 billingSchedulerEnabled: false
-# Name of configuration file for billing report.
-<#if DEV_MODE == "true">
+# Set to true to enable audit
+auditEnabled: true
+  # Name of configuration file for billing report.
+  <#if DEV_MODE == "true">
 billingConfFile: ${sys['user.dir']}/../billing/billing.yml
 <#else>
 billingConfFile: ${DLAB_CONF_DIR}/billing.yml
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/Audit.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/Audit.java
new file mode 100644
index 000..d6bd5e9
--- /dev/null
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/Audit.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://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.annotation;
+
+import com.epam.dlab.backendapi.domain.AuditActionEnum;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Audit {
+AuditActionEnum action();
+}
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/Info.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/Info.java
new file mode 100644
index 000..44ca32b
--- /dev/null
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/Info.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ap

[incubator-dlab] branch audit updated: Added audit support for projects

2020-05-04 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/audit by this push:
 new 28ed0cb  Added audit support for projects
28ed0cb is described below

commit 28ed0cbf82651b376f667e034fa54246abcf69fd
Author: Oleh Fuks 
AuthorDate: Mon May 4 17:47:10 2020 +0300

Added audit support for projects
---
 services/self-service/self-service.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/services/self-service/self-service.yml 
b/services/self-service/self-service.yml
index a5e2c15..f4117ff 100644
--- a/services/self-service/self-service.yml
+++ b/services/self-service/self-service.yml
@@ -52,7 +52,7 @@ roleDefaultAccess: true
 billingSchedulerEnabled: false
 # Set to true to enable audit
 auditEnabled: true
-  # Name of configuration file for billing report.
+# Name of configuration file for billing report.
   <#if DEV_MODE == "true">
 billingConfFile: ${sys['user.dir']}/../billing/billing.yml
 <#else>


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



[incubator-dlab] branch develop updated: Updated NOTICE

2020-04-29 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new c0a93ab  Updated NOTICE
c0a93ab is described below

commit c0a93abb03b9695fdd8a0a7abd58e1df0de9e0b6
Author: Oleh Fuks 
AuthorDate: Wed Apr 29 12:31:21 2020 +0300

Updated NOTICE
---
 NOTICE | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/NOTICE b/NOTICE
index 8458c9f..b09e72d 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache DLab (incubating)
-Copyright 2018-2019 The Apache Software Foundation
+Copyright 2018-2020 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
\ 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 develop updated: updated copyright

2020-04-29 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new 7eeb71c  updated copyright
7eeb71c is described below

commit 7eeb71c69934972e6d1311b1e286e3e86f4358d1
Author: Oleh Fuks 
AuthorDate: Fri Apr 24 19:00:39 2020 +0300

updated copyright
---
 .../scripts/deploy_keycloak/templates/nginx.conf| 21 +
 .../terraform/bin/deploy/__init__.py| 20 
 .../src/app/core/services/progress-bar.service.ts   | 19 +++
 .../webapp/src/app/core/util/http-methods.ts| 20 +++-
 .../edge-action-dialog.component.ts | 19 +++
 5 files changed, 98 insertions(+), 1 deletion(-)

diff --git 
a/infrastructure-provisioning/scripts/deploy_keycloak/templates/nginx.conf 
b/infrastructure-provisioning/scripts/deploy_keycloak/templates/nginx.conf
index d2b3307..32ffa5e 100644
--- a/infrastructure-provisioning/scripts/deploy_keycloak/templates/nginx.conf
+++ b/infrastructure-provisioning/scripts/deploy_keycloak/templates/nginx.conf
@@ -1,3 +1,24 @@
+# *
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://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.
+#
+# 
**
+
 server {
listen external_port;
 
diff --git a/infrastructure-provisioning/terraform/bin/deploy/__init__.py 
b/infrastructure-provisioning/terraform/bin/deploy/__init__.py
index e69de29..b639f64 100644
--- a/infrastructure-provisioning/terraform/bin/deploy/__init__.py
+++ b/infrastructure-provisioning/terraform/bin/deploy/__init__.py
@@ -0,0 +1,20 @@
+# *
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://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.
+#
+# 
**
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/services/progress-bar.service.ts
 
b/services/self-service/src/main/resources/webapp/src/app/core/services/progress-bar.service.ts
index c8dcd72..7e0dabb 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/services/progress-bar.service.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/services/progress-bar.service.ts
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://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.
+ */
+
 import { Injectable } from '@angular/core';
 import { Subject } from "rxjs";
 

[incubator-dlab] branch DLAB-1571 updated: fixed billing issues

2020-04-14 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 16fd6d1  fixed billing issues
16fd6d1 is described below

commit 16fd6d130c60a29f49360e5edadbd9f59d9e7d8d
Author: Oleh Fuks 
AuthorDate: Tue Apr 14 17:49:06 2020 +0300

fixed billing issues
---
 .../src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
index 49ad999..b258e93 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
@@ -136,7 +136,7 @@ public class BillingUtils {
 public static Stream 
customImageBillingDataStream(ImageInfoRecord image, String sbn) {
 String imageId = String.format(IMAGE_CUSTOM_FORMAT, sbn, 
image.getProject(), image.getEndpoint(), image.getApplication(), 
image.getName()).toLowerCase();
 return Stream.of(
-
BillingReportLine.builder().resourceName(IMAGE_NAME).project(image.getProject()).dlabId(imageId).resourceType(IMAGE).build()
+
BillingReportLine.builder().resourceName(IMAGE_NAME).project(image.getProject()).dlabId(imageId).user(SHARED_RESOURCE).resourceType(IMAGE).build()
 );
 }
 
@@ -165,7 +165,7 @@ public class BillingUtils {
 List list = new ArrayList<>();
 for (String notebook : AVAILABLE_NOTEBOOKS) {
 
list.add(BillingReportLine.builder().resourceName(IMAGE_NAME).dlabId(String.format(IMAGE_STANDARD_FORMAT2,
 sbn, endpoint, notebook).toLowerCase())
-.project(SHARED_RESOURCE).resourceType(IMAGE).build());
+
.user(SHARED_RESOURCE).project(SHARED_RESOURCE).resourceType(IMAGE).build());
 }
 
 return list.stream();


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



[incubator-dlab] 03/03: fixed billing issues

2020-04-14 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 623a31a7dda51e14daf28b4074ae70f293bd942e
Author: Oleh Fuks 
AuthorDate: Tue Apr 14 17:39:56 2020 +0300

fixed billing issues
---
 .../epam/dlab/backendapi/util/BillingUtils.java| 50 ++
 1 file changed, 33 insertions(+), 17 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
index 5ac725c..49ad999 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java
@@ -61,6 +61,7 @@ public class BillingUtils {
 private static final String VOLUME_SECONDARY_FORMAT = 
"%s-volume-secondary";
 private static final String VOLUME_SECONDARY_COMPUTATIONAL_FORMAT = 
"%s-%s-volume-secondary";
 private static final String IMAGE_STANDARD_FORMAT1 = 
"%s-%s-%s-%s-notebook-image";
+private static final String IMAGE_STANDARD_FORMAT2 = 
"%s-%s-%s-notebook-image";
 private static final String IMAGE_CUSTOM_FORMAT = "%s-%s-%s-%s-%s";
 
 private static final String SHARED_RESOURCE = "Shared resource";
@@ -94,29 +95,34 @@ public class BillingUtils {
 public static Stream 
sharedEndpointBillingDataStream(String endpoint, String sbn) {
 final String projectEndpointBucketId = 
String.format(ENDPOINT_SHARED_BUCKET_FORMAT, sbn, endpoint).toLowerCase();
 final String endpointId = String.format(ENDPOINT_FORMAT, sbn, 
endpoint).toLowerCase();
-return Stream.of(
+return Stream.concat(Stream.of(
 BillingReportLine.builder().resourceName("Endpoint shared 
bucket").user(SHARED_RESOURCE).project(SHARED_RESOURCE).dlabId(projectEndpointBucketId).resourceType(BUCKET).build(),
 
BillingReportLine.builder().resourceName("Endpoint").user(SHARED_RESOURCE).project(SHARED_RESOURCE).dlabId(endpointId).resourceType(ENDPOINT).build()
-);
+),
+standardImageBillingDataStream(sbn, endpoint));
 }
 
 public static Stream 
exploratoryBillingDataStream(UserInstanceDTO userInstance, Integer 
maxSparkInstanceCount) {
 final Stream computationalStream = 
userInstance.getResources()
 .stream()
 .filter(cr -> cr.getComputationalId() != null)
-.flatMap(cr -> Stream.concat(Stream.of(
-
withUserProjectEndpoint(userInstance).resourceName(cr.getComputationalName()).dlabId(cr.getComputationalId()).resourceType(COMPUTATIONAL).shape(getComputationalShape(cr))
-
.exploratoryName(userInstance.getExploratoryName()).build(),
-
withUserProjectEndpoint(userInstance).resourceName(cr.getComputationalName()).dlabId(String.format(VOLUME_PRIMARY_FORMAT,
 cr.getComputationalId())).resourceType(VOLUME).build(),
-
withUserProjectEndpoint(userInstance).resourceName(cr.getComputationalName()).dlabId(String.format(VOLUME_PRIMARY_COMPUTATIONAL_FORMAT,
 cr.getComputationalId(), "m"))
-.resourceType(VOLUME).build(),
-
withUserProjectEndpoint(userInstance).resourceName(cr.getComputationalName()).dlabId(String.format(VOLUME_SECONDARY_COMPUTATIONAL_FORMAT,
 cr.getComputationalId(), "m"))
-.resourceType(VOLUME).build()
-),
-getSlaveVolumes(userInstance, cr, 
maxSparkInstanceCount)
-));
+.flatMap(cr -> {
+final String computationalId = 
cr.getComputationalId().toLowerCase();
+return Stream.concat(Stream.of(
+
withUserProjectEndpoint(userInstance).resourceName(cr.getComputationalName()).dlabId(computationalId).resourceType(COMPUTATIONAL).shape(getComputationalShape(cr))
+
.exploratoryName(userInstance.getExploratoryName()).build(),
+
withUserProjectEndpoint(userInstance).resourceName(cr.getComputationalName()).dlabId(String.format(VOLUME_PRIMARY_FORMAT,
 computationalId)).resourceType(VOLUME).build(),
+
withUserProjectEndpoint(userInstance).resourceName(cr.getComputationalName()).dlabId(String.format(VOLUME_SECONDARY_FORMAT,
 computationalId)).resourceType(VOLUME).build(),
+
withUserProjectEndpoint(userInstance).resourceName(cr.getComputationalName()).dlabId(String.format(VOLUME_PRIMARY_COMPUTATIONAL_FORMAT,
 computationalId, "m"))
+

[incubator-dlab] 01/03: fixed billing issues

2020-04-14 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit fc9e515e7cf67ec0a9a1a4ec702cf76a3425f81a
Author: Oleh Fuks 
AuthorDate: Tue Apr 14 15:02:17 2020 +0300

fixed billing issues
---
 .../java/com/epam/dlab/BillingServiceImpl.java |  2 +-
 .../billing/azure/CalculateBillingServiceImpl.java |  2 +-
 .../billing/gcp/dao/impl/BigQueryBillingDAO.java   |  2 +-
 .../service/impl/BillingServiceImpl.java   | 22 ++
 .../epam/dlab/backendapi/util/BillingUtils.java| 14 +++---
 5 files changed, 20 insertions(+), 22 deletions(-)

diff --git 
a/services/billing-aws/src/main/java/com/epam/dlab/BillingServiceImpl.java 
b/services/billing-aws/src/main/java/com/epam/dlab/BillingServiceImpl.java
index d474790..8ac6c48 100644
--- a/services/billing-aws/src/main/java/com/epam/dlab/BillingServiceImpl.java
+++ b/services/billing-aws/src/main/java/com/epam/dlab/BillingServiceImpl.java
@@ -76,7 +76,7 @@ public class BillingServiceImpl implements BillingService {
 
private BillingData toBillingData(Document billingData) {
return BillingData.builder()
-   .tag(billingData.getString(FIELD_DLAB_ID))
+   
.tag(billingData.getString(FIELD_DLAB_ID).toLowerCase())

.usageDateFrom(Optional.ofNullable(billingData.getString(FIELD_USAGE_DATE)).map(LocalDate::parse).orElse(null))

.usageDateTo(Optional.ofNullable(billingData.getString(FIELD_USAGE_DATE)).map(LocalDate::parse).orElse(null))

.usageDate(billingData.getString(FIELD_USAGE_DATE))
diff --git 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/CalculateBillingServiceImpl.java
 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/CalculateBillingServiceImpl.java
index de38aff..3b3d60b 100644
--- 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/CalculateBillingServiceImpl.java
+++ 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/CalculateBillingServiceImpl.java
@@ -233,7 +233,7 @@ public class CalculateBillingServiceImpl implements 
CalculateBillingService {
 
 private BillingData toBillingData(AzureDailyResourceInvoice billingData) {
 return BillingData.builder()
-.tag(billingData.getDlabId())
+.tag(billingData.getDlabId().toLowerCase())
 
.usageDateFrom(Optional.ofNullable(billingData.getUsageStartDate()).map(LocalDate::parse).orElse(null))
 
.usageDateTo(Optional.ofNullable(billingData.getUsageEndDate()).map(LocalDate::parse).orElse(null))
 .usageDate(billingData.getDay())
diff --git 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
index 6949d95..061283d 100644
--- 
a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
+++ 
b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
@@ -120,7 +120,7 @@ public class BigQueryBillingDAO implements BillingDAO {
.product(fields.get("product").getStringValue())

.usageType(fields.get("usageType").getStringValue())

.currency(fields.get("currency").getStringValue())
-   .tag(fields.get("value").getStringValue())
+   
.tag(fields.get("value").getStringValue().toLowerCase())
.usageDate(toLocalDate(fields, 
"usage_date_from").format((DateTimeFormatter.ofPattern(DATE_FORMAT
.build();
}
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
index 3d0ecea..ce88cb9 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
@@ -164,19 +164,16 @@ public class BillingServiceImpl implements BillingService 
{
 
 billingDataMap.forEach((endpointDTO, billingData) -> {
 log.info("Updating billing information for endpoint {}. Billing 
data {}", endpointDTO.getName(), billingData);
-updateBillingData(userInfo, endpointDTO, billingData);
+try {
+updateBillingData(endpointDTO, billingData);
+} catch (Exception e) {
+ 

[incubator-dlab] 02/03: changed billing scheduler

2020-04-14 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 2ef1b7d626843890df325b0f0b93bed0c3bbd830
Author: Oleh Fuks 
AuthorDate: Tue Apr 14 16:28:29 2020 +0300

changed billing scheduler
---
 services/self-service/self-service.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/services/self-service/self-service.yml 
b/services/self-service/self-service.yml
index 4e71316..4d6cad5 100644
--- a/services/self-service/self-service.yml
+++ b/services/self-service/self-service.yml
@@ -152,7 +152,7 @@ schedulers:
 cron: "0 */15 * ? * *"
   billingScheduler:
 enabled: true
-cron: "*/50 * * ? * * *"
+cron: "0 */15 * ? * *"
 
 
 guacamole:


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



[incubator-dlab] branch DLAB-1571 updated (0852d2c -> 623a31a)

2020-04-14 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


from 0852d2c  Merge remote-tracking branch 'origin/DLAB-1571' into DLAB-1571
 new fc9e515  fixed billing issues
 new 2ef1b7d  changed billing scheduler
 new 623a31a  fixed billing issues

The 3 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/BillingServiceImpl.java |  2 +-
 .../billing/azure/CalculateBillingServiceImpl.java |  2 +-
 .../billing/gcp/dao/impl/BigQueryBillingDAO.java   |  2 +-
 services/self-service/self-service.yml |  2 +-
 .../service/impl/BillingServiceImpl.java   | 22 
 .../epam/dlab/backendapi/util/BillingUtils.java| 64 ++
 6 files changed, 54 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: [DLAB-1801] Conveyed the list of buckets to the 'List of report' page

2020-05-13 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new 2f618ac  [DLAB-1801] Conveyed the list of buckets to the 'List of 
report' page
2f618ac is described below

commit 2f618acbcbfbd169b35fa6008e8ae3210f190964
Author: Oleh Fuks 
AuthorDate: Wed May 13 15:08:24 2020 +0300

[DLAB-1801] Conveyed the list of buckets to the 'List of report' page
---
 .../epam/dlab/backendapi/dao/ExploratoryDAO.java   |  4 +-
 .../impl/InfrastructureInfoServiceImpl.java| 60 +++---
 2 files changed, 33 insertions(+), 31 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryDAO.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryDAO.java
index fc44569..8c5a7ce 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryDAO.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryDAO.java
@@ -113,8 +113,8 @@ public class ExploratoryDAO extends BaseDAO {
 * @param user name
 * @return list of user resources
 */
-   public Iterable findExploratory(String user) {
-   return find(USER_INSTANCES, eq(USER, user),
+   public Iterable findExploratories(String user, String 
project) {
+   return find(USER_INSTANCES, and(eq(USER, user), eq(PROJECT, 
project)),

fields(exclude(ExploratoryLibDAO.EXPLORATORY_LIBS, 
ExploratoryLibDAO.COMPUTATIONAL_LIBS, SCHEDULER_DATA,
EXPLORATORY_USER, 
EXPLORATORY_PASS)));
}
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
index 4063ca1..76d785c 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
@@ -25,6 +25,7 @@ import com.epam.dlab.backendapi.dao.BillingDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
 import com.epam.dlab.backendapi.domain.BillingReport;
 import com.epam.dlab.backendapi.domain.EndpointDTO;
+import com.epam.dlab.backendapi.domain.ProjectDTO;
 import com.epam.dlab.backendapi.domain.ProjectEndpointDTO;
 import com.epam.dlab.backendapi.resources.dto.HealthStatusEnum;
 import com.epam.dlab.backendapi.resources.dto.HealthStatusPageDTO;
@@ -85,37 +86,14 @@ public class InfrastructureInfoServiceImpl implements 
InfrastructureInfoService
public List getUserResources(UserInfo user) {
log.debug("Loading list of provisioned resources for user {}", 
user);
try {
-   Iterable documents = 
expDAO.findExploratory(user.getName());
List allEndpoints = 
endpointService.getEndpoints();
-   return StreamSupport.stream(documents.spliterator(), 
false)
-   .collect(Collectors.groupingBy(d -> 
d.getString("project")))
-   .entrySet()
+   return projectService.getUserProjects(user, false)
.stream()
-   .map(e -> {
-   List 
endpoints = projectService.get(e.getKey()).getEndpoints();
-   List 
endpointResult = allEndpoints.stream()
-   
.filter(endpoint -> endpoints.stream()
-   
.anyMatch(endpoint1 -> endpoint1.getName().equals(endpoint.getName(
-   
.collect(Collectors.toList());
-
-   List billingData 
= e.getValue()
-   .stream()
-   .map(exp ->
-   
billingService.getExploratoryBillingData(exp.getString("project"), 
exp.getString("endpoint"),
-   
exp.getString("exploratory_name"),
-   
Optional.ofNulla

svn commit: r39294 - in /release/incubator/dlab/2.3-incubating: ./ apache-dlab-2.3.0-incubating.tar.gz apache-dlab-2.3.0-incubating.tar.gz.asc apache-dlab-2.3.0-incubating.tar.gz.sha512

2020-05-05 Thread ofuks
Author: ofuks
Date: Tue May  5 18:41:07 2020
New Revision: 39294

Log:
DLab Release 2.3

Added:
release/incubator/dlab/2.3-incubating/
release/incubator/dlab/2.3-incubating/apache-dlab-2.3.0-incubating.tar.gz   
(with props)

release/incubator/dlab/2.3-incubating/apache-dlab-2.3.0-incubating.tar.gz.asc

release/incubator/dlab/2.3-incubating/apache-dlab-2.3.0-incubating.tar.gz.sha512

Added: release/incubator/dlab/2.3-incubating/apache-dlab-2.3.0-incubating.tar.gz
==
Binary file - no diff available.

Propchange: 
release/incubator/dlab/2.3-incubating/apache-dlab-2.3.0-incubating.tar.gz
--
svn:mime-type = application/octet-stream

Added: 
release/incubator/dlab/2.3-incubating/apache-dlab-2.3.0-incubating.tar.gz.asc
==
--- 
release/incubator/dlab/2.3-incubating/apache-dlab-2.3.0-incubating.tar.gz.asc 
(added)
+++ 
release/incubator/dlab/2.3-incubating/apache-dlab-2.3.0-incubating.tar.gz.asc 
Tue May  5 18:41:07 2020
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCAAdFiEErZFJiVV29w/QhFgmOeCfJZBfoakFAl6mlsEACgkQOeCfJZBf
+oalWog//YsvS7C4k4aZ1XMI8NslXRzYguBtMAcXqleKtsUCULeWIjEyz3rqtdkH4
+ImCjnBcb3xZJzMkFCXE2BSTQeP7Y+qqar7bYOjN4+iWgKB09OTOgeOU5VxylkxeR
+qijZxDOA8v82C7x7Eomqqajxhs10n78M/eSERhAXV9r2QMkFOKWNWjxB8Mv8GbVk
+bLm32w079ZLJCzZDpL4rUmCjkk1GO/9Ox8Cbv854Re09MoCpYgkcQXOk38l3mkKf
+aY6G93QTBjRF5+/nax7N3QAzZsyJO0Lkm+thjQqNuzVfGS0l+3+54d4TFq6sRCCC
+cQXPYmxLj10YoAZzbqiQuUwJV+ivPmFQ/bSaCWrr5NXQORoJJbhRpFRJ1x2BwOmZ
+VhrgPIih26LbkcKn2M0Xog0y+faVfqIW+yXvLYpK1WINDf/gnydg8aohHREZoHRq
+qRQdDnMX+L71yDVo9VX02pSr6BnlFFdqtlh9shoDfp8nZty+8HlBHVKo4pKX7AQy
+o4YOkfjjb4Tobo6JwgWs87EI0YLgTePtDXdpY9ZS3OWEbZRLzbrxg3nvh0fr4G/K
+iE3aYWyb/bDnYojKyWsyyuCfE/97qhkuawguXjaCcqwfY9Pni6nOSNX/zGLFldLe
+f79Erd0EfC/YutwxvHDJFuWH7VdxZLZ9955qeFXaheQ9x1uEw1k=
+=VaNS
+-END PGP SIGNATURE-

Added: 
release/incubator/dlab/2.3-incubating/apache-dlab-2.3.0-incubating.tar.gz.sha512
==
--- 
release/incubator/dlab/2.3-incubating/apache-dlab-2.3.0-incubating.tar.gz.sha512
 (added)
+++ 
release/incubator/dlab/2.3-incubating/apache-dlab-2.3.0-incubating.tar.gz.sha512
 Tue May  5 18:41:07 2020
@@ -0,0 +1,3 @@
+/Users/ofuks/work/release/2.3.0/apache-dlab-2.3.0-incubating.tar.gz: 
+F37F0C61 6D40BA47 70DA37B6 A56025CB 7FDD2E88 62D847AE D95D979F BDB3A447 
E9C072EA
+ C8EB2D9D BEB86CC9 7DE4E7FD 31388EA6 7EF881D9 12961D80 48FC3D46



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



[incubator-dlab] 02/02: Fixed issue with actions on file with space

2020-05-05 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 4656633ab9df1fd4c22b11c5470ccc9cc8d9686f
Author: Oleh Fuks 
AuthorDate: Tue May 5 16:55:50 2020 +0300

Fixed issue with actions on file with space
---
 services/provisioning-service/pom.xml | 4 ++--
 .../java/com/epam/dlab/backendapi/service/impl/BucketServiceImpl.java | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/services/provisioning-service/pom.xml 
b/services/provisioning-service/pom.xml
index 2fc22bd..9532454 100644
--- a/services/provisioning-service/pom.xml
+++ b/services/provisioning-service/pom.xml
@@ -34,7 +34,7 @@
 
 com.google.cloud
 libraries-bom
-3.3.0
+5.3.0
 pom
 import
 
@@ -90,7 +90,7 @@
 
 com.google.cloud
 google-cloud-storage
-1.106.0
+1.107.0
 
 
 software.amazon.awssdk
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BucketServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BucketServiceImpl.java
index ce72a6f..b7fa732 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BucketServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BucketServiceImpl.java
@@ -116,7 +116,7 @@ public class BucketServiceImpl implements BucketService {
 }
 
 private String encodeObject(String object) throws 
UnsupportedEncodingException {
-return URLEncoder.encode(object, StandardCharsets.UTF_8.toString());
+return URLEncoder.encode(object, 
StandardCharsets.UTF_8.toString()).replace("+", "%20");
 }
 
 private FormDataMultiPart getFormDataMultiPart(String bucket, String 
object, InputStream inputStream) {


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



[incubator-dlab] branch develop updated (cc42dcc -> 4656633)

2020-05-05 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


from cc42dcc  [DLAB-1775]: Fixed bugs, changed file uploading (#720)
 new c2d4280  Fixed format date format
 new 4656633  Fixed issue with actions on file with space

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:
 services/provisioning-service/pom.xml | 4 ++--
 .../src/main/java/com/epam/dlab/backendapi/service/BucketService.java | 2 +-
 .../java/com/epam/dlab/backendapi/service/impl/BucketServiceImpl.java | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)


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



[incubator-dlab] 01/02: Fixed format date format

2020-05-05 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit c2d428005d2b6e425106bbd4e0005dbf4e5a5c92
Author: Oleh Fuks 
AuthorDate: Tue May 5 13:32:55 2020 +0300

Fixed format date format
---
 .../src/main/java/com/epam/dlab/backendapi/service/BucketService.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
index f3ed208..015de22 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
@@ -25,7 +25,7 @@ import java.io.InputStream;
 import java.util.List;
 
 public interface BucketService {
-String DATE_FORMAT = "dd-M- hh:mm:ss";
+String DATE_FORMAT = "dd-MM- hh:mm:ss";
 
 List getObjects(String bucket);
 


-
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-1756] Changed name of bucket permissions

2020-05-07 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new 657750e  [DLAB-1756] Changed name of bucket permissions
657750e is described below

commit 657750e4096f10c55ffb2801c3c259db0c91fbe4
Author: Oleh Fuks 
AuthorDate: Thu May 7 14:03:42 2020 +0300

[DLAB-1756] Changed name of bucket permissions
---
 .../self-service/src/main/resources/mongo/aws/mongo_roles.json| 8 
 .../self-service/src/main/resources/mongo/azure/mongo_roles.json  | 8 
 .../self-service/src/main/resources/mongo/gcp/mongo_roles.json| 8 
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git 
a/services/self-service/src/main/resources/mongo/aws/mongo_roles.json 
b/services/self-service/src/main/resources/mongo/aws/mongo_roles.json
index ee7d97e..f727854 100644
--- a/services/self-service/src/main/resources/mongo/aws/mongo_roles.json
+++ b/services/self-service/src/main/resources/mongo/aws/mongo_roles.json
@@ -325,7 +325,7 @@
   },
   {
 "_id": "bucketBrowserView",
-"description": "Allow to view objects within the bucket",
+"description": "Allow to view object via bucket browser",
 "type": "BUCKET_BROWSER",
 "cloud": "GCP",
 "pages": [
@@ -337,7 +337,7 @@
   },
   {
 "_id": "bucketBrowserUpload",
-"description": "Allow to upload object to the bucket",
+"description": "Allow to upload object via bucket browser",
 "type": "BUCKET_BROWSER",
 "cloud": "GCP",
 "pages": [
@@ -349,7 +349,7 @@
   },
   {
 "_id": "bucketBrowserDownload",
-"description": "Allow to download object from the bucket",
+"description": "Allow to download object via bucket browser",
 "type": "BUCKET_BROWSER",
 "cloud": "GCP",
 "pages": [
@@ -361,7 +361,7 @@
   },
   {
 "_id": "bucketBrowserDelete",
-"description": "Allow to delete object from the bucket",
+"description": "Allow to delete object via bucket browser",
 "type": "BUCKET_BROWSER",
 "cloud": "GCP",
 "pages": [
diff --git 
a/services/self-service/src/main/resources/mongo/azure/mongo_roles.json 
b/services/self-service/src/main/resources/mongo/azure/mongo_roles.json
index 1cd44b1..6b8f829 100644
--- a/services/self-service/src/main/resources/mongo/azure/mongo_roles.json
+++ b/services/self-service/src/main/resources/mongo/azure/mongo_roles.json
@@ -265,7 +265,7 @@
   },
   {
 "_id": "bucketBrowserView",
-"description": "Allow to view objects within the bucket",
+"description": "Allow to view object via bucket browser",
 "type": "BUCKET_BROWSER",
 "cloud": "GCP",
 "pages": [
@@ -277,7 +277,7 @@
   },
   {
 "_id": "bucketBrowserUpload",
-"description": "Allow to upload object to the bucket",
+"description": "Allow to upload object via bucket browser",
 "type": "BUCKET_BROWSER",
 "cloud": "GCP",
 "pages": [
@@ -289,7 +289,7 @@
   },
   {
 "_id": "bucketBrowserDownload",
-"description": "Allow to download object from the bucket",
+"description": "Allow to download object via bucket browser",
 "type": "BUCKET_BROWSER",
 "cloud": "GCP",
 "pages": [
@@ -301,7 +301,7 @@
   },
   {
 "_id": "bucketBrowserDelete",
-"description": "Allow to delete object from the bucket",
+"description": "Allow to delete object via bucket browser",
 "type": "BUCKET_BROWSER",
 "cloud": "GCP",
 "pages": [
diff --git 
a/services/self-service/src/main/resources/mongo/gcp/mongo_roles.json 
b/services/self-service/src/main/resources/mongo/gcp/mongo_roles.json
index 8a36ff4..11e8731 100644
--- a/services/self-service/src/main/resources/mongo/gcp/mongo_roles.json
+++ b/services/self-service/src/main/resources/mongo/gcp/mongo_roles.json
@@ -301,7 +301,7 @@
   },
   {
 "_id": "bucketBrowserView",
-"description": "Allow to view objects within the bucket&

[incubator-dlab] branch develop updated: Added support for multiple delete

2020-05-07 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new e2d32f5  Added support for multiple delete
e2d32f5 is described below

commit e2d32f599cecf10bf504dbe68a70a45792a758f1
Author: Oleh Fuks 
AuthorDate: Thu May 7 12:52:37 2020 +0300

Added support for multiple delete
---
 ...BucketDownloadDTO.java => BucketDeleteDTO.java} |  9 ---
 services/provisioning-service/pom.xml  |  2 +-
 .../dlab/backendapi/resources/BucketResource.java  | 12 --
 .../dlab/backendapi/service/BucketService.java |  2 +-
 .../service/impl/aws/BucketServiceAwsImpl.java | 28 +++---
 .../service/impl/azure/BucketServiceAzureImpl.java |  2 +-
 .../service/impl/gcp/BucketServiceGcpImpl.java | 12 ++
 .../dlab/backendapi/resources/BucketResource.java  | 14 +--
 .../backendapi/resources/dto/BucketDeleteDTO.java} | 11 ++---
 .../dlab/backendapi/service/BucketService.java |  2 +-
 .../backendapi/service/impl/BucketServiceImpl.java | 13 +-
 11 files changed, 62 insertions(+), 45 deletions(-)

diff --git 
a/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDownloadDTO.java
 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDeleteDTO.java
similarity index 82%
copy from 
services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDownloadDTO.java
copy to 
services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDeleteDTO.java
index b1201e6..0bec33d 100644
--- 
a/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDownloadDTO.java
+++ 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDeleteDTO.java
@@ -21,13 +21,12 @@ package com.epam.dlab.dto.bucket;
 
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import lombok.Data;
-import org.hibernate.validator.constraints.NotBlank;
+
+import java.util.List;
 
 @Data
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class BucketDownloadDTO {
-@NotBlank(message = "field cannot be empty")
+public class BucketDeleteDTO {
 private final String bucket;
-@NotBlank(message = "field cannot be empty")
-private final String object;
+private final List objects;
 }
diff --git a/services/provisioning-service/pom.xml 
b/services/provisioning-service/pom.xml
index 9532454..fc01af1 100644
--- a/services/provisioning-service/pom.xml
+++ b/services/provisioning-service/pom.xml
@@ -41,7 +41,7 @@
 
 software.amazon.awssdk
 bom
-2.11.9
+2.13.9
 pom
 import
 
diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
index 4e7d53a..28e51b3 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
@@ -21,13 +21,13 @@ package com.epam.dlab.backendapi.resources;
 
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.service.BucketService;
+import com.epam.dlab.dto.bucket.BucketDeleteDTO;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
 import org.glassfish.jersey.media.multipart.FormDataParam;
 
 import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
@@ -78,14 +78,12 @@ public class BucketResource {
 return Response.ok(bucketService.downloadObject(bucket, 
object)).build();
 }
 
-@DELETE
-@Path("/{bucket}/object/{object}")
+@POST
+@Path("/objects/delete")
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
-public Response uploadObject(@Auth UserInfo userInfo,
- @PathParam("bucket") String bucket,
- @PathParam("object") String object) {
-bucketService.deleteObject(bucket, object);
+public Response uploadObject(@Auth UserInfo userInfo, BucketDeleteDTO 
bucketDeleteDTO) {
+bucketService.deleteObjects(bucketDeleteDTO.getBucket(), 
bucketDeleteDTO.getObjects());
 return Response.ok().build();
 }
 }
diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
index 015de22..fed9aef 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
+

[incubator-dlab] branch DLAB-1789 updated: Make getObject return size in bytes

2020-05-15 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1789 by this push:
 new 8954256  Make getObject return size in bytes
8954256 is described below

commit 89542567c0c2ad8608e90767c8c4325ed4c40d68
Author: Oleh Fuks 
AuthorDate: Fri May 15 14:58:17 2020 +0300

Make getObject return size in bytes
---
 .../epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
index dc068fc..73048c4 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/gcp/BucketServiceGcpImpl.java
@@ -29,7 +29,6 @@ import com.google.cloud.storage.Bucket;
 import com.google.cloud.storage.Storage;
 import com.google.cloud.storage.StorageOptions;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.io.FileUtils;
 
 import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
@@ -102,13 +101,12 @@ public class BucketServiceGcpImpl implements 
BucketService {
 }
 
 private BucketDTO toBucketDTO(BlobInfo blobInfo) {
-final String size = 
FileUtils.byteCountToDisplaySize(blobInfo.getSize());
 Date date = new Date(blobInfo.getUpdateTime());
 SimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT);
 return BucketDTO.builder()
 .bucket(blobInfo.getBucket())
 .object(blobInfo.getName())
-.size(size)
+.size(String.valueOf(blobInfo.getSize()))
 .lastModifiedDate(formatter.format(date))
 .build();
 }


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



[incubator-dlab] branch bucket-browser-azure updated: [DLAB-1552, DLAB-1803] Azure bucket browser

2020-05-15 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/bucket-browser-azure by this 
push:
 new 54d19cd  [DLAB-1552, DLAB-1803] Azure bucket browser
54d19cd is described below

commit 54d19cddb93b538ad7e5c26b0b5640007aaf5696
Author: Oleh Fuks 
AuthorDate: Fri May 15 14:50:28 2020 +0300

[DLAB-1552, DLAB-1803] Azure bucket browser
---
 services/provisioning-service/pom.xml  | 11 +++-
 .../dlab/backendapi/resources/BucketResource.java  |  5 +-
 .../dlab/backendapi/service/BucketService.java |  2 +-
 .../service/impl/aws/BucketServiceAwsImpl.java |  9 ++--
 .../service/impl/azure/BucketServiceAzureImpl.java | 63 --
 .../service/impl/gcp/BucketServiceGcpImpl.java |  2 +-
 .../dlab/backendapi/resources/BucketResource.java  |  5 +-
 .../dlab/backendapi/service/BucketService.java |  2 +-
 .../backendapi/service/impl/BucketServiceImpl.java |  7 +--
 9 files changed, 86 insertions(+), 20 deletions(-)

diff --git a/services/provisioning-service/pom.xml 
b/services/provisioning-service/pom.xml
index fc01af1..043f596 100644
--- a/services/provisioning-service/pom.xml
+++ b/services/provisioning-service/pom.xml
@@ -101,7 +101,16 @@
 httpclient
 4.5.9
 
-
+
+com.azure
+azure-storage-blob
+12.6.0
+
+
+com.fasterxml.jackson.core
+jackson-core
+2.11.0
+
 
 commons-io
 commons-io
diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
index d81bf61..180d324 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/BucketResource.java
@@ -65,8 +65,9 @@ public class BucketResource {
 public Response uploadObject(@Auth UserInfo userInfo,
  @FormDataParam("object") String object,
  @FormDataParam("bucket") String bucket,
- @FormDataParam("file") InputStream 
inputStream) {
-bucketService.uploadObject(bucket, object, inputStream);
+ @FormDataParam("file") InputStream 
inputStream,
+ @FormDataParam("file-size") long fileSize) {
+bucketService.uploadObject(bucket, object, inputStream, fileSize);
 return Response.ok().build();
 }
 
diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
index edaf29c..f69dfe7 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/BucketService.java
@@ -30,7 +30,7 @@ public interface BucketService {
 
 List getObjects(String bucket);
 
-void uploadObject(String bucket, String object, InputStream stream);
+void uploadObject(String bucket, String object, InputStream stream, long 
fileSize);
 
 void downloadObject(String bucket, String object, HttpServletResponse 
resp);
 
diff --git 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/aws/BucketServiceAwsImpl.java
 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/aws/BucketServiceAwsImpl.java
index 83f65e3..d7cef73 100644
--- 
a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/aws/BucketServiceAwsImpl.java
+++ 
b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/service/impl/aws/BucketServiceAwsImpl.java
@@ -24,8 +24,6 @@ import com.epam.dlab.dto.bucket.BucketDTO;
 import com.epam.dlab.exceptions.DlabException;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import software.amazon.awssdk.awscore.exception.AwsServiceException;
 import software.amazon.awssdk.core.sync.RequestBody;
 import software.amazon.awssdk.core.sync.ResponseTransformer;
 import software.amazon.awssdk.services.s3.S3Client;
@@ -68,7 +66,7 @@ public class BucketServiceAwsImpl implements BucketService {
 }
 
 @Override
-public void uploadObject(String bucket, String object, InputStream stream) 
{
+public void uploadObject(String bucket, String object, InputStream stream, 
long fileSize) {
 try {
 S3Client s3 = S3Client.cre

[incubator-dlab] branch bucket-browser-azure created (now cdf4dfc)

2020-05-14 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a change to branch bucket-browser-azure
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


  at cdf4dfc  [DLAB-1783]: Small fix (#741)

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 DLAB-1571 updated: Added changes to Azure remote billing

2020-03-18 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 2aad4d7  Added changes to Azure remote billing
2aad4d7 is described below

commit 2aad4d787c61786ce80df9ba2380cbd65f62a600
Author: Oleh Fuks 
AuthorDate: Wed Mar 18 15:26:27 2020 +0200

Added changes to Azure remote billing
---
 .../billing/azure/dao/impl/BillingDAOImpl.java | 35 +-
 1 file changed, 14 insertions(+), 21 deletions(-)

diff --git 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
index 34901d0..2e3da13 100644
--- 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
+++ 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/dao/impl/BillingDAOImpl.java
@@ -20,10 +20,10 @@
 package com.epam.dlab.billing.azure.dao.impl;
 
 import com.epam.dlab.billing.azure.dao.BillingDAO;
+import com.epam.dlab.billing.azure.model.AzureDailyResourceInvoice;
 import com.epam.dlab.dto.billing.BillingData;
 import com.epam.dlab.exceptions.DlabException;
 import lombok.extern.slf4j.Slf4j;
-import org.bson.Document;
 import org.springframework.data.mongodb.core.MongoTemplate;
 import org.springframework.data.mongodb.core.aggregation.Aggregation;
 import org.springframework.data.mongodb.core.aggregation.GroupOperation;
@@ -37,12 +37,6 @@ import java.util.List;
 import java.util.Optional;
 import java.util.stream.Collectors;
 
-import static com.epam.dlab.model.aws.ReportLine.FIELD_COST;
-import static com.epam.dlab.model.aws.ReportLine.FIELD_CURRENCY_CODE;
-import static com.epam.dlab.model.aws.ReportLine.FIELD_DLAB_ID;
-import static com.epam.dlab.model.aws.ReportLine.FIELD_PRODUCT;
-import static com.epam.dlab.model.aws.ReportLine.FIELD_RESOURCE_TYPE;
-import static com.epam.dlab.model.aws.ReportLine.FIELD_USAGE_DATE;
 import static 
org.springframework.data.mongodb.core.aggregation.Aggregation.group;
 import static 
org.springframework.data.mongodb.core.aggregation.Aggregation.newAggregation;
 
@@ -61,7 +55,7 @@ public class BillingDAOImpl implements BillingDAO {
 GroupOperation groupOperation = getGroupOperation();
 Aggregation aggregation = newAggregation(groupOperation);
 
-return mongoTemplate.aggregate(aggregation, "billing", 
Document.class).getMappedResults()
+return mongoTemplate.aggregate(aggregation, "billing", 
AzureDailyResourceInvoice.class).getMappedResults()
 .stream()
 .map(this::toBillingData)
 .collect(Collectors.toList());
@@ -78,7 +72,7 @@ public class BillingDAOImpl implements BillingDAO {
 MatchOperation matchOperation = 
Aggregation.match(Criteria.where("dlab_id").in(dlabIds));
 Aggregation aggregation = newAggregation(matchOperation, 
groupOperation);
 
-return mongoTemplate.aggregate(aggregation, "billing", 
Document.class).getMappedResults()
+return mongoTemplate.aggregate(aggregation, "billing", 
AzureDailyResourceInvoice.class).getMappedResults()
 .stream()
 .map(this::toBillingData)
 .collect(Collectors.toList());
@@ -89,21 +83,20 @@ public class BillingDAOImpl implements BillingDAO {
 }
 
 private GroupOperation getGroupOperation() {
-return group(FIELD_PRODUCT, FIELD_CURRENCY_CODE, FIELD_RESOURCE_TYPE, 
FIELD_DLAB_ID)
-.min(FIELD_USAGE_DATE).as("from")
-.max(FIELD_USAGE_DATE).as("to")
-.sum(FIELD_COST).as(FIELD_COST);
+return group("meterCategory", "currencyCode", "dlabId")
+.min("usageStartDate").as("usageStartDate")
+.max("usageEndDate").as("usageEndDate")
+.sum("cost").as("cost");
 }
 
-private BillingData toBillingData(Document billingData) {
+private BillingData toBillingData(AzureDailyResourceInvoice billingData) {
 return BillingData.builder()
-.tag(billingData.getString(FIELD_DLAB_ID))
-
.usageDateFrom(Optional.ofNullable(billingData.getString("from")).map(LocalDate::parse).orElse(null))
-
.usageDateTo(Optional.ofNullable(billingData.getString("to")).map(LocalDate::parse).orElse(null))
-.product(billingData.getString(FIELD_PRODUCT))
-.usageType(billingData.getString(FIELD_RESOURCE_TYPE))
-
.cost(BigDecimal.valueOf(billingData.getDouble(F

[incubator-dlab] 01/01: [DLAB-1633] Fixed issue with instance management fails via environment management on remote/local endpoints

2020-03-18 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 8f404935c41020d0dc26bd7e43b7721a30565042
Author: Oleh Fuks 
AuthorDate: Wed Mar 18 16:22:22 2020 +0200

[DLAB-1633] Fixed issue with instance management fails via environment 
management on remote/local endpoints
---
 .../backendapi/resources/EnvironmentResource.java  |  66 ++
 .../backendapi/service/EnvironmentService.java |  11 +
 .../service/impl/EnvironmentServiceImpl.java   |  30 +++
 .../resources/EnvironmentResourceTest.java | 253 +
 .../service/impl/EnvironmentServiceImplTest.java   |  94 
 5 files changed, 454 insertions(+)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
index 879b527..ae60e39 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
@@ -24,10 +24,14 @@ import com.epam.dlab.backendapi.service.EnvironmentService;
 import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
 import lombok.extern.slf4j.Slf4j;
+import org.hibernate.validator.constraints.NotEmpty;
 
 import javax.annotation.security.RolesAllowed;
+import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
+import javax.ws.rs.POST;
 import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
@@ -59,4 +63,66 @@ public class EnvironmentResource {
log.debug("Admin {} requested information about all user's 
environment", userInfo.getName());
return Response.ok(environmentService.getAllEnv()).build();
}
+
+   @POST
+   @Consumes(MediaType.TEXT_PLAIN)
+   @Produces(MediaType.APPLICATION_JSON)
+   @Path("stop/{projectName}")
+   public Response stopEnv(@Auth UserInfo userInfo, @NotEmpty String user, 
@PathParam("projectName") String projectName) {
+   log.info("User {} is stopping {} environment", 
userInfo.getName(), user);
+   environmentService.stopEnvironment(userInfo, user, projectName);
+   return Response.ok().build();
+   }
+
+   @POST
+   @Consumes(MediaType.TEXT_PLAIN)
+   @Produces(MediaType.APPLICATION_JSON)
+   @Path("stop/{projectName}/{exploratoryName}")
+   public Response stopNotebook(@Auth UserInfo userInfo, @NotEmpty String 
user,
+
@PathParam("projectName") String projectName,
+
@PathParam("exploratoryName") String exploratoryName) {
+   log.info("Admin {} is stopping notebook {} of user {}", 
userInfo.getName(), exploratoryName, user);
+   environmentService.stopExploratory(userInfo, user, projectName, 
exploratoryName);
+   return Response.ok().build();
+   }
+
+   @POST
+   @Consumes(MediaType.TEXT_PLAIN)
+   @Produces(MediaType.APPLICATION_JSON)
+   @Path("stop/{projectName}/{exploratoryName}/{computationalName}")
+   public Response stopCluster(@Auth UserInfo userInfo, @NotEmpty String 
user,
+   
@PathParam("projectName") String projectName,
+   
@PathParam("exploratoryName") String exploratoryName,
+   
@PathParam("computationalName") String computationalName) {
+   log.info("Admin {} is stopping computational resource {} 
affiliated with exploratory {} of user {}",
+   userInfo.getName(), computationalName, 
exploratoryName, user);
+   environmentService.stopComputational(userInfo, user, 
projectName, exploratoryName, computationalName);
+   return Response.ok().build();
+   }
+
+   @POST
+   @Consumes(MediaType.TEXT_PLAIN)
+   @Produces(MediaType.APPLICATION_JSON)
+   @Path("terminate/{projectName}/{exploratoryName}")
+   public Response terminateNotebook(@Auth UserInfo userInfo, @NotEmpty 
String user,
+ 
@PathParam("projectName") String projectName,
+ 
@PathParam("exploratoryName") String exploratoryName) {
+   log.info("Admin {} is terminating notebo

[incubator-dlab] branch DLAB-1633 created (now 8f40493)

2020-03-18 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


  at 8f40493  [DLAB-1633] Fixed issue with instance management fails via 
environment management on remote/local endpoints

This branch includes the following new commits:

 new 8f40493  [DLAB-1633] Fixed issue with instance management fails via 
environment management on remote/local endpoints

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] branch develop updated: [DLAB-1635] Fixed issue with notebook stopping by scheduler

2020-03-18 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new b82af34  [DLAB-1635] Fixed issue with notebook stopping by scheduler
b82af34 is described below

commit b82af3451721061c0e7e2648785d6758aa64a617
Author: Oleh Fuks 
AuthorDate: Wed Mar 18 17:24:28 2020 +0200

[DLAB-1635] Fixed issue with notebook stopping by scheduler
---
 .../src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java
index bfb79c9..fc292dd 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SchedulerJobDAO.java
@@ -158,7 +158,7 @@ public class SchedulerJobDAO extends BaseDAO {

eq(CONSIDER_INACTIVITY_FLAG, false)
)
),
-   fields(excludeId(), include(USER, 
EXPLORATORY_NAME, SCHEDULER_DATA
+   fields(excludeId(), include(USER, PROJECT, 
EXPLORATORY_NAME, SCHEDULER_DATA
.map(d -> convertFromDocument(d, 
SchedulerJobData.class))
.collect(toList());
}


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



[incubator-dlab] branch DLAB-1571 updated: Added changes for azure remote billing

2020-03-19 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
 new 0612a4a  Added changes for azure remote billing
0612a4a is described below

commit 0612a4a406266e1fec42a36690b74d4801b01a89
Author: Oleh Fuks 
AuthorDate: Thu Mar 19 19:04:46 2020 +0200

Added changes for azure remote billing
---
 .../com/epam/dlab/billing/azure/AzureInvoiceCalculationService.java | 6 +++---
 .../epam/dlab/billing/azure/config/BillingConfigurationAzure.java   | 1 +
 services/billing-azure/src/main/resources/application.yml   | 3 ++-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureInvoiceCalculationService.java
 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureInvoiceCalculationService.java
index 02ec569..b3eec4f 100644
--- 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureInvoiceCalculationService.java
+++ 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/AzureInvoiceCalculationService.java
@@ -177,7 +177,7 @@ public class AzureInvoiceCalculationService {
 
private boolean isBillableDlabResource(UsageAggregateRecord record) {
String dlabId = 
record.getProperties().getParsedInstanceData().getMicrosoftResources().getTags().get("Name");
-   return dlabId != null && !dlabId.isEmpty();
+   return dlabId != null && !dlabId.isEmpty() && 
dlabId.startsWith(billingConfigurationAzure.getSbn());
}
 
private AzureDailyResourceInvoice calculateInvoice(Map 
rates, UsageAggregateRecord record, String dlabId) {
@@ -191,8 +191,8 @@ public class AzureInvoiceCalculationService {
if (rate != null) {
return 
AzureDailyResourceInvoice.builder()
.dlabId(dlabId)
-   
.usageStartDate(record.getProperties().getUsageStartTime())
-   
.usageEndDate(record.getProperties().getUsageEndTime())
+   
.usageStartDate(getDay(record.getProperties().getUsageStartTime()))
+   
.usageEndDate(getDay(record.getProperties().getUsageEndTime()))

.meterCategory(record.getProperties().getMeterCategory())

.cost(BillingCalculationUtils.round(rate * 
record.getProperties().getQuantity(), 3))

.day(getDay(record.getProperties().getUsageStartTime()))
diff --git 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/BillingConfigurationAzure.java
 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/BillingConfigurationAzure.java
index 2130192..0a28828 100644
--- 
a/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/BillingConfigurationAzure.java
+++ 
b/services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/BillingConfigurationAzure.java
@@ -27,6 +27,7 @@ import org.springframework.context.annotation.Configuration;
 @ConfigurationProperties("dlab")
 @Data
 public class BillingConfigurationAzure {
+private String sbn;
 private long initialDelay;
 private long period;
 
diff --git a/services/billing-azure/src/main/resources/application.yml 
b/services/billing-azure/src/main/resources/application.yml
index 25e680c..ebc4dac 100644
--- a/services/billing-azure/src/main/resources/application.yml
+++ b/services/billing-azure/src/main/resources/application.yml
@@ -34,7 +34,8 @@ keycloak:
   auth-server-url: http://52.11.45.11:8080/auth
 
 dlab:
-  billingEnabled: false
+  sbn: 
+  billingEnabled: true
   clientId: 
   clientSecret: 
   tenantId: 


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



<    1   2   3   4   5   6   7   >