Class InteractiveViewRunTab

java.lang.Object
jenkins.model.Tab
io.jenkins.plugins.interactiveinput.ui.InteractiveViewRunTab
All Implemented Interfaces:
Action, ModelObject, Badgeable

public class InteractiveViewRunTab extends Tab
Native "Interactive View" card for the experimental run overview — the review counterpart of InteractiveOutputRunTab. Rendered by core's jenkins/run/OverviewTab/index.jelly, which iterates Run#getRunTabs() and includes each Tab's widget.jelly on the overview grid. It shows a compact, server-rendered "mini" of the build's interactive-view/ page (the list of reviews, each with its status and comment count), so reviewers see the reviews at a glance without opening the dedicated page.

This tab is only visible when the viewer has the experimental build page enabled AND has at least one readable review on this build (getIconFileName() returns null otherwise, and getRunTabs() filters out null-icon tabs), so the classic layout is untouched and the persisted InteractiveViewRunAction keeps serving its own sidebar link / overflow entry there.

The tab's getUrlName() matches InteractiveViewRunAction so the experimental tab bar stays on the same URL as the sidepanel action. This tab is widget-only: the action's index.jelly (l:run-subpage) serves the page. getBadge() supplies the open review count on the tab bar.

  • Field Details

  • Constructor Details

    • InteractiveViewRunTab

      public InteractiveViewRunTab(@NonNull Run<?,?> run)
  • Method Details

    • getRun

      @NonNull public Run<?,?> getRun()
    • getJobFullName

      @NonNull public String getJobFullName()
    • getBuildNumber

      public int getBuildNumber()
    • getReviews

      @NonNull public List<ReviewDocument> getReviews()
      Returns:
      the reviews for this build the current viewer may read (any status). Queries the ViewStore directly rather than run.getAction(...): the view action is a transient action, so it is absent from the persisted list, and getAllActions() would re-run every TransientActionFactory (recursing into this tab's own factory).
    • getReviewGroups

      @NonNull public Map<String,List<ReviewDocument>> getReviewGroups()
      Returns:
      this build's readable reviews grouped by report name, preserving order via a LinkedHashMap so the card can render a section per report/folder — mirroring InteractiveViewJobAction.getReviewGroups() but scoped to this build.
    • getOverviewGroups

      @NonNull public List<InteractiveViewRunTab.OverviewGroup> getOverviewGroups()
      Returns:
      the review groups prepared for the compact card. Wraps getReviewGroups() and precomputes, per group, whether its report-name heading should render — done here (not in the Jelly view) so the rule is unit-testable and widget.jelly needs no list-size / element logic. The heading is suppressed only when it would merely duplicate a lone file whose title is just the report name (the row already shows that title) — the common single-file publish, where InteractiveViewStepExecution defaults an unset title to the reportName. Multi-file (glob/dir) groups and custom titles keep it.
    • getIconClassName

      @NonNull public String getIconClassName()
      Returns:
      the theme-aware review symbol (for <l:icon> in the card).
    • getIconFileName

      @CheckForNull public String getIconFileName()
    • getDisplayName

      @NonNull public String getDisplayName()
    • getUrlName

      @NonNull public String getUrlName()
    • getPendingCount

      public int getPendingCount()
      Returns:
      OPEN, notify-enabled reviews on this build the current viewer should act on (0 on any store error).
    • getBadge

      @CheckForNull public Badge getBadge()
      Returns:
      a numeric DANGER badge while this build has open reviews the current viewer should act on; null at zero. Core shows this on the experimental tab bar.