From 28321a3c54c6db1812395c80d5cc026a84614e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Rossigneux?= Date: Mon, 4 Feb 2013 23:05:39 +0100 Subject: [PATCH] Add period in graph titles. Change-Id: I876d7812552421d469a5bbebc129585ae2842ac4 --- kwapi/plugins/rrd/rrd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kwapi/plugins/rrd/rrd.py b/kwapi/plugins/rrd/rrd.py index f612640..cdc77da 100644 --- a/kwapi/plugins/rrd/rrd.py +++ b/kwapi/plugins/rrd/rrd.py @@ -151,10 +151,11 @@ def build_graph(scale, probe=None): # Build required (PNG file not found or outdated) if not os.path.exists(png_file) or os.path.getmtime(png_file) < \ time.time() - scales[scale][0]['resolution']: + scale_label = ' (' + scales[scale][0]['label'] + ')' if probe is not None: # Specific arguments for probe graph args = [png_file, - '--title', probe, + '--title', probe + scale_label, '--width', '497', '--height', '187', '--upper-limit', str(cfg.CONF.max_watts), @@ -162,7 +163,7 @@ def build_graph(scale, probe=None): else: # Specific arguments for summary graph args = [png_file, - '--title', 'Summary', + '--title', 'Summary' + scale_label, '--width', '694', '--height', '261', ]