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__="""ShiftGraphPoint 12 13 Handles GraphPoints that define an rrd SHIFT 14 """ 15 16 from GraphPoint import GraphPoint 17 from Globals import InitializeClass 18 from Products.ZenUtils.deprecated import deprecated23 ''' This is here so than zope will let us copy/paste/rename 24 graphpoints. 25 ''' 26 gp = ShiftGraphPoint(id) 27 context._setObject(gp.id, gp) 28 if REQUEST: 29 return context.callZenScreen(REQUEST)3033 34 meta_type = 'ShiftGraphPoint' 35 rrdFile = None 36 vname = '' 37 offset = 0 38 39 _properties = GraphPoint._properties + ( 40 {'id':'vname', 'type':'string', 'mode':'w'}, 41 {'id':'offset', 'type':'long', 'mode':'w'}, 42 ) 4365 66 67 InitializeClass(ShiftGraphPoint) 6845 return '%s' % self.offset46 47 50 5154 ''' Build the graphing commands for this graphpoint 55 ''' 56 from Products.ZenUtils.Utils import unused 57 unused(multiid, rrdDir) 58 if not (self.rrdFile and self.dsName and self.cFunc): 59 return cmds 60 61 offset = self.talesEval(self.offset, context) 62 63 return cmds + ['SHIFT:%s:%s' % ( 64 self.addPrefix(prefix, self.vname), offset or 0)]
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1.1812 on Mon Jul 30 17:11:25 2012 | http://epydoc.sourceforge.net |