Class RestartDrainAction

java.lang.Object
org.jenkins.ci.plugins.saferestart.RestartDrainAction
All Implemented Interfaces:
ExtensionPoint, Action, ModelObject, RootAction

@Extension public class RestartDrainAction extends Object implements RootAction
Page and side-panel link for RestartDrain: start or cancel the drain and see which builds still hold the restart.
  • Constructor Details

    • RestartDrainAction

      public RestartDrainAction()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getIconFileName

      @CheckForNull public String getIconFileName()
      Hidden when the "wait for running builds" option is on: the regular "Restart Safely" links lead here already, so a second link would be a duplicate. The page stays reachable.
      Specified by:
      getIconFileName in interface Action
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • getDrain

      public RestartDrain getDrain()
    • getSinceAgo

      public String getSinceAgo()
      Returns:
      how long ago the drain started, for display
    • doStart

      public org.kohsuke.stapler.HttpResponse doStart(@QueryParameter String message)
      Starts the drain. Restarts right away if nothing is running.
      Parameters:
      message - optional message for the shutdown banner
    • doCancel

      public org.kohsuke.stapler.HttpResponse doCancel()
      Cancels the drain. Held-back builds start again.