Class VManagerChartsAction
java.lang.Object
org.jenkinsci.plugins.vmanager.charts.VManagerChartsAction
- All Implemented Interfaces:
Action,ModelObject
Action that adds "vManager Charts" link to job sidebar.
Handles rendering of the vManager charts page.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classLightweight row used by index.jelly to render a custom-chart card.static final classLightweight row used by index.jelly to render a grouped-runs card. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoSaveLayout(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) POST endpoint that persists the dashboard layout JSON sent by the front-end.Used by index.jelly to render one dashboard card per configured custom chart.Used by index.jelly to render one container per configured chart.Returns oneChartDataper configured custom chart, where each ChartData contains one series per metric in that chart (each series may carry its own type: line/bar/column).Cards for index.jelly rendering of grouped-runs heat-maps.net.sf.json.JSONArrayReturns one heat-map dataset per configuredGroupedRunsChartDefinition(in declaration order, matchinggetGroupedRunsCards()).Job<?, ?> getJob()Current persisted layout, opaque JSON.booleanUsed by the dashboard JS to decide whether to show the drag/width/save UI or stay read-only.booleanbooleanbooleanboolean
-
Constructor Details
-
VManagerChartsAction
-
-
Method Details
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getJob
-
isShowBuildDuration
public boolean isShowBuildDuration() -
isShowSuccessRate
public boolean isShowSuccessRate() -
isShowFailureTriageChart
public boolean isShowFailureTriageChart() -
getGroupedRunsCards
Cards for index.jelly rendering of grouped-runs heat-maps. -
isShowCustomMetrics
public boolean isShowCustomMetrics() -
getCustomChartTitles
Used by index.jelly to render one container per configured chart. -
getCustomChartCards
Used by index.jelly to render one dashboard card per configured custom chart. Each entry exposes the human title, the per-build chart-divindex(already used by assets.js) and a stableslugused 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
Returns oneChartDataper 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
-
getSuccessRateData
-
getGroupedRunsChartsData
@JavaScriptMethod public net.sf.json.JSONArray getGroupedRunsChartsData()Returns one heat-map dataset per configuredGroupedRunsChartDefinition(in declaration order, matchinggetGroupedRunsCards()). Each entry has the same shape as the legacy single-chart payload:labels, yLabels, yTitles, cells, maxValueplus atitle/subtitlefor chart rendering. -
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 withoutItem.CONFIGUREsees 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. RequiresItem.CONFIGUREon the job and rejects payloads that don't parse as a JSON object or exceed the size cap.- Throws:
IOException
-