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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContributes the card to a job's widgets on the new job page only. -
Method Summary
Methods inherited from class hudson.widgets.Widget
getOwnerUrl, getUrl
-
Method Details
-
getJob
-
getUrlName
Core routes<job>/<urlName>to a widget before the job's actions, so the name must not bebatch-control(the run request form).- Overrides:
getUrlNamein classWidget
-
getTriggerLock
-
getActivationNotice
-
isShown
public boolean isShown()Whether either notice has anything to say to this viewer (no empty card otherwise).
-