git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] brooklyn-server pull request #967: add an /applications/details endpoint whi...


Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/967#discussion_r194661902
  
    --- Diff: rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/ApplicationResource.java ---
    @@ -182,10 +206,10 @@ private EntityDetail fromEntity(Entity entity) {
         public List<EntityDetail> fetch(String entityIds, String extraSensorsS) {
             List<String> extraSensorNames = JavaStringEscapes.unwrapOptionallyQuotedJavaStringList(extraSensorsS);
             List<AttributeSensor<?>> extraSensors = extraSensorNames.stream().map((s) -> Sensors.newSensor(Object.class, s)).collect(Collectors.toList());
    -
    +        
             List<EntityDetail> entitySummaries = Lists.newArrayList();
             for (Entity application : mgmt().getApplications()) {
    -            entitySummaries.add(addSensors(fromEntity(application), application, extraSensors));
    +            entitySummaries.add(addSensorsByName((EntityDetail)fromEntity(application, false, -1, null, null), application, extraSensors));
    --- End diff --
    
    see below


---