@RequirePOST @Override public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException { checkPermission(CONNECT); if(channel!=null) { try { req.getView(this, "already-launched.jelly").forward(req, rsp); } catch (IOException x) { throw x; } catch (/*Servlet*/Exception x) { throw new IOException(x); } return; } connect(true); // TODO: would be nice to redirect the user to "launching..." wait page, // then spend a few seconds there and poll for the completion periodically. rsp.sendRedirect("log"); }
@RequirePOST public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) { if (channel!=null) { //does nothing in case computer is already disconnected checkPermission(DISCONNECT); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); disconnect(new OfflineCause.UserCause(User.current(), offlineMessage)); } return new HttpRedirect("."); }
public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) throws IOException, ServletException { if (channel != null) { //does nothing in case computer is already disconnected checkPermission(CONFIGURE); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); disconnect(OfflineCause.create(Messages._SlaveComputer_DisconnectedBy( HudsonSecurityManager.getAuthentication().getName(), offlineMessage != null ? " : " + offlineMessage : ""))); } return new HttpRedirect("."); }
@RequirePOST public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) throws IOException, ServletException { if (channel!=null) { //does nothing in case computer is already disconnected checkPermission(DISCONNECT); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); disconnect(new OfflineCause.UserCause(User.current(), offlineMessage)); } return new HttpRedirect("."); }
public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) throws IOException, ServletException { if (channel!=null) { //does nothing in case computer is already disconnected checkPermission(Hudson.ADMINISTER); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); disconnect(OfflineCause.create(Messages._SlaveComputer_DisconnectedBy( Hudson.getAuthentication().getName(), offlineMessage!=null ? " : " + offlineMessage : "") )); } return new HttpRedirect("."); }
public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) throws IOException, ServletException { if (channel!=null) { //does nothing in case computer is already disconnected checkPermission(Hudson.ADMINISTER); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); disconnect(OfflineCause.create(Messages._SlaveComputer_DisconnectedBy( Hudson.getAuthentication().getName(), offlineMessage!=null ? " : " + offlineMessage : "") )); } return new HttpRedirect("."); }
public HttpResponse doDoDisconnect(@QueryParameter String offlineMessage) throws IOException, ServletException { if (channel!=null) { //does nothing in case computer is already disconnected checkPermission(Hudson.ADMINISTER); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); disconnect(OfflineCause.create(Messages._SlaveComputer_DisconnectedBy( Hudson.getAuthentication().getName(), offlineMessage!=null ? " : " + offlineMessage : "") )); } return new HttpRedirect("."); }