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 1c2288e748be14695c24e7d5bcb9534c590b6ce1 Author: Oleh Fuks <[email protected]> AuthorDate: Fri Feb 28 13:04:17 2020 +0200 Added some changes --- .../epam/dlab/backendapi/service/impl/BillingServiceImplNew.java | 3 ++- .../src/main/java/com/epam/dlab/backendapi/util/BillingUtils.java | 6 ++---- 2 files changed, 4 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 733f169..99bc7c2 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 @@ -84,7 +84,6 @@ public class BillingServiceImplNew implements BillingServiceNew { .stream() .filter(userInstance -> Objects.nonNull(userInstance.getExploratoryId())) .flatMap(BillingUtils::exploratoryBillingDataStream); - final Stream<BillingReportDTO> billableEdges = projectService.getProjects() .stream() .collect(Collectors.toMap(ProjectDTO::getName, ProjectDTO::getEndpoints)) @@ -173,6 +172,7 @@ public class BillingServiceImplNew implements BillingServiceNew { private BillingReportDTO toBillingData(BillingData billingData, BillingReportDTO billingReportDTO) { return BillingReportDTO.builder() + .cost(billingData.getCost()) .currency(billingData.getCurrency()) .product(billingData.getProduct()) .project(billingReportDTO.getProject()) @@ -182,6 +182,7 @@ public class BillingServiceImplNew implements BillingServiceNew { .user(billingReportDTO.getUser()) .dlabId(billingData.getTag()) .resourceType(billingReportDTO.getResourceType()) + .resourceName(billingReportDTO.getResourceName()) .build(); } } 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 6fbb94c..220e50e 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 @@ -54,10 +54,8 @@ public class BillingUtils { return Stream.of( BillingReportDTO.builder().user(SHARED_RESOURCE).resourceName("SSN").dlabId(ssnId).resourceType(BillingResourceType.SSN).build(), BillingReportDTO.builder().user(SHARED_RESOURCE).resourceName("SSN Volume").dlabId(String.format(VOLUME_PRIMARY_FORMAT, ssnId)).resourceType(BillingResourceType.VOLUME).build(), - BillingReportDTO.builder().user(SHARED_RESOURCE).resourceName("SSN bucket").dlabId(bucketName + "-ssn" + - "-bucket").resourceType(BillingResourceType.SSN_BUCKET).build(), - BillingReportDTO.builder().user(SHARED_RESOURCE).resourceName("Collaboration bucket").dlabId(bucketName + - "-shared-bucket").resourceType(BillingResourceType.SHARED_BUCKET).build() + BillingReportDTO.builder().user(SHARED_RESOURCE).resourceName("SSN bucket").dlabId(bucketName + "-ssn" + "-bucket").resourceType(BillingResourceType.SSN_BUCKET).build(), + BillingReportDTO.builder().user(SHARED_RESOURCE).resourceName("Collaboration bucket").dlabId(bucketName + "-shared-bucket").resourceType(BillingResourceType.SHARED_BUCKET).build() ); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
