1
2
3
4
5
6
7
8
9
10
11
12
13
14 __doc__="""GprintGraphPoint
15
16 Handles GraphPoints that define an rrd GPRINT
17 """
18
19 import os
20 from GraphPoint import GraphPoint
21 from Globals import InitializeClass
22
23
32
33
35
36 meta_type = 'GprintGraphPoint'
37
38 vname = ''
39 format = ''
40 strftime = ''
41
42 _properties = GraphPoint._properties + (
43 {'id':'vname', 'type':'string', 'mode':'w'},
44 {'id':'format', 'type':'string', 'mode':'w'},
45 {'id':'strftime', 'type':'string', 'mode':'w'},
46 )
47
48
51
52
55
56
57 - def getGraphCmds(self, cmds, context, rrdDir, addSummary, idx,
58 multiid=-1, prefix=''):
59 ''' Build the graphing commands for this graphpoint
60 '''
61 return cmds + ['GPRINT:%s:%s%s' % (
62 self.addPrefix(prefix, self.vname),
63 (self.format or self.DEFAULT_FORMAT).replace(':', '\:'),
64 self.strftime and ':%s' % self.strftime or '')]
65
66
67 InitializeClass(GprintGraphPoint)
68