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
  • Constructor Details

  • Method Details

    • getTitle

      public String getTitle()
      Specified by:
      getTitle in class io.jenkins.plugins.monitoring.MonitorPortlet
    • getId

      @JavaScriptMethod public String getId()
      Specified by:
      getId in class io.jenkins.plugins.monitoring.MonitorPortlet
    • isDefault

      public boolean isDefault()
      Overrides:
      isDefault in class io.jenkins.plugins.monitoring.MonitorPortlet
    • getPreferredWidth

      public int getPreferredWidth()
      Specified by:
      getPreferredWidth in class io.jenkins.plugins.monitoring.MonitorPortlet
    • getPreferredHeight

      public int getPreferredHeight()
      Specified by:
      getPreferredHeight in class io.jenkins.plugins.monitoring.MonitorPortlet
    • getIconUrl

      public Optional<String> getIconUrl()
      Overrides:
      getIconUrl in class io.jenkins.plugins.monitoring.MonitorPortlet
    • getDetailViewUrl

      public Optional<String> getDetailViewUrl()
      Overrides:
      getDetailViewUrl in class io.jenkins.plugins.monitoring.MonitorPortlet
    • getWarningsModel

      public String getWarningsModel()
      Get the json data for the hierarchical sunburst diagram (used by jelly view).
      Returns:
      the data as json string.
    • getNoNewWarningsModel

      public 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 if AnalysisResult issues are empty.
      Returns:
      true if AnalysisResult issues are empty, else false.
    • hasNoNewWarnings

      public boolean hasNoNewWarnings()
      Check if AnalysisResult 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

      public String getQualityGateResultClass()
      Get the icon class of the quality gate.
      Returns:
      the image class of the Jenkins status icon.
    • getQualityGateResultDescription

      public String getQualityGateResultDescription()
      Get the human-readable description of quality gate.
      Returns:
      the description.