diff options
author | Pim van den Berg | 2010-01-12 20:17:33 +0100 |
---|---|---|
committer | Pim van den Berg | 2010-01-12 20:19:52 +0100 |
commit | 010b7b232dd1117fa4850065c4edde74298dcfab (patch) | |
tree | d2d2fb3b6e9dcef81d09d2abbd5a0da388e84d51 /index.php | |
parent | make browser cache time for images configurable (diff) | |
download | apt-panopticon_cgp-010b7b232dd1117fa4850065c4edde74298dcfab.zip apt-panopticon_cgp-010b7b232dd1117fa4850065c4edde74298dcfab.tar.gz apt-panopticon_cgp-010b7b232dd1117fa4850065c4edde74298dcfab.tar.bz2 apt-panopticon_cgp-010b7b232dd1117fa4850065c4edde74298dcfab.tar.xz |
show error when no hosts are found in datadir
Diffstat (limited to '')
-rw-r--r-- | index.php | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -18,7 +18,8 @@ if (is_array($CONFIG['cat'])) { | |||
18 | } | 18 | } |
19 | 19 | ||
20 | # search for uncategorized hosts | 20 | # search for uncategorized hosts |
21 | $chosts = collectd_hosts(); | 21 | if(!$chosts = collectd_hosts()) |
22 | printf('<p class="warn">Error: No Collectd hosts found in <em>%s</em></p>', $CONFIG['datadir']); | ||
22 | $uhosts = array_diff($chosts, $h); | 23 | $uhosts = array_diff($chosts, $h); |
23 | 24 | ||
24 | # show all uncategorized hosts | 25 | # show all uncategorized hosts |