diff options
author | Jon Bratseth <bratseth@gmail.com> | 2020-11-26 17:14:38 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2020-11-26 17:14:38 +0100 |
commit | 5e3c7c03c265da2263abe6549af2fea973899e20 (patch) | |
tree | 3d8d7237a916da96e70d7c362a750a376badcded /controller-server/src/main | |
parent | f4d7ef91317c05d7bf4a3f29dca9ef3a38741713 (diff) |
Only output target if it is not current
Diffstat (limited to 'controller-server/src/main')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java index 6ba4007170c..4a6d6e2e72d 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java @@ -699,7 +699,8 @@ public class ApplicationApiHandler extends LoggingRequestHandler { toSlime(cluster.min(), clusterObject.setObject("min")); toSlime(cluster.max(), clusterObject.setObject("max")); toSlime(cluster.current(), clusterObject.setObject("current")); - cluster.target().ifPresent(target -> toSlime(target, clusterObject.setObject("target"))); + if (cluster.target().isPresent() && ! cluster.target().get().equals(cluster.current())) + toSlime(cluster.target().get(), clusterObject.setObject("target")); cluster.suggested().ifPresent(suggested -> toSlime(suggested, clusterObject.setObject("suggested"))); scalingEventsToSlime(cluster.scalingEvents(), clusterObject.setArray("scalingEvents")); clusterObject.setString("autoscalingStatus", cluster.autoscalingStatus()); |