diff options
author | Pim van den Berg | 2014-01-12 14:56:19 +0100 |
---|---|---|
committer | Pim van den Berg | 2014-01-12 14:56:19 +0100 |
commit | 39ca2ff699bac79043bbeac9534dbf1f28df4d2b (patch) | |
tree | ee3e2551e9b734358ba315e5a2a21efcfc569dbb | |
parent | Add a configuration option for sync/async choice for the canvas graphs (diff) | |
download | apt-panopticon_cgp-39ca2ff699bac79043bbeac9534dbf1f28df4d2b.zip apt-panopticon_cgp-39ca2ff699bac79043bbeac9534dbf1f28df4d2b.tar.gz apt-panopticon_cgp-39ca2ff699bac79043bbeac9534dbf1f28df4d2b.tar.bz2 apt-panopticon_cgp-39ca2ff699bac79043bbeac9534dbf1f28df4d2b.tar.xz |
add graph_type "hybrid" to show canvas on detail page, png on the others
Diffstat (limited to '')
-rw-r--r-- | conf/config.php | 2 | ||||
-rw-r--r-- | detail.php | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/conf/config.php b/conf/config.php index b808a70..f2fab29 100644 --- a/conf/config.php +++ b/conf/config.php | |||
@@ -42,7 +42,7 @@ $CONFIG['term'] = array( | |||
42 | # show graphs in bits or bytes | 42 | # show graphs in bits or bytes |
43 | $CONFIG['network_datasize'] = 'bytes'; | 43 | $CONFIG['network_datasize'] = 'bytes'; |
44 | 44 | ||
45 | # png or canvas graphs | 45 | # "png", "canvas" or "hybrid" (canvas on detail page, png on the others) graphs |
46 | $CONFIG['graph_type'] = 'png'; | 46 | $CONFIG['graph_type'] = 'png'; |
47 | 47 | ||
48 | # For canvas graphs, use 'async' or 'sync' fetch method | 48 | # For canvas graphs, use 'async' or 'sync' fetch method |
@@ -11,6 +11,10 @@ if (empty($_GET['x'])) | |||
11 | if (empty($_GET['y'])) | 11 | if (empty($_GET['y'])) |
12 | $_GET['y'] = $CONFIG['detail-height']; | 12 | $_GET['y'] = $CONFIG['detail-height']; |
13 | 13 | ||
14 | # set graph_type to canvas if hybrid | ||
15 | if ($CONFIG['graph_type'] == 'hybrid') | ||
16 | $CONFIG['graph_type'] = 'canvas'; | ||
17 | |||
14 | $host = validate_get(GET('h'), 'host'); | 18 | $host = validate_get(GET('h'), 'host'); |
15 | $plugin = validate_get(GET('p'), 'plugin'); | 19 | $plugin = validate_get(GET('p'), 'plugin'); |
16 | $pinstance = validate_get(GET('pi'), 'pinstance'); | 20 | $pinstance = validate_get(GET('pi'), 'pinstance'); |