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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
Get the json data for the simplified sunburst diagram (used by jelly view).int
int
Get 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).boolean
Check ifAnalysisResult
issues have no new warnings.boolean
Check if action has a quality gate.boolean
boolean
isEmpty()
Check ifAnalysisResult
issues 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:
getTitle
in classio.jenkins.plugins.monitoring.MonitorPortlet
-
getId
- Specified by:
getId
in classio.jenkins.plugins.monitoring.MonitorPortlet
-
isDefault
public boolean isDefault()- Overrides:
isDefault
in classio.jenkins.plugins.monitoring.MonitorPortlet
-
getPreferredWidth
public int getPreferredWidth()- Specified by:
getPreferredWidth
in classio.jenkins.plugins.monitoring.MonitorPortlet
-
getPreferredHeight
public int getPreferredHeight()- Specified by:
getPreferredHeight
in classio.jenkins.plugins.monitoring.MonitorPortlet
-
getIconUrl
- Overrides:
getIconUrl
in classio.jenkins.plugins.monitoring.MonitorPortlet
-
getDetailViewUrl
- Overrides:
getDetailViewUrl
in 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 ifAnalysisResult
issues are empty.- Returns:
- true if
AnalysisResult
issues are empty, else false.
-
hasNoNewWarnings
public boolean hasNoNewWarnings()Check ifAnalysisResult
issues have no new warnings.- Returns:
- true if
AnalysisResult
issues 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.
-