Class JobNoticesWidget

java.lang.Object
hudson.widgets.Widget
io.jenkins.plugins.batchcontrol.action.JobNoticesWidget

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final class JobNoticesWidget extends Widget
The job page notices (trigger lock, approval, activation) as a card of core's new job page. That page's Overview renders the job's widgets (HasWidgets.getWidgets()) as cards and puts everything a classic page contributes (jobMain.jelly) into a card titled "Legacy"; this widget lets the notices sit next to core's own cards instead.

Only contributed while the viewer has the new job page on, so the classic page (where job widgets render in the side panel) is unchanged and keeps showing the notices through jobMain.jelly, which renders nothing on the new page. The notices are the views of JobTriggerLockAction and JobActivationNoticeAction (notices.jelly), so both pages show the same text under the same permission rules. Read-only: no state changes.

  • Method Details

    • getJob

      public Job<?,?> getJob()
    • getUrlName

      public String getUrlName()
      Core routes <job>/<urlName> to a widget before the job's actions, so the name must not be batch-control (the run request form).
      Overrides:
      getUrlName in class Widget
    • getTriggerLock

      public JobTriggerLockAction getTriggerLock()
    • getActivationNotice

      public JobActivationNoticeAction getActivationNotice()
    • isShown

      public boolean isShown()
      Whether either notice has anything to say to this viewer (no empty card otherwise).