Class ReportDetails

java.lang.Object
io.jenkins.plugins.reporter.ReportDetails
All Implemented Interfaces:
ModelObject

public class ReportDetails extends Object implements ModelObject
  • Constructor Details

    • ReportDetails

      public ReportDetails(Run<?,?> owner, String url, ReportResult result, String displayName, Item item, Optional<ReportDetails> parentViewModel)
      Creates a new instance of ReportDetails.
      Parameters:
      owner - the associated build/run of this view
      url - the relative URL of this view
      result - the report result
      displayName - the human-readable name of this view (shown in breadcrumb).
      item - the item to show for this view.
      parentViewModel - the view model of parent item.
  • Method Details

    • getErrorMessages

      public Collection<String> getErrorMessages()
      Returns the error messages of the static analysis run.
      Returns:
      the error messages
    • getInfoMessages

      public Collection<String> getInfoMessages()
      Returns the information messages of the static analysis run.
      Returns:
      the information messages
    • getItem

      public Item getItem()
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface ModelObject
    • getOwner

      public final Run<?,?> getOwner()
      Returns the build as owner of this object.
      Returns:
      the owner
    • getUrl

      public String getUrl()
      Returns the (relative) URL of this model object.
      Returns:
      this model objects' URL
    • getPrevious

      public Optional<ReportDetails> getPrevious()
      Get the view model of parent item.
      Returns:
      the view model of parent item.
    • getItemPieChartModel

      public String getItemPieChartModel()
      Returns the UI model for an ECharts item data chart.
      Returns:
      the UI model as JSON
    • getTableModel

      public ItemTableModel getTableModel()
      Returns the UI model for the specified table.
      Returns:
      the UI model as JSON
    • getBuildTrend

      @JavaScriptMethod public String getBuildTrend(String configuration)
      Returns the UI model for an ECharts line chart that shows the item result.
      Parameters:
      configuration - determines whether the Jenkins build number should be used on the X-axis or the date
      Returns:
      the UI model as JSON
    • getUrlForBuild

      @JavaScriptMethod public String getUrlForBuild(String build, String detailsUrl)
      Returns the URL for same results of the selected build.
      Parameters:
      build - the selected build to open the new results for
      detailsUrl - the absolute URL to this details view report
      Returns:
      the URL to the report or an empty string if the report are not available
    • getDynamic

      public Object getDynamic(String link, org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response)
      Returns a new sub page for the selected link.
      Parameters:
      link - the link to identify the sub page to show
      request - Stapler request
      response - Stapler response
      Returns:
      the new sub page