bhliva commented on a change in pull request #361: [DLAB-1036] Pass 
user/project/endpoint/custom tags to FE on Billing Report page
URL: https://github.com/apache/incubator-dlab/pull/361#discussion_r339576204
 
 

 ##########
 File path: 
services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java
 ##########
 @@ -405,6 +412,15 @@ private boolean isShapeAcceptable(List<String> 
shapeNames, String... shapes) {
                return shapeNames == null || shapeNames.isEmpty() || 
Arrays.stream(shapes).anyMatch(shapeNames::contains);
        }
 
+       private Map<String, String> getTags(String resourceId, String 
dlabResourceType) {
+               if 
(DlabResourceType.EXPLORATORY.name().equals(dlabResourceType)) {
+                       return exploratoryDAO.findTagsById(resourceId);
+               } else if 
(DlabResourceType.COMPUTATIONAL.name().equals(dlabResourceType)) {
+                       return computationalDAO.findTagsById(resourceId);
+               }
+               return Collections.emptyMap();
+       }
+
 
 Review comment:
   Pls add unit test for such method

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to