You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by of...@apache.org on 2020/02/11 13:49:56 UTC

[incubator-dlab] branch epm-v2.2-rc1 updated: [DLAB-1535] Fixed issue with project filter on Billing page for Edges

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

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


The following commit(s) were added to refs/heads/epm-v2.2-rc1 by this push:
     new 212e28f  [DLAB-1535] Fixed issue with project filter on Billing page for Edges
212e28f is described below

commit 212e28f759fc51abb0f854efbaabe172da010ca0
Author: Oleh Fuks <ol...@gmail.com>
AuthorDate: Tue Feb 11 15:49:31 2020 +0200

    [DLAB-1535] Fixed issue with project filter on Billing page for Edges
---
 .../java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java  | 2 +-
 .../src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java
index e2ae138..2a20206 100644
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java
@@ -121,7 +121,7 @@ public class BillingServiceImpl implements BillingService {
 	private Stream<BillingData> projectEdges(String projectName, List<Project.Endpoint> endpoints) {
 		return endpoints
 				.stream()
-				.flatMap(endpoint -> edgeBillingDataStream(projectName.toLowerCase(), sbn, endpoint.getName()));
+				.flatMap(endpoint -> edgeBillingDataStream(projectName, sbn, endpoint.getName()));
 	}
 
 	private BillingData getOrDefault(Map<String, BillingData> billableResources, String tag) {
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java
index e049393..2f26f10 100644
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java
@@ -36,9 +36,9 @@ public class BillingUtils {
 	private static final String SHARED_RESOURCE = "Shared resource";
 
 	public static Stream<BillingData> edgeBillingDataStream(String project, String sbn, String endpoint) {
-		final String userEdgeId = String.format(EDGE_FORMAT, sbn, project, endpoint);
-		final String edgeVolumeId = String.format(EDGE_VOLUME_FORMAT, sbn, project, endpoint);
-		final String edgeBucketId = String.format(EDGE_BUCKET_FORMAT, sbn, project);
+		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 edgeBucketId = String.format(EDGE_BUCKET_FORMAT, sbn, project.toLowerCase());
 		return Stream.of(
 				BillingData.builder().displayName("EDGE node").user(SHARED_RESOURCE).project(project).dlabId(userEdgeId).resourceType(BillingData.ResourceType.EDGE).build(),
 				BillingData.builder().displayName("EDGE volume").user(SHARED_RESOURCE).project(project).dlabId(edgeVolumeId).resourceType(BillingData.ResourceType.VOLUME).build(),


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