Class RunLinks
java.lang.Object
io.jenkins.plugins.batchcontrol.ui.RunLinks
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class RunLinks
extends Object
Builds root-relative build URLs from stored identifiers, and small display helpers shared by
the dashboard/incident/history views. Read-only, no Jenkins model lookups: records may refer
to builds or jobs that no longer exist, and the link is then simply a 404.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatDuration(long durationMs) Human-readable duration (3 min 20 sec); empty for non-positive values.static StringformatParameters(Map<String, String> parameters) One-linename=valuerendering of a parameter map for table cells and CSV.static Stringstatic Stringstatic StringrunUrlFromRunId(String runId) Builds the run URL from a stored run id of the formjobFullName#number.
-
Method Details
-
runUrl
- Returns:
job/a/job/b/12/for job full namea/band build number 12 (relative to the Jenkins root URL, each path segment URL-encoded)
-
jobUrl
- Returns:
job/a/job/b/for job full namea/b.
-
runUrlFromRunId
Builds the run URL from a stored run id of the formjobFullName#number.- Returns:
- the root-relative URL, or null when the id does not have that form (the view then renders plain text instead of a link)
-
formatParameters
One-linename=valuerendering of a parameter map for table cells and CSV. Values arrive already masked from the store (D-72: the display map derived once bystore.ParameterDisplay, a secret as********, a file as[file] <name>); output is escaped by the Jelly default. -
formatDuration
Human-readable duration (3 min 20 sec); empty for non-positive values.Delegates to
Dates.span(long)so durations and grant countdowns cannot drift into two different spellings of the same kind of value (U-07).
-