From 755bd5344a78861213df8e61a6175f96a31219c9 Mon Sep 17 00:00:00 2001 From: Jon Marius Venstad Date: Mon, 2 Mar 2020 12:55:06 +0100 Subject: Show block windows when somethingn _would_ be blocked --- .../restapi/application/JobControllerApiHandlerHelper.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelper.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelper.java index 0d1dca391bd..4d79b7bb24c 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelper.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelper.java @@ -597,7 +597,10 @@ class JobControllerApiHandlerHelper { .ifPresent(until -> stepObject.setLong("delayedUntil", until.toEpochMilli())); stepStatus.pausedUntil().ifPresent(until -> stepObject.setLong("pausedUntil", until.toEpochMilli())); stepStatus.coolingDownUntil(change).ifPresent(until -> stepObject.setLong("coolingDownUntil", until.toEpochMilli())); - stepStatus.blockedUntil(change).ifPresent(until -> stepObject.setLong("blockedUntil", until.toEpochMilli())); + stepStatus.blockedUntil(Change.of(controller.systemVersion())) // Dummy version — just anything with a platform. + .ifPresent(until -> stepObject.setLong("platformBlockedUntil", until.toEpochMilli())); + application.latestVersion().map(Change::of).flatMap(stepStatus::blockedUntil) // Dummy version — just anything with an application. + .ifPresent(until -> stepObject.setLong("applicationBlockedUntil", until.toEpochMilli())); if (stepStatus.type() == DeploymentStatus.StepType.instance) { Cursor deployingObject = stepObject.setObject("deploying"); -- cgit v1.2.3