Trees | Indices | Help |
|
---|
|
1 ########################################################################### 2 # 3 # This program is part of Zenoss Core, an open source monitoring platform. 4 # Copyright (C) 2007, Zenoss Inc. 5 # 6 # This program is free software; you can redistribute it and/or modify it 7 # under the terms of the GNU General Public License version 2 as published by 8 # the Free Software Foundation. 9 # 10 # For complete information please visit: http://www.zenoss.com/oss/ 11 # 12 ########################################################################### 13 14 __doc__="""VruleGraphPoint 15 16 Handles GraphPoints that define an rrd VRULE 17 """ 18 19 import os 20 from GraphPoint import GraphPoint 21 from Globals import InitializeClass 22 2325 ''' This is here so than zope will let us copy/paste/rename 26 graphpoints. 27 ''' 28 gp = VruleGraphPoint(id) 29 context._setObject(gp.id, gp) 30 if REQUEST: 31 return context.callZenScreen(REQUEST)32 3335 36 meta_type = 'VruleGraphPoint' 37 38 time = 0 39 color = '' 40 legend = GraphPoint.DEFAULT_LEGEND 41 42 _properties = GraphPoint._properties + ( 43 {'id':'time', 'type':'integer', 'mode':'w'}, 44 {'id':'color', 'type':'string', 'mode':'w'}, 45 {'id':'legend', 'type':'string', 'mode':'w'}, 46 ) 47 50 51 54 5568 69 70 InitializeClass(VruleGraphPoint) 7158 ''' Build the graphing commands for this graphpoint 59 ''' 60 if not self.time: 61 return cmds 62 gopts = 'VRULE:%s%s' % (self.time, self.getColor(idx)) 63 if self.legend: 64 legend = self.talesEval(self.legend, context) 65 legend = self.escapeForRRD(legend) 66 gopts += ':%s' % legend 67 return cmds + [gopts]
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Thu Oct 25 16:28:52 2007 | http://epydoc.sourceforge.net |