/** * Snooze the upgrade wizard notice. */ @RequirePOST public HttpResponse doSnooze() throws IOException { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); File f = SetupWizard.getUpdateStateFile(); FileUtils.touch(f); f.setLastModified(System.currentTimeMillis() + TimeUnit.DAYS.toMillis(1)); LOGGER.log(FINE, "Snoozed the upgrade wizard notice"); return HttpResponses.redirectToContextRoot(); }
/** * Call this to hide the upgrade wizard */ public HttpResponse doHideUpgradeWizard() { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); HttpSession session = Stapler.getCurrentRequest().getSession(false); if(session != null) { session.removeAttribute(SHOW_UPGRADE_WIZARD_FLAG); } return HttpResponses.redirectToContextRoot(); }
/** * Call this to show the upgrade wizard */ public HttpResponse doShowUpgradeWizard() throws Exception { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); HttpSession session = Stapler.getCurrentRequest().getSession(true); session.setAttribute(SHOW_UPGRADE_WIZARD_FLAG, true); return HttpResponses.redirectToContextRoot(); }
/** * Snooze the upgrade wizard notice. */ @RequirePOST public HttpResponse doSnooze() throws IOException { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); File f = SetupWizard.getUpdateStateFile(); FileUtils.touch(f); f.setLastModified(System.currentTimeMillis() + TimeUnit.DAYS.toMillis(1)); LOGGER.log(FINE, "Snoozed the upgrade wizard notice"); return HttpResponses.redirectToContextRoot(); }
/** * Call this to hide the upgrade wizard */ public HttpResponse doHideUpgradeWizard() { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); HttpSession session = Stapler.getCurrentRequest().getSession(false); if(session != null) { session.removeAttribute(SHOW_UPGRADE_WIZARD_FLAG); } return HttpResponses.redirectToContextRoot(); }
/** * Call this to show the upgrade wizard */ public HttpResponse doShowUpgradeWizard() throws Exception { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); HttpSession session = Stapler.getCurrentRequest().getSession(true); session.setAttribute(SHOW_UPGRADE_WIZARD_FLAG, true); return HttpResponses.redirectToContextRoot(); }