diff options
author | Valerij Fredriksen <valerij92@gmail.com> | 2021-07-06 18:48:08 +0200 |
---|---|---|
committer | Valerij Fredriksen <valerijf@verizonmedia.com> | 2021-07-06 21:29:52 +0200 |
commit | 75f405e81ed0b045e379653840eed45a655aafd2 (patch) | |
tree | a3c0dd47dda9f48b1808a5b0f3721f46d879e4cd /controller-server | |
parent | 8c55343f66e0aac23466a1696b6de653143870a1 (diff) |
Allow getting status page for other services in /application/v4
Diffstat (limited to 'controller-server')
2 files changed, 3 insertions, 3 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 21b0fb12a5c..a0e5934fbc5 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 @@ -1678,9 +1678,9 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler { private HttpResponse service(String tenantName, String applicationName, String instanceName, String environment, String region, String serviceName, String restPath, HttpRequest request) { DeploymentId deploymentId = new DeploymentId(ApplicationId.from(tenantName, applicationName, instanceName), requireZone(environment, region)); - if ("container-clustercontroller".equals((serviceName)) && restPath.contains("/status/")) { + if (restPath.contains("/status/")) { String[] parts = restPath.split("/status/"); - String result = controller.serviceRegistry().configServer().getClusterControllerStatus(deploymentId, parts[0], parts[1]); + String result = controller.serviceRegistry().configServer().getServiceStatusPage(deploymentId, serviceName, parts[0], parts[1]); return new HtmlResponse(result); } diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java index 407ab2432a5..92c8cbc4889 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java @@ -532,7 +532,7 @@ public class ConfigServerMock extends AbstractComponent implements ConfigServer } @Override - public String getClusterControllerStatus(DeploymentId deployment, String node, String subPath) { + public String getServiceStatusPage(DeploymentId deployment, String serviceName, String node, String subPath) { return "<h1>OK</h1>"; } |