com.sonyericsson.jenkins.plugins.bfa.graphs
Class ComputerGraphAction

java.lang.Object
  extended by com.sonyericsson.jenkins.plugins.bfa.BfaGraphAction
      extended by com.sonyericsson.jenkins.plugins.bfa.graphs.ComputerGraphAction
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Action, hudson.model.ModelObject, hudson.model.RootAction

public class ComputerGraphAction
extends BfaGraphAction

Class for displaying graphs for nodes - slaves/masters.

Author:
Christoffer Lauri <christoffer.lauri@sonymobile.com>

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class com.sonyericsson.jenkins.plugins.bfa.BfaGraphAction
DEFAULT_GRAPH_HEIGHT, DEFAULT_GRAPH_WIDTH, EXCLUDE_ABORTED, ID_SEPARATOR, URL_PARAM_ALL_MASTERS, URL_PARAM_SHOW_ABORTED, URL_PARAM_TIME_PERIOD, URL_PARAM_VALUE_MAX, URL_PARAM_VALUE_MONTH, URL_PARAM_VALUE_TODAY, URL_PARAM_WHICH_GRAPH
 
Constructor Summary
ComputerGraphAction(hudson.model.Computer computer)
          Standard constructor.
 
Method Summary
 String getDisplayName()
           
protected  hudson.util.Graph getGraph(GraphType which, Date timePeriod, boolean hideManAborted, boolean forAllMasters, Map<String,String> rawReqParams)
          Get the graph corresponding to the specified arguments.
protected  String getGraphCacheId(GraphType whichGraph, String reqTimePeriod, boolean hideAborted, boolean forAllMasters)
          Get a unique id used in the caching of the graph.
 String getGraphsPageTitle()
          Get the title to display in the top of the detailed graphs page.
 GraphType[] getGraphTypes()
          Returns an array of GraphTypes, where each element represents a graph.
 String getIconFileName()
           
 hudson.model.ModelObject getOwner()
          Get the owner.
 String getUrlName()
           
static void invalidateNodeGraphCache(hudson.model.Computer computer)
          Invalidate all graph caches for the specified computer.
static void invalidateNodeGraphCache(hudson.model.Node buildNode)
          Invalidate all graph caches for the specified buildNode.
 
Methods inherited from class com.sonyericsson.jenkins.plugins.bfa.BfaGraphAction
getDefaultGraphHeight, getDefaultGraphWidth, getGraph, showGraphDelayText, showMasterSwitch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComputerGraphAction

public ComputerGraphAction(hudson.model.Computer computer)
Standard constructor.

Parameters:
computer - The computer/node
Method Detail

getIconFileName

public String getIconFileName()

getDisplayName

public String getDisplayName()

getUrlName

public String getUrlName()

getOwner

public hudson.model.ModelObject getOwner()
Description copied from class: BfaGraphAction
Get the owner.

Specified by:
getOwner in class BfaGraphAction
Returns:
The owner

getGraphTypes

public GraphType[] getGraphTypes()
Description copied from class: BfaGraphAction
Returns an array of GraphTypes, where each element represents a graph. These are the types used to display the graphs/images on the detailed graphs page, that is, they will be the 'which'-parameter to getGraph(GraphType which, Date ...). The graphs are displayed in the same order as the numbers in the array.

Specified by:
getGraphTypes in class BfaGraphAction
Returns:
An array of GraphTypes where each element represents a graph to display

getGraphsPageTitle

public String getGraphsPageTitle()
Description copied from class: BfaGraphAction
Get the title to display in the top of the detailed graphs page.

Specified by:
getGraphsPageTitle in class BfaGraphAction
Returns:
The title as a String

getGraph

protected hudson.util.Graph getGraph(GraphType which,
                                     Date timePeriod,
                                     boolean hideManAborted,
                                     boolean forAllMasters,
                                     Map<String,String> rawReqParams)
Description copied from class: BfaGraphAction
Get the graph corresponding to the specified arguments.

Specified by:
getGraph in class BfaGraphAction
Parameters:
which - Which graph to display
timePeriod - How old statistics should be included in the graph
hideManAborted - Hide manually aborted causes
forAllMasters - Show for all masters
rawReqParams - The url parameters that came with the request
Returns:
A Graph

getGraphCacheId

protected String getGraphCacheId(GraphType whichGraph,
                                 String reqTimePeriod,
                                 boolean hideAborted,
                                 boolean forAllMasters)
Description copied from class: BfaGraphAction
Get a unique id used in the caching of the graph.

Specified by:
getGraphCacheId in class BfaGraphAction
Parameters:
whichGraph - Which graph
reqTimePeriod - The selected time period
hideAborted - Hide aborted builds
forAllMasters - For all masters
Returns:
An id corresponding to the specified arguments

invalidateNodeGraphCache

public static void invalidateNodeGraphCache(hudson.model.Computer computer)
Invalidate all graph caches for the specified computer.

Parameters:
computer - The computer whose graphs to invalidate

invalidateNodeGraphCache

public static void invalidateNodeGraphCache(hudson.model.Node buildNode)
Invalidate all graph caches for the specified buildNode.

Parameters:
buildNode - The buildNode whose graphs to invalidate


Copyright © 2004-2014. All Rights Reserved.