Trees | Indices | Help |
|
---|
|
1 ############################################################################## 2 # 3 # Copyright (C) Zenoss, Inc. 2007, all rights reserved. 4 # 5 # This content is made available according to terms specified in 6 # License.zenoss under the directory where your Zenoss product is installed. 7 # 8 ############################################################################## 9 10 11 __doc__=""" 12 13 Handles GraphPoints that define an rrd Line 14 """ 15 16 from GraphPoint import GraphPoint 17 from Globals import InitializeClass 18 1921 ''' This is here so than zope will let us copy/paste/rename 22 graphpoints. 23 ''' 24 gp = HruleGraphPoint(id) 25 context._setObject(gp.id, gp) 26 if REQUEST: 27 return context.callZenScreen(REQUEST)28 2931 32 meta_type = 'HruleGraphPoint' 33 34 value = '' 35 color = '' 36 legend = GraphPoint.DEFAULT_LEGEND 37 38 _properties = GraphPoint._properties + ( 39 {'id':'value', 'type':'string', 'mode':'w'}, 40 {'id':'color', 'type':'string', 'mode':'w'}, 41 {'id':'legend', 'type':'string', 'mode':'w'}, 42 ) 43 44 47 48 51 5265 66 67 InitializeClass(HruleGraphPoint) 6855 ''' Build the graphing commands for this graphpoint 56 ''' 57 from Products.ZenUtils.Utils import unused 58 unused(multiid, prefix, rrdDir) 59 legend = self.talesEval(self.legend, context) 60 legend = self.escapeForRRD(legend) 61 return cmds + ['HRULE:%s%s%s' % ( 62 self.value or 0, 63 self.getColor(idx), 64 legend and ':%s' % legend or '')]
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1.1812 on Mon Jul 30 17:11:14 2012 | http://epydoc.sourceforge.net |