Class InteractiveInputJobAction
java.lang.Object
io.jenkins.plugins.interactiveinput.ui.InteractiveInputJobAction
- All Implemented Interfaces:
Action,ModelObject,Badgeable
Per-project notification centre (§per-project surfaces). Attached to every
Job by
InteractiveInputJobAction.Factory when the perProjectCentre feature is on.
Renders two surfaces from the action's resources:
jobMain.jelly— an inline box on the job/pipeline page listing that job's pending questions (rendered byWorkflowJob/main.jellyandAbstractProject/main.jellywhich iterateallActionsand include each action'sjobMain.jelly). It self-hides when nothing is pending.index.jelly— the action's own page (reached via the left-sidebar link that appears only when there are pending questions, driven bygetIconFileName()). While showing,getBadge()supplies the pending count to core's sidepanel / overflow menu, and the always-presentdata-ii-tasklinkcontroller (jobMain.jelly/ the action page /bell.js) keeps that pill live so the number does not go stale until a page reload.
Both surfaces mount the shared JS widget, which polls the scoped REST endpoint
(/interactive-input/api/v1/questions?job=<fullName>) and opens the shared modal. All
permission and existence checks live in the store/REST layer; this action only exposes metadata.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAttachesInteractiveInputJobActionto every job when the per-project centre is enabled. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Action
getDescription, getEvent, getGroup, getSemantic, isVisibleInContextMenu
-
Field Details
-
URL_NAME
Stable URL segment under the job (e.g./job/foo/interactive-input/).- See Also:
-
-
Constructor Details
-
InteractiveInputJobAction
-
-
Method Details
-
isJobPageBoxEnabled
public boolean isJobPageBoxEnabled()- Returns:
- whether the large inline job-page box is enabled (independent of the sidebar/badge).
-
isJobBoxVisibleClassic
public boolean isJobBoxVisibleClassic()- Returns:
- whether the inline job-page box should render. Suppressed under the experimental job page,
where core wraps
jobMain.jellyin its "Legacy" card and there is no plugin-usable native-card API (WidgetFactoryis@Restricted(NoExternalUse)). The action stays reachable there via the native "more actions" overflow menu, the global bell, and the dedicatedinteractive-input/page. The classic layout is unchanged.
-
getIconClassName
- Returns:
- the theme-aware symbol class for the configured notification icon.
-
getJob
-
getObject
- Returns:
- the owning job. Required by core's
l:job-subpage(it.object).
-
getJobFullName
-
getPendingCount
public int getPendingCount()- Returns:
- WAITING questions this job should surface to the current viewer (0 on any store error).
-
getPollingIntervalSeconds
public int getPollingIntervalSeconds() -
isRichModalEnabled
public boolean isRichModalEnabled() -
getIconFileName
- Specified by:
getIconFileNamein interfaceAction- Returns:
- the sidebar icon path, or
nullto hide the link. The link appears only when the feature is on and this job has pending questions (so it stays a per-project indicator, not permanent clutter on every job). While it is showing, the always-presentdata-ii-tasklinkcontroller (seejobMain.jelly/bell.js) keeps its pending-count badge live and hides the row when the count reaches zero, so the number no longer goes stale until a full page reload.
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject- Returns:
- the stable sidebar / overflow label. The pending count is
getBadge(), not a(N)suffix, so the classic sidepanel does not flicker fromInteractive Input (N)to a pill.
-
getBadge
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-