Class PullRequestMonitoringPortlet
java.lang.Object
io.jenkins.plugins.monitoring.MonitorPortlet
io.jenkins.plugins.analysis.core.portlets.PullRequestMonitoringPortlet
public class PullRequestMonitoringPortlet
extends io.jenkins.plugins.monitoring.MonitorPortlet
A portlet that can be used for the
pull-request-monitoring dashboard.
It renders an interactive sunburst diagram for each
ResultAction,
which is registered at the current users Run.- Author:
- Simon Symhoven
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()Get the json data for the simplified sunburst diagram (used by jelly view).intintGet the icon class of the quality gate.Get the human-readable description of quality gate.getTitle()Get the json data for the hierarchical sunburst diagram (used by jelly view).booleanCheck ifAnalysisResultissues have no new warnings.booleanCheck if action has a quality gate.booleanbooleanisEmpty()Check ifAnalysisResultissues are empty.Methods inherited from class io.jenkins.plugins.monitoring.MonitorPortlet
toString
-
Constructor Details
-
PullRequestMonitoringPortlet
Creates a newPullRequestMonitoringPortlet.- Parameters:
action- the correspondingResultAction.
-
-
Method Details
-
getTitle
- Specified by:
getTitlein classio.jenkins.plugins.monitoring.MonitorPortlet
-
getId
- Specified by:
getIdin classio.jenkins.plugins.monitoring.MonitorPortlet
-
isDefault
public boolean isDefault()- Overrides:
isDefaultin classio.jenkins.plugins.monitoring.MonitorPortlet
-
getPreferredWidth
public int getPreferredWidth()- Specified by:
getPreferredWidthin classio.jenkins.plugins.monitoring.MonitorPortlet
-
getPreferredHeight
public int getPreferredHeight()- Specified by:
getPreferredHeightin classio.jenkins.plugins.monitoring.MonitorPortlet
-
getIconUrl
- Overrides:
getIconUrlin classio.jenkins.plugins.monitoring.MonitorPortlet
-
getDetailViewUrl
- Overrides:
getDetailViewUrlin classio.jenkins.plugins.monitoring.MonitorPortlet
-
getWarningsModel
Get the json data for the hierarchical sunburst diagram (used by jelly view).- Returns:
- the data as json string.
-
getNoNewWarningsModel
Get the json data for the simplified sunburst diagram (used by jelly view).- Returns:
- the data as json string.
-
isEmpty
public boolean isEmpty()Check ifAnalysisResultissues are empty.- Returns:
- true if
AnalysisResultissues are empty, else false.
-
hasNoNewWarnings
public boolean hasNoNewWarnings()Check ifAnalysisResultissues have no new warnings.- Returns:
- true if
AnalysisResultissues have now new warnings.
-
hasQualityGate
public boolean hasQualityGate()Check if action has a quality gate.- Returns:
- true if action has a quality gate, else false.
-
getQualityGateResultClass
Get the icon class of the quality gate.- Returns:
- the image class of the Jenkins status icon.
-
getQualityGateResultDescription
Get the human-readable description of quality gate.- Returns:
- the description.
-