Klasse AsyncTrendJobAction<T extends io.jenkins.plugins.util.BuildAction<?>>

java.lang.Object
io.jenkins.plugins.util.JobAction<T>
io.jenkins.plugins.echarts.AsyncTrendJobAction<T>
Typparameter:
T - type of the results
Alle implementierten Schnittstellen:
Action, ModelObject, AsyncTrendChart
Bekannte direkte Unterklassen:
AsyncConfigurableTrendJobAction

public abstract class AsyncTrendJobAction<T extends io.jenkins.plugins.util.BuildAction<?>> extends io.jenkins.plugins.util.JobAction<T> implements AsyncTrendChart
A job action displays a link on the side panel of a job that refers to the last build that contains results (i.e. a BuildAction with a corresponding result). This action also is responsible to render the historical trend via its associated 'floatingBox.jelly' view. The trend chart will be rendered by ECharts: the model of the chart will be obtained using an asynchronous Ajax call.
Autor:
Ullrich Hafner
  • Konstruktordetails

    • AsyncTrendJobAction

      protected AsyncTrendJobAction(Job<?,?> owner, Class<T> buildActionClass)
      Creates a new instance of AsyncTrendJobAction.
      Parameter:
      owner - the job that owns this action
      buildActionClass - the type of the action to find
  • Methodendetails

    • getBuildTrendModel

      @JavaScriptMethod public String getBuildTrendModel()
      Beschreibung aus Schnittstelle kopiert: AsyncTrendChart
      Returns the UI model for an ECharts chart that shows the build trend. The model has to be a JSON representation of a corresponding LinesChartModel instance, that will be inserted into the client side model of the corresponding ECharts instance.
      Angegeben von:
      getBuildTrendModel in Schnittstelle AsyncTrendChart
      Gibt zurück:
      the UI model as JSON
      Siehe auch:
    • isTrendVisible

      public boolean isTrendVisible()
      This default implementation checks whether there are at least two build results available. Override if this behavior does not make sense in your job action.
      Angegeben von:
      isTrendVisible in Schnittstelle AsyncTrendChart
      Gibt zurück:
      true if there are at least two results, false otherwise
    • createChartModel

      protected abstract edu.hm.hafner.echarts.LinesChartModel createChartModel()
      Creates the model of the trend chart. The returned model will be converted to JSON and inserted into the client side model of the corresponding ECharts instance.
      Gibt zurück:
      the model of the trend chart
      Siehe auch:
      • for details on how to construct such a model
    • createBuildHistory

      protected Iterable<? extends edu.hm.hafner.echarts.BuildResult<T>> createBuildHistory()