From fe9bd017cfc74c2242db4d804f167eb5c7eea0e0 Mon Sep 17 00:00:00 2001 From: hainenber Date: Sat, 21 Dec 2024 19:50:30 +0700 Subject: [PATCH] fix(cloud): redirect to correct Computer page when provisioning Node manually --- .../java/io/hainenber/jenkins/multipass/MultipassCloud.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/hainenber/jenkins/multipass/MultipassCloud.java b/src/main/java/io/hainenber/jenkins/multipass/MultipassCloud.java index 8310114..faa47da 100644 --- a/src/main/java/io/hainenber/jenkins/multipass/MultipassCloud.java +++ b/src/main/java/io/hainenber/jenkins/multipass/MultipassCloud.java @@ -248,7 +248,8 @@ public HttpResponse doProvision(@QueryParameter String template) { SC_INTERNAL_SERVER_ERROR, "multipass-cloud-plugin cannot provision on-demand agent as requested"); } - var manuallyProvisionedAgentName = manuallyProvisionedAgent.get().displayName; + var manuallyProvisionedAgentName = + manuallyProvisionedAgent.get().future.get().getNodeName(); return HttpResponses.redirectViaContextPath(String.format("/computer/%s", manuallyProvisionedAgentName)); } catch (Exception e) { throw HttpResponses.error(SC_INTERNAL_SERVER_ERROR, e);