Class DropdownFilterView

java.lang.Object
hudson.model.AbstractModelObject
hudson.model.View
hudson.model.ListView
io.jenkins.plugins.dynamic_view_filter.DropdownFilterView
All Implemented Interfaces:
ExtensionPoint, Describable<View>, DescriptorByNameOwner, DirectlyModifiableView, ModelObject, Saveable, SearchableModelObject, SearchItem, AccessControlled, ModelObjectWithChildren, HasWidgets

public class DropdownFilterView extends ListView
A ListView extension that adds configurable dropdown filters at the top of the view. Each dropdown can filter jobs by a path segment of the job's full name or by a build parameter value.

Dropdown values are auto-discovered from the jobs in the view. Selecting a value in a dropdown narrows the displayed jobs. Multiple dropdowns combine with AND logic.

All standard ListView features (columns, job filters, regex) are preserved.

  • Constructor Details

    • DropdownFilterView

      @DataBoundConstructor public DropdownFilterView(String name)
    • DropdownFilterView

      public DropdownFilterView(String name, ViewGroup owner)
  • Method Details

    • getDropdowns

      public List<DropdownDefinition> getDropdowns()
    • setDropdowns

      public void setDropdowns(List<DropdownDefinition> dropdowns)
    • getFilterPosition

      public String getFilterPosition()
    • setFilterPosition

      public void setFilterPosition(String filterPosition)
    • getItems

      public List<TopLevelItem> getItems()
      Overrides:
      getItems in class ListView
    • getDropdownValues

      public List<String> getDropdownValues(DropdownDefinition dd)
      Called from main.jelly to populate dropdown options. Uses the unfiltered list so all values are always visible.
    • getSelectedValue

      public String getSelectedValue(int index)
      Called from main.jelly to mark the currently selected option.
    • submit

      protected void submit(org.kohsuke.stapler.StaplerRequest2 req) throws IOException, jakarta.servlet.ServletException, Descriptor.FormException
      Overrides:
      submit in class ListView
      Throws:
      IOException
      jakarta.servlet.ServletException
      Descriptor.FormException
    • getActiveRunMatchers

      public List<RunMatcher> getActiveRunMatchers()
      Returns dynamic RunMatcher filters derived from active build-parameter dropdown selections. Called by DynamicBuildFilterColumn to filter displayed builds based on dropdown selections.