Class VManagerChartsAction

java.lang.Object
org.jenkinsci.plugins.vmanager.charts.VManagerChartsAction
All Implemented Interfaces:
Action, ModelObject

public class VManagerChartsAction extends Object implements Action
Action that adds "vManager Charts" link to job sidebar. Handles rendering of the vManager charts page.
  • Constructor Details

    • VManagerChartsAction

      public VManagerChartsAction(Job<?,?> job)
  • Method Details

    • getIconFileName

      @CheckForNull public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      @CheckForNull public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      @CheckForNull public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • getJob

      public Job<?,?> getJob()
    • isShowBuildDuration

      public boolean isShowBuildDuration()
    • isShowSuccessRate

      public boolean isShowSuccessRate()
    • isShowFailureTriageChart

      public boolean isShowFailureTriageChart()
    • getGroupedRunsCards

      public List<VManagerChartsAction.GroupedRunsCard> getGroupedRunsCards()
      Cards for index.jelly rendering of grouped-runs heat-maps.
    • isShowCustomMetrics

      public boolean isShowCustomMetrics()
    • getCustomChartTitles

      public List<String> getCustomChartTitles()
      Used by index.jelly to render one container per configured chart.
    • getCustomChartCards

      public List<VManagerChartsAction.CustomChartCard> getCustomChartCards()
      Used by index.jelly to render one dashboard card per configured custom chart. Each entry exposes the human title, the per-build chart-div index (already used by assets.js) and a stable slug used as the dashboard layout key so reorder/width settings survive title changes only if the title stays the same. Two charts with the same slug fall back to -2, -3, … suffixes.
    • getCustomMetricsData

      @JavaScriptMethod public List<ChartData> getCustomMetricsData()
      Returns one ChartData per configured custom chart, where each ChartData contains one series per metric in that chart (each series may carry its own type: line/bar/column).
    • getBuildDurationData

      @JavaScriptMethod public ChartData getBuildDurationData()
    • getSuccessRateData

      @JavaScriptMethod public ChartData getSuccessRateData()
    • getGroupedRunsChartsData

      @JavaScriptMethod public net.sf.json.JSONArray getGroupedRunsChartsData()
      Returns one heat-map dataset per configured GroupedRunsChartDefinition (in declaration order, matching getGroupedRunsCards()). Each entry has the same shape as the legacy single-chart payload: labels, yLabels, yTitles, cells, maxValue plus a title / subtitle for chart rendering.
    • getLayoutJson

      public String getLayoutJson()
      Current persisted layout, opaque JSON. Returns "{}" if none.
    • isCanConfigure

      public boolean isCanConfigure()
      Used by the dashboard JS to decide whether to show the drag/width/save UI or stay read-only. Anyone without Item.CONFIGURE sees the layout but cannot change it.
    • doSaveLayout

      public void doSaveLayout(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException
      POST endpoint that persists the dashboard layout JSON sent by the front-end. Requires Item.CONFIGURE on the job and rejects payloads that don't parse as a JSON object or exceed the size cap.
      Throws:
      IOException