aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPim van den Berg2014-01-12 14:56:19 +0100
committerPim van den Berg2014-01-12 14:56:19 +0100
commit39ca2ff699bac79043bbeac9534dbf1f28df4d2b (patch)
treeee3e2551e9b734358ba315e5a2a21efcfc569dbb
parentAdd a configuration option for sync/async choice for the canvas graphs (diff)
downloadapt-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.php2
-rw-r--r--detail.php4
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
diff --git a/detail.php b/detail.php
index 524c708..4eacc80 100644
--- a/detail.php
+++ b/detail.php
@@ -11,6 +11,10 @@ if (empty($_GET['x']))
11if (empty($_GET['y'])) 11if (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
15if ($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');