diff options
author | Pim van den Berg | 2013-12-29 16:27:24 +0100 |
---|---|---|
committer | Pim van den Berg | 2013-12-29 16:28:38 +0100 |
commit | 1e815e7c23b416acb3b8e88acdb275416c0afa1a (patch) | |
tree | a7d18912b44f734a6a9f2435e6697e69bb8ce3a1 | |
parent | Merge pull request #38 from oohlaf/timezone (diff) | |
download | apt-panopticon_cgp-1e815e7c23b416acb3b8e88acdb275416c0afa1a.zip apt-panopticon_cgp-1e815e7c23b416acb3b8e88acdb275416c0afa1a.tar.gz apt-panopticon_cgp-1e815e7c23b416acb3b8e88acdb275416c0afa1a.tar.bz2 apt-panopticon_cgp-1e815e7c23b416acb3b8e88acdb275416c0afa1a.tar.xz |
automatic page refresh support + config setting
Closes: https://github.com/pommi/CGP/pull/35
-rw-r--r-- | conf/config.php | 3 | ||||
-rw-r--r-- | inc/html.inc.php | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/conf/config.php b/conf/config.php index 7107841..fc10a43 100644 --- a/conf/config.php +++ b/conf/config.php | |||
@@ -54,6 +54,9 @@ $CONFIG['graph_smooth'] = false; | |||
54 | # browser cache time for the graphs (in seconds) | 54 | # browser cache time for the graphs (in seconds) |
55 | $CONFIG['cache'] = 90; | 55 | $CONFIG['cache'] = 90; |
56 | 56 | ||
57 | # page refresh (in seconds) | ||
58 | $CONFIG['page_refresh'] = ''; | ||
59 | |||
57 | # default width/height of the graphs | 60 | # default width/height of the graphs |
58 | $CONFIG['width'] = 400; | 61 | $CONFIG['width'] = 400; |
59 | $CONFIG['heigth'] = 175; | 62 | $CONFIG['heigth'] = 175; |
diff --git a/inc/html.inc.php b/inc/html.inc.php index 9a5344b..478045c 100644 --- a/inc/html.inc.php +++ b/inc/html.inc.php | |||
@@ -22,6 +22,12 @@ function html_start() { | |||
22 | <meta name="viewport" content="width=1050, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes"> | 22 | <meta name="viewport" content="width=1050, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes"> |
23 | 23 | ||
24 | EOT; | 24 | EOT; |
25 | if (isset($CONFIG['page_refresh']) && is_numeric($CONFIG['page_refresh'])) { | ||
26 | echo <<<EOT | ||
27 | <meta http-equiv="refresh" content="{$CONFIG['page_refresh']}"> | ||
28 | |||
29 | EOT; | ||
30 | } | ||
25 | 31 | ||
26 | if ($CONFIG['graph_type'] == 'canvas') { | 32 | if ($CONFIG['graph_type'] == 'canvas') { |
27 | echo <<<EOT | 33 | echo <<<EOT |