aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/host.php
diff options
context:
space:
mode:
authorPim van den Berg2012-12-28 20:25:29 +0100
committerPim van den Berg2012-12-28 20:25:29 +0100
commit79ac52d54a51acdbd469f2d48890eb11e04ac991 (patch)
tree2bed6c9c58d6279a0f6da9083107017312d5bfe5 /host.php
parentdon't show plugins the host doesn't have (diff)
downloadapt-panopticon_cgp-79ac52d54a51acdbd469f2d48890eb11e04ac991.zip
apt-panopticon_cgp-79ac52d54a51acdbd469f2d48890eb11e04ac991.tar.gz
apt-panopticon_cgp-79ac52d54a51acdbd469f2d48890eb11e04ac991.tar.bz2
apt-panopticon_cgp-79ac52d54a51acdbd469f2d48890eb11e04ac991.tar.xz
remove arguments overview_plugins and other_plugins from plugins_list function
Those can be gathered within the function.
Diffstat (limited to 'host.php')
-rw-r--r--host.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/host.php b/host.php
index 42121ea..71d786a 100644
--- a/host.php
+++ b/host.php
@@ -7,12 +7,7 @@ require_once 'inc/collectd.inc.php';
7$host = validate_get(GET('h'), 'host'); 7$host = validate_get(GET('h'), 'host');
8$plugin = validate_get(GET('p'), 'plugin'); 8$plugin = validate_get(GET('p'), 'plugin');
9 9
10if (!$plugin) { 10$selected_plugins = !$plugin ? $CONFIG['overview'] : array($plugin);
11 $selected_plugins = $CONFIG['overview'];
12}
13else {
14 $selected_plugins = array($plugin);
15}
16 11
17html_start(); 12html_start();
18 13
@@ -25,7 +20,7 @@ if(!$plugins) {
25 return false; 20 return false;
26} 21}
27 22
28plugins_list($host, $CONFIG['overview'], $plugins, $selected_plugins); 23plugins_list($host, $selected_plugins);
29 24
30echo '<div class="graphs">'; 25echo '<div class="graphs">';
31foreach ($selected_plugins as $selected_plugin) { 26foreach ($selected_plugins as $selected_plugin) {