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

Class RRDGraph

source code

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

Instance Methods [hide private]
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
 
getGraphCmds(self, context, rrdfile, template)
build the graph opts for a single rrdfile
source code
 
graphsetup(self)
Setup global graph parameters.
source code
 
buildCustomDS(self, gopts, rrdfile, template)
Build a list of DEF statements for the dsnames in this graph.
source code
 
buildDS(self, gopts, rrdfile, template, summary, multiid=-1)
Add commands to draw data sources in this graph.
source code
 
thresholds(self, gopts, context, template)
Add the hrule commands for any thresholds in this graph.
source code
 
addSummary(self, gopts)
Add summary labels for all graphed elements in gopts.
source code
 
dataSourceSum(self, gopts, src, pad=0, format="%0.2lf%s", ongraph=1)
Add the standard summary opts to a graph for variable src.
source code
 
getthreshcolor(self)
get a threshold color by working backwards down the color list
source code
 
gettype(self, idx)
Return the default graph type for a data source first is area rest are lines
source code

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, checkValidId, 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__

Class Variables [hide private]
  meta_type = 'RRDGraph'
  security = ClassSecurityInfo()
  dsnames = []
  sequence = 0
  height = 100
  width = 500
  threshmap = []
  units = ""
  log = False
  linewidth = 1
  base = False
  stacked = False
  summary = True
  miny = -1
  maxy = -1
  custom = ""
  hasSummary = True
  _properties = {'id': 'dsnames', 'type': 'lines', 'mode': 'w'},...
  _relations = "rrdTemplate", ToOne(ToManyCont, "Products.ZenMod...
  colors = '#00cc00', '#0000ff', '#00ffff', '#ff0000', '#ff9900'...
  factory_type_information = {'immediate_view': 'editRRDGraph', ...
  gelement = re.compile("^LINE|^AREA|^STACK", re.I).search

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

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

buildCustomDS(self, gopts, rrdfile, template)

source code 
Build a list of DEF statements for the dsnames in this graph. Their variable name will be dsname. These can then be used in a custom statement.

dataSourceSum(self, gopts, src, pad=0, format="%0.2lf%s", ongraph=1)

source code 
Add the standard summary opts to a graph for variable src. VDEF:src_last=src,LAST GPRINT:src_last:cur\:%0.2lf%s VDEF:src_avg=src,AVERAGE GPRINT:src_avg:avg\:%0.2lf%s VDEF:src_max=src,MAXIMUM GPRINT:src_max:max\:%0.2lf%s\j

Class Variable Details [hide private]

_properties

Value:
{'id': 'dsnames', 'type': 'lines', 'mode': 'w'}, {'id': 'sequence', 't\
ype': 'int', 'mode': 'w'}, {'id': 'height', 'type': 'int', 'mode': 'w'\
}, {'id': 'width', 'type': 'int', 'mode': 'w'}, {'id': 'units', 'type'\
: 'string', 'mode': 'w'}, {'id': 'linewidth', 'type': 'int', 'mode': '\
w'}, {'id': 'log', 'type': 'boolean', 'mode': 'w'}, {'id': 'base', 'ty\
pe': 'boolean', 'mode': 'w'}, {'id': 'stacked', 'type': 'boolean', 'mo\
de': 'w'}, {'id': 'summary', 'type': 'boolean', 'mode': 'w'}, {'id': '\
miny', 'type': 'int', 'mode': 'w'}, {'id': 'maxy', 'type': 'int', 'mod\
...

_relations

Value:
"rrdTemplate", ToOne(ToManyCont, "Products.ZenModel.RRDTemplate", "gra\
phs"),

colors

Value:
'#00cc00', '#0000ff', '#00ffff', '#ff0000', '#ff9900', '#cc0000', '#00\
00cc', '#0080c0', '#8080c0', '#ff0080', '#800080', '#0000a0', '#408080\
', '#808000', '#000000', '#00ff00', '#fb31fb', '#0080ff', '#ff8000', '\
#800000',

factory_type_information

Value:
{'immediate_view': 'editRRDGraph', 'actions':({'id': 'edit', 'name': '\
Graph', 'action': 'editRRDGraph', 'permissions':(Permissions.view,)},)\
},