Mercurial > templog
comparison web/log.py @ 363:99e7c2958a06
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 24 Jun 2012 23:48:25 +0800 |
parents | 8fea6144951b |
children | 62112fc2af21 |
comparison
equal
deleted
inserted
replaced
361:cfcd200c69da | 363:99e7c2958a06 |
---|---|
60 '-e', str(int(start+length)), | 60 '-e', str(int(start+length)), |
61 '-w', str(config.GRAPH_WIDTH), | 61 '-w', str(config.GRAPH_WIDTH), |
62 '-h', str(config.GRAPH_HEIGHT), | 62 '-h', str(config.GRAPH_HEIGHT), |
63 '--slope-mode', | 63 '--slope-mode', |
64 '--border', '0', | 64 '--border', '0', |
65 '--y-grid', '1:1', | |
66 '--grid-dash', '1:0', | |
67 '--color', 'GRID#00000000', | |
68 '--color', 'MGRID#aaaaaa', | |
65 '--color', 'BACK#ffffff', | 69 '--color', 'BACK#ffffff', |
66 '--alt-y-grid', | |
67 '--imgformat', 'PNG'] \ | 70 '--imgformat', 'PNG'] \ |
68 + graph_args | 71 + graph_args |
69 if config.GRAPH_FONT: | 72 if config.GRAPH_FONT: |
70 args += ['--font', 'DEFAULT:0:%s' % config.GRAPH_FONT] | 73 args += ['--font', 'DEFAULT:11:%s' % config.GRAPH_FONT] |
71 print>>sys.stderr, args | 74 print>>sys.stderr, args |
72 rrdtool.graph(*args) | 75 rrdtool.graph(*args) |
73 return tempf.read() | 76 return tempf.read() |
74 | 77 |
75 def sensor_update(sensor_id, measurements, first_real_time, time_step): | 78 def sensor_update(sensor_id, measurements, first_real_time, time_step): |