Class Badge
ManagementLink
implementation.
The badge is shown as a small overlay over the corresponding icon on the Manage Jenkins
page,
it can display additional information in a tooltip and change it's color depending on the severity.
A badge mainly serves as a fast feedback for the corresponding management page.
It could be used to just display some short status information or hint that some action can be taken.
For example the badge on Manage Plugins
shows information about the number of available updates
and in its tooltip additionally how many updates contain incompatible changes or fix
security vulnerabilities. It also changes its color when there are security fixes available.
A badge might display the same information as an AdministrativeMonitor
. While an AdministrativeMonitor
can be disabled, a badge will always be shown. E.g. the badge of OldDataMonitor.ManagementLinkImpl
always shows the number of old data entries.
A badge can also be used in a <l:task .../>
to show information on the right of the link in the sidepanel,
e.g. to show number of available plugin updates.
- Since:
- 2.385
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionBadge
(String text, String tooltip, Badge.Severity severity) Create a new Badge -
Method Summary
Modifier and TypeMethodDescriptionThe severity of the badge.getText()
The text to be shown in the badge.The tooltip of the badge.
-
Constructor Details
-
Badge
Create a new Badge- Parameters:
text
- The text to be shown in the badge. Keep it short, ideally just a number. More than 6 or 7 characters do not look good. Avoid spaces as they will lead to line breaks. as this might lead to line breaks.tooltip
- The tooltip to show for the badge. Do not include html tags.severity
- The severity of the badge (danger, warning, info)
-
-
Method Details
-
getText
The text to be shown in the badge.- Returns:
- badge text
-
getTooltip
The tooltip of the badge.- Returns:
- tooltip
-
getSeverity
The severity of the badge. Influences the background color of the badge.- Returns:
- severity as String
-