Class ChangesSection
java.lang.Object
io.jenkins.plugins.batchcontrol.action.ChangesSection
- All Implemented Interfaces:
ModelObject,org.kohsuke.stapler.StaplerProxy
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class ChangesSection
extends Object
implements ModelObject, org.kohsuke.stapler.StaplerProxy
The change record list at
/batch-control/changes/ (SPEC item 9). One month is shown at
a time, selected with ?month=YYYY-MM (default: current month), newest first, pages of
50 selected with ?page=N.
Change records are append-only audit data: this section is strictly read-only (no POST
endpoints at all) and requires ViewHistory, enforced for the whole subtree by
getTarget().
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intPage size for the change record list. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondiffSummary(String diff) Jelly helper:+12 / -3 linesfor a record's diff, shown next to the disclosure control so the size of a configuration change is readable without opening it (U-07).Jelly helper: human-readable timestamp.The complete CSV export of what this screen lists (S-03), relative to this section.getLinks()Link predicates: a link to another screen is rendered only if the user may open it.getMonth()The selected month, from?month=YYYY-MM; current month on absence or garbage.Selected month asYYYY-MM(value of the month input and the query parameter).Next month asYYYY-MM(for the navigation link).intOver-long lines (over 1 MiB) skipped while reading this page (security-11 N-02); the CSV export skips the same lines, so the screen says so rather than look complete.intgetPage()Current 1-based page, from thepagequery parameter (Paging).The change records shown on the current page, newest first.Previous month asYYYY-MM(for the navigation link).intgetTotal()Matching records read (a lower bound whenisTruncated()).Permissions for this screen'sl:layout(the same set its section gate checks).booleanbooleanWhether a next-month link makes sense (no records exist in the future).booleanbooleanWhether the per-request record cap stopped the read: ask to narrow the filter.
-
Field Details
-
PAGE_SIZE
public static final int PAGE_SIZEPage size for the change record list.- See Also:
-
-
Constructor Details
-
ChangesSection
public ChangesSection()
-
-
Method Details
-
getTarget
- Specified by:
getTargetin interfaceorg.kohsuke.stapler.StaplerProxy
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject
-
getViewPermissions
Permissions for this screen'sl:layout(the same set its section gate checks). -
getLinks
Link predicates: a link to another screen is rendered only if the user may open it. -
getMonth
The selected month, from?month=YYYY-MM; current month on absence or garbage. -
getMonthValue
Selected month asYYYY-MM(value of the month input and the query parameter). -
getPreviousMonth
Previous month asYYYY-MM(for the navigation link). -
getNextMonth
Next month asYYYY-MM(for the navigation link). -
isHasNextMonth
public boolean isHasNextMonth()Whether a next-month link makes sense (no records exist in the future). -
getPage
public int getPage()Current 1-based page, from thepagequery parameter (Paging). -
getPageItems
The change records shown on the current page, newest first. -
getTotal
public int getTotal()Matching records read (a lower bound whenisTruncated()). -
isTruncated
public boolean isTruncated()Whether the per-request record cap stopped the read: ask to narrow the filter. -
getOversized
public int getOversized()Over-long lines (over 1 MiB) skipped while reading this page (security-11 N-02); the CSV export skips the same lines, so the screen says so rather than look complete. -
getCsvUrl
The complete CSV export of what this screen lists (S-03), relative to this section. Pointed to by the truncation notice: the export is not bound by the per-screen record cap. Only ISO dates and constant names go into it, so no encoding is needed. -
isHasPrevious
public boolean isHasPrevious() -
isHasNext
public boolean isHasNext() -
format
Jelly helper: human-readable timestamp. -
diffSummary
Jelly helper:+12 / -3 linesfor a record's diff, shown next to the disclosure control so the size of a configuration change is readable without opening it (U-07).- Returns:
- an empty string when there is no countable diff (no diff, or the "too large to store" placeholder), in which case the view shows no summary
-