Class SpecsAction

java.lang.Object
io.jenkins.plugins.specsmonitor.SpecsAction
All Implemented Interfaces:
Action, ModelObject

public class SpecsAction extends Object implements Action
Adds a "Specs" page to the computer page of a node that lists its CPU, GPU, RAM and the drives and volumes it can use.
  • Constructor Details

    • SpecsAction

      public SpecsAction(Computer computer)
  • Method Details

    • getComputer

      public Computer getComputer()
    • getIconFileName

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

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

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • doCpuSection

      @GET public org.kohsuke.stapler.HttpResponse doCpuSection()
      The sections are rendered on their own, so the page does not wait for the node.
    • doGpuSection

      @GET public org.kohsuke.stapler.HttpResponse doGpuSection()
    • doRamSection

      @GET public org.kohsuke.stapler.HttpResponse doRamSection()
    • doVolumesSection

      @GET public org.kohsuke.stapler.HttpResponse doVolumesSection()
    • checkPermitted

      public boolean checkPermitted()
      Fails unless the user may see the specs, so the page can check this before it loads its sections.
    • getVolumes

      public List<StorageVolumes.Volume> getVolumes()
      Asks the node for its drives and volumes. Returns null if the node is offline or does not answer in time, since there is no meaningful last known value.
    • getCpu

      public CpuInfo getCpu()
      Asks the node for its CPU. Returns null if the node is offline or does not answer in time.
    • getGpu

      public GpuInfo getGpu()
      Asks the node for its GPU. Returns null if the node is offline or does not answer in time.
    • getRam

      public RamSpecs getRam()
      Asks the node for its RAM. Returns null if the node is offline or does not answer in time.