Skip to content
Snippets Groups Projects
Commit 9beee701 authored by Sören Henning's avatar Sören Henning
Browse files

added information if values are aggregated

parent 7a7c4120
No related branches found
No related tags found
No related merge requests found
......@@ -73,12 +73,14 @@ public class MeasurementsController {
double measurement = rows.get(0).getDouble("measurement");
double prediction = rows.get(0).getDouble("prediction");
double anomalyscore = rows.get(0).getDouble("anomalyscore");
boolean isAggregated = rows.size() > 1;
ObjectNode node = this.jsonNodeFactory.objectNode();
node.set("time", this.jsonNodeFactory.numberNode(timestamp));
node.set("measurement", this.jsonNodeFactory.numberNode(measurement));
node.set("prediction", this.jsonNodeFactory.numberNode(prediction));
node.set("anomalyscore", this.jsonNodeFactory.numberNode(anomalyscore));
node.set("isAggregated", this.jsonNodeFactory.booleanNode(isAggregated));
return node;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment