/** * Depending on whether the user said "yes" or "no", send him to the right place. */ @RequirePOST public HttpResponse doAct(@QueryParameter String no) throws IOException { if(no!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectToDot(); } }
/** * Queues up a restart of Jenkins for when there are no builds running, if we can. * * This first replaces "app" to {@link HudsonIsRestarting} * * @since 1.332 */ @CLIMethod(name="safe-restart") public HttpResponse doSafeRestart(StaplerRequest req) throws IOException, ServletException, RestartNotSupportedException { checkPermission(ADMINISTER); if (req != null && req.getMethod().equals("GET")) return HttpResponses.forwardToView(this,"_safeRestart.jelly"); if (req == null || req.getMethod().equals("POST")) { safeRestart(); } return HttpResponses.redirectToDot(); }
@RequirePOST public HttpResponse doChangeOfflineCause(@QueryParameter String offlineMessage) throws IOException, ServletException { checkPermission(DISCONNECT); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); setTemporarilyOffline(true, new OfflineCause.UserCause(User.current(), offlineMessage)); return HttpResponses.redirectToDot(); }
@RequirePOST public HttpResponse doToggleOffline(@QueryParameter String offlineMessage) throws IOException, ServletException { if(!temporarilyOffline) { checkPermission(DISCONNECT); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); setTemporarilyOffline(!temporarilyOffline, new OfflineCause.UserCause(User.current(), offlineMessage)); } else { checkPermission(CONNECT); setTemporarilyOffline(!temporarilyOffline,null); } return HttpResponses.redirectToDot(); }
public HttpResponse doComplete() throws IOException { System.out.println("JenkowWorkflowRun.doComplete"); markCompleted(Result.SUCCESS); return HttpResponses.redirectToDot(); }
/** * Depending on whether the user said "yes" or "no", send him to the right * place. */ public HttpResponse doAct(@QueryParameter String no) throws IOException { if (no != null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectToDot(); } }
/** * Depending on whether the user said "yes" or "no", send him to the right place. */ public HttpResponse doAct(@QueryParameter String no) throws IOException { if(no!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectToDot(); } }
/** * Depending on whether the user said "yes" or "no", send him to the right place. */ public HttpResponse doAct(@QueryParameter String no) throws IOException { if(no!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectToDot(); } }
/** * Depending on whether the user said "yes" or "no", send him to the right place. */ public HttpResponse doAct(@QueryParameter String no) throws IOException { if(no!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectToDot(); } }
/** * Depending on whether the user said "yes" or "no", send him to the right place. */ @RequirePOST public HttpResponse doAct(@QueryParameter String no) throws IOException { if(no!=null) { disable(true); return HttpResponses.redirectViaContextPath("/manage"); } else { return HttpResponses.redirectToDot(); } }
/** * Delete all disabled modules. */ public HttpResponse doDoDeleteAllDisabledModules() throws IOException, InterruptedException { checkPermission(DELETE); for( MavenModule m : getDisabledModules(true)) m.delete(); return HttpResponses.redirectToDot(); }
public HttpResponse doToggleOffline(@QueryParameter String offlineMessage) throws IOException, ServletException { checkPermission(CONFIGURE); if (!temporarilyOffline) { offlineMessage = Util.fixEmptyAndTrim(offlineMessage); setTemporarilyOffline(!temporarilyOffline, OfflineCause.create(hudson.slaves.Messages._SlaveComputer_DisconnectedBy( HudsonSecurityManager.getAuthentication().getName(), offlineMessage != null ? " : " + offlineMessage : ""))); } else { setTemporarilyOffline(!temporarilyOffline, null); } return HttpResponses.redirectToDot(); }
@RequirePOST public HttpResponse doChangeOfflineCause(@QueryParameter String offlineMessage) throws IOException, ServletException { checkPermission(DISCONNECT); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); setTemporarilyOffline(true, new OfflineCause.UserCause(User.current(), offlineMessage)); return HttpResponses.redirectToDot(); }
public HttpResponse doToggleOffline(@QueryParameter String offlineMessage) throws IOException, ServletException { checkPermission(Hudson.ADMINISTER); if(!temporarilyOffline) { offlineMessage = Util.fixEmptyAndTrim(offlineMessage); setTemporarilyOffline(!temporarilyOffline, OfflineCause.create(hudson.slaves.Messages._SlaveComputer_DisconnectedBy( Hudson.getAuthentication().getName(), offlineMessage!=null ? " : " + offlineMessage : ""))); } else { setTemporarilyOffline(!temporarilyOffline,null); } return HttpResponses.redirectToDot(); }
@RequirePOST public HttpResponse doToggleOffline(@QueryParameter String offlineMessage) throws IOException, ServletException { if(!temporarilyOffline) { checkPermission(DISCONNECT); offlineMessage = Util.fixEmptyAndTrim(offlineMessage); setTemporarilyOffline(!temporarilyOffline, new OfflineCause.UserCause(User.current(), offlineMessage)); } else { checkPermission(CONNECT); setTemporarilyOffline(!temporarilyOffline,null); } return HttpResponses.redirectToDot(); }
public HttpResponse doConfigSubmit( StaplerRequest req ) throws IOException, ServletException, FormException { checkPermission(UPDATE); BulkChange bc = new BulkChange(this); try { JSONObject json = req.getSubmittedForm(); submit(json); bc.commit(); } finally { bc.abort(); } return HttpResponses.redirectToDot(); }
public HttpResponse doConfigSubmit(StaplerRequest req) throws IOException, ServletException, FormException { checkPermission(UPDATE); BulkChange bc = new BulkChange(this); try { JSONObject json = req.getSubmittedForm(); submit(json); bc.commit(); } finally { bc.abort(); } return HttpResponses.redirectToDot(); }
public HttpResponse doConfigSubmit( StaplerRequest req ) throws IOException, ServletException, FormException { checkPermission(UPDATE); BulkChange bc = new BulkChange(this); try { JSONObject json = req.getSubmittedForm(); submit(json); bc.commit(); } finally { bc.abort(); } return HttpResponses.redirectToDot(); }
public HttpResponse doConfigSubmit( StaplerRequest req ) throws IOException, ServletException, FormException { checkPermission(UPDATE); BulkChange bc = new BulkChange(this); try { JSONObject json = req.getSubmittedForm(); submit(json); bc.commit(); } finally { bc.abort(); } return HttpResponses.redirectToDot(); }
public HttpResponse doToggleOffline(@QueryParameter String offlineMessage) throws IOException, ServletException { checkPermission(Hudson.ADMINISTER); if(!temporarilyOffline) { offlineMessage = Util.fixEmptyAndTrim(offlineMessage); setTemporarilyOffline(!temporarilyOffline, OfflineCause.create(hudson.slaves.Messages._SlaveComputer_DisconnectedBy( Hudson.getAuthentication().getName(), offlineMessage!=null ? " : " + offlineMessage : ""))); } else { setTemporarilyOffline(!temporarilyOffline,null); } return HttpResponses.redirectToDot(); }