Class OpenInteractiveInputNote
java.lang.Object
hudson.console.ConsoleNote
hudson.console.HyperlinkNote
io.jenkins.plugins.interactiveinput.step.OpenInteractiveInputNote
- All Implemented Interfaces:
ExtensionPoint,Describable,Serializable
A console hyperlink that opens a specific interactive-input question's dialog in place on
the page that shows the link (B6). On the build's Console Output the shared client (
bell.js)
intercepts the click and opens the shared native dialog right there, instead of first navigating to
the per-build audit page (which then had to auto-open it — an extra hop the reviewer flagged).
It extends HyperlinkNote so the href resolution (context-path aware) and the console-note
security envelope (core signs notes; only controller-written notes are honoured on render) are
core's. We only contribute, via the extraAttributes() hook core provides for exactly this
purpose, the two attributes the client needs:
data-ii-open— the question id to open;data-root-url— the context path, so the REST call resolves under any context path even when this link is the only interactive-input surface on the page (mirrors the build-history badge'sdata-root-url).
The href stays a real deep-link (.../interactive-input/?open=<id>), so the link
still works with JavaScript disabled or on a page where bell.js is not loaded: it then
navigates to the audit page, which auto-opens the same dialog. No user-supplied text is emitted —
the id is a server-generated UUID and the context path is Jenkins' own — so there is no injection
surface beyond what HyperlinkNote already renders.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.console.ConsoleNote
INSECURE, POSTAMBLE, POSTAMBLE_STR, PREAMBLE, PREAMBLE_STR -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class hudson.console.HyperlinkNote
annotate, encodeToMethods inherited from class hudson.console.ConsoleNote
encode, encodeTo, encodeTo, findPreamble, getDescriptor, readFrom, removeNotes, removeNotes, skip
-
Constructor Details
-
OpenInteractiveInputNote
-
-
Method Details
-
encodeTo
@NonNull public static String encodeTo(@NonNull String url, @NonNull String questionId, @NonNull String text) - Returns:
- the console string that renders
textas an in-place "open this question" link; falls back to the plain text if the note cannot be serialised (never breaks the build log).
-
extraAttributes
- Overrides:
extraAttributesin classHyperlinkNote
-