Package ZenModel :: Module GraphDefinition :: Class GraphDefinition
[hide private]
[frames] | no frames]

Class GraphDefinition

source code

                                                   object --+        
                                                            |        
                                    ZenModelBase.ZenModelBase --+    
                                                                |    
Products.ZenRelations.RelationshipManager.RelationshipManager --+    
                                                                |    
                                      ExtensionClass.Base --+   |    
                                                            |   |    
                                       OFS.History.Historical --+    
                                                                |    
                                                   object --+   |    
                                                            |   |    
                                          ZenPacker.ZenPacker --+    
                                                                |    
                                            ZenModelRM.ZenModelRM --+
                                                                    |
                                                       object --+   |
                                                                |   |
                                          ZenPackable.ZenPackable --+
                                                                    |
                                                                   GraphDefinition

Instance Methods [hide private]

Inherited from ZenModelRM.ZenModelRM: __init__, changePythonClass, creator, editableDeviceList, findChild, getCreatedTimeString, getDmdKey, getModificationTimeString, getSubObjects, getTreeItems, getZenRootNode, index_object, primarySortKey, reindex_all, rename, unindex_object, viewName, zmanage_addProperty, zmanage_delObjects, zmanage_delProperties, zmanage_editProperties, zmanage_exportObject, zmanage_importObject, zmanage_importObjects

Inherited from ZenModelBase.ZenModelBase: __call__, __hash__, all_meta_types, aqBaseHasAttr, callZenScreen, checkRemotePerm, createHierarchyObj, custPropertyIds, custPropertyMap, getBreadCrumbUrlPath, getDmd, getDmdObj, getDmdRoot, getHierarchyObj, getIconPath, getIdLink, getNowString, getObjByPath, getPrimaryDmdId, getUnusedId, getZ, getZopeObj, helpLink, isLocalName, manage_deleteObjects, prepId, saveCustProperties, todayDate, urlLink, view, visibleCustPropertyMap, yesterdayDate, zenScreenUrl, zenpathjoin, zenpathsplit, zentinelTabs

Inherited from OFS.History.Historical: manage_afterHistoryCopy, manage_beforeHistoryCopy, manage_change_history, manage_historicalComparison, manage_historyCompare, manage_historyCopy

Inherited from ZenPacker.ZenPacker: addToZenPack, eligiblePacks, findObject

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

    'id':'summary', 'type':'boolean', 'mode':'w'},
 
getGraphPoints(self, includeThresholds=True)
Return ordered list of graph points
source code
 
getThresholdGraphPoints(self)
Get ordered list of threshold graph points
source code
 
isThresholdGraphed(self, threshId)
Return true if there is a thresholdgraphpoint with threshId=threshid
source code
 
isDataPointGraphed(self, dpName)
Return true if there is at least one graphpoint with a dsName equal to dpName.
source code
list
>>> dmd.Devices.Server.breadCrumbs()
[('/zport/dmd/Devices', 'Devices'), 
    ('/zport/dmd/Devices/Server', 'Server')]
breadCrumbs(self, terminator='dmd')
Return the breadcrumb links for this object add ActionRules list.
source code
boolean
>>> dmd.Devices.checkValidId('^*')
'The id "^*" contains characters illegal in URLs.'
>>> dmd.Devices.checkValidId('Server')
'The id "Server" is invalid - it is already in use.'
>>> dmd.Devices.checkValidId('ZenTestId')
True
checkValidId(self, id, prep_id=False)
Checks a valid id
source code
 
getGraphPointDescriptions(self) source code
 
getGraphPointsNames(self)
Return list of graph point ids
source code
 
getGraphPointNamesString(self)
Return a string that lists the names of the graphpoints used in this graph definition.
source code
 
getGraphPointOptions(self)
Used by dialog_addGraphPoint to construct the list of available graphpoint types.
source code
 
createGraphPoint(self, cls, newId)
Create the graphpoint with the given id or something similar and add to self.graphPoints
source code
 
manage_addCustomGraphPoint(self, new_id, flavor, REQUEST=None)
Create a new graphpoint of the given class and id
source code
 
manage_addDataPointGraphPoints(self, dpNames, includeThresholds=False, REQUEST=None)
Create new graph points The migrate script graphDefinitions and friends depends on the first element in newGps being the DataPointGraphPoint when only one name is passed in dpNames.
source code
 
addThresholdsForDataPoint(self, dpName)
Make sure that Threshold graph points exist for all thresholds that use the given dpName.
source code
 
manage_addThresholdGraphPoints(self, threshNames, REQUEST=None)
Create new graph points
source code
 
manage_deleteGraphPoints(self, ids=(), REQUEST=None)
Deleted given graphpoints
source code
 
manage_resequenceGraphPoints(self, seqmap=(), origseq=(), REQUEST=None)
Reorder the sequence of the GraphPoints.
source code
 
getDataPointOptions(self)
Return a list of (value, name) tuples for the list of datapoints which the user selects from to create new graphpoints.
source code
 
getThresholdOptions(self)
Return a list of (value, name) tuples for the list of thresholds which the user selects from to create new graphpoints.
source code
 
getGraphCmds(self, context, rrdDir, multiid=-1, upToPoint=None, includeSetup=True, includeThresholds=True, prefix='', cmds=None, idxOffset=0)
build the graph opts for a single rrdfile
source code
 
getRRDVariables(self, upToPoint=None)
Return list of rrd variable names that are defined by DEF, CDEF or VDEF statements in the rrd commands.
source code
 
getFakeGraphCmds(self, upToPoint=None)
Used to display the graph commands (or a reasonable likeness) to the user
source code
 
graphsetup(self)
Setup global graph parameters.
source code
 
getDataPointGraphPoints(self, dpName)
Return a list of DataPointGraphPoints that use the given dpName
source code
 
getUniqueDpNames(self, limit=None)
Get a list of all unique datapoint names
source code
 
getUniqueThresholdNames(self, limit=100)
Get a list of all unique threshold names
source code
Class Variables [hide private]
  meta_type = 'GraphDefinition'
  height = 100
  width = 500
  units = ""
  log = False
  base = False
  miny = -1
  maxy = -1
  custom = ""
  hasSummary = True
  sequence = 0

Inherited from ZenModelRM.ZenModelRM: default_catalog, isInTree

Inherited from ZenModelBase.ZenModelBase: index_html, sub_meta_types

Inherited from OFS.History.Historical: HistoricalRevisions, __ac_permissions__, manage_change_history_page, manage_options

Inherited from OFS.History.Historical (private): _manage_historyComparePage

    'id':'summary', 'type':'boolean', 'mode':'w'},
  _properties = {'id': 'height', 'type': 'int', 'mode': 'w'}, {'...
  _relations = "rrdTemplate", ToOne(ToManyCont, "Products.ZenMod...
  factory_type_information = {'immediate_view': 'editGraphDefini...
  security = ClassSecurityInfo()
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

breadCrumbs(self, terminator='dmd')

source code 
Return the breadcrumb links for this object add ActionRules list. [('url','id'), ...]
Returns: list
>>> dmd.Devices.Server.breadCrumbs()
[('/zport/dmd/Devices', 'Devices'), 
    ('/zport/dmd/Devices/Server', 'Server')]
List of tuples to create a bread crumbs
Overrides: ZenModelBase.ZenModelBase.breadCrumbs

checkValidId(self, id, prep_id=False)

source code 
Checks a valid id
Returns: boolean
>>> dmd.Devices.checkValidId('^*')
'The id "^*" contains characters illegal in URLs.'
>>> dmd.Devices.checkValidId('Server')
'The id "Server" is invalid - it is already in use.'
>>> dmd.Devices.checkValidId('ZenTestId')
True
Overrides: ZenModelBase.ZenModelBase.checkValidId

getGraphPointNamesString(self)

source code 
Return a string that lists the names of the graphpoints used in this graph definition. If this graph definition has a perf template then note in the string which graphpoints are broken (in that they refer to nonexistent datapoints.)

addThresholdsForDataPoint(self, dpName)

source code 
Make sure that Threshold graph points exist for all thresholds that use the given dpName. Return a list of all graphpoints created by this call.

getRRDVariables(self, upToPoint=None)

source code 
Return list of rrd variable names that are defined by DEF, CDEF or VDEF statements in the rrd commands. If upToPoint is not None then only consider statements generated by graphoints where sequence < upToPoint

Class Variable Details [hide private]

_properties

Value:
{'id': 'height', 'type': 'int', 'mode': 'w'}, {'id': 'width', 'type': \
'int', 'mode': 'w'}, {'id': 'units', 'type': 'string', 'mode': 'w'}, {\
'id': 'log', 'type': 'boolean', 'mode': 'w'}, {'id': 'base', 'type': '\
boolean', 'mode': 'w'}, {'id': 'miny', 'type': 'int', 'mode': 'w'}, {'\
id': 'maxy', 'type': 'int', 'mode': 'w'}, {'id': 'custom', 'type': 'te\
xt', 'mode': 'w'}, {'id': 'hasSummary', 'type': 'boolean', 'mode': 'w'\
}, {'id': 'sequence', 'type': 'long', 'mode': 'w'},

_relations

Value:
"rrdTemplate", ToOne(ToManyCont, "Products.ZenModel.RRDTemplate", "gra\
phDefs"), ('report', ToOne(ToManyCont, 'Products.ZenModel.MultiGraphRe\
port', 'graphDefs')), ('graphPoints', ToManyCont(ToOne, 'Products.ZenM\
odel.GraphPoint', 'graphDef')), ('reportClass', ToOne(ToManyCont, 'Pro\
ducts.ZenModel.MultiGraphReportClass', 'graphDefs')),

factory_type_information

Value:
{'immediate_view': 'editGraphDefinition', 'actions':({'id': 'edit', 'n\
ame': 'Graph Definition', 'action': 'editGraphDefinition', 'permission\
s':(Permissions.view,)}, {'id': 'editCustom', 'name': 'Graph Custom De\
finition', 'action': 'editCustGraphDefinition', 'permissions':(Permiss\
ions.view,)}, {'id': 'viewCommands', 'name': 'Graph Commands', 'action\
': 'viewGraphCommands', 'permissions':(Permissions.view,)},)},