From 03ebdc865aab48710708d4c2bf484c2df27f5f61 Mon Sep 17 00:00:00 2001 From: lvotypko Date: Wed, 26 Sep 2012 21:56:29 +0200 Subject: [PATCH] Show message that slave has been already launched instead of source not found --- core/src/main/java/hudson/slaves/SlaveComputer.java | 2 +- .../hudson/slaves/SlaveComputer/already-launched.jelly | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 core/src/main/resources/hudson/slaves/SlaveComputer/already-launched.jelly diff --git a/core/src/main/java/hudson/slaves/SlaveComputer.java b/core/src/main/java/hudson/slaves/SlaveComputer.java index 1f870d662e..fa16b13518 100644 --- a/core/src/main/java/hudson/slaves/SlaveComputer.java +++ b/core/src/main/java/hudson/slaves/SlaveComputer.java @@ -447,7 +447,7 @@ public class SlaveComputer extends Computer { public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { if(channel!=null) { - rsp.sendError(HttpServletResponse.SC_NOT_FOUND); + req.getView(this,"already-launched.jelly").forward(req, rsp); return; } diff --git a/core/src/main/resources/hudson/slaves/SlaveComputer/already-launched.jelly b/core/src/main/resources/hudson/slaves/SlaveComputer/already-launched.jelly new file mode 100644 index 0000000000..497c61514f --- /dev/null +++ b/core/src/main/resources/hudson/slaves/SlaveComputer/already-launched.jelly @@ -0,0 +1,9 @@ + + + + + + The slave has been already launched. + + + -- GitLab