Class MetricDefinition.DescriptorImpl

java.lang.Object
hudson.model.Descriptor<MetricDefinition>
org.jenkinsci.plugins.vmanager.charts.model.MetricDefinition.DescriptorImpl
All Implemented Interfaces:
Saveable, Loadable, OnMaster
Enclosing class:
MetricDefinition

@Extension public static class MetricDefinition.DescriptorImpl extends Descriptor<MetricDefinition>
  • Constructor Details

    • DescriptorImpl

      public DescriptorImpl()
  • Method Details

    • getDisplayName

      @NonNull public String getDisplayName()
      Overrides:
      getDisplayName in class Descriptor<MetricDefinition>
    • doFillEntityTypeItems

      @POST public ListBoxModel doFillEntityTypeItems(@AncestorInPath Item item)
    • doCheckAttributeName

      @POST public FormValidation doCheckAttributeName(@QueryParameter String value, @QueryParameter String entityType, @RelativePath("../..") @QueryParameter String serverUrl, @RelativePath("../..") @QueryParameter String credentialsId, @AncestorInPath Item item)
      Validates the Attribute Name field. In addition to the required-field check, this also pings the vManager REST endpoint for the selected entity type so that any server-side error (auth, 404, connection refused, TLS, etc.) is surfaced inline under the field in red. Triggered both on edits to the field itself and — via checkDependsOn in the Jelly — whenever entityType, serverUrl or credentialsId change.
    • doFillChartTypeItems

      @POST public ListBoxModel doFillChartTypeItems(@AncestorInPath Item item)
    • doFillAttributeNameItems

      @POST public ComboBoxModel doFillAttributeNameItems(@QueryParameter String entityType, @RelativePath("../..") @QueryParameter String serverUrl, @RelativePath("../..") @QueryParameter String credentialsId, @AncestorInPath Item item)
      Populates the Attribute combobox by calling the vManager REST API and listing the human-friendly titles of every numeric attribute. The combobox provides built-in type-ahead filtering, and the title that the user picks is what gets stored in attributeName — so it matches back on reopen and is automatically used as the chart legend label.

      URL patterns:

      • COVERAGE_LEVEL: {serverUrl}/rest/$schema/response?action=list-metrics-tree-sub-entities&component=tracking-configuration&extended=true
      • VPLAN_LEVEL: {serverUrl}/rest/$schema/response?action=list-vplan-tree-sub-entities&component=tracking-configuration&extended=true
      • SESSION_LEVEL: not supported yet — empty list