diff options
| author | Pim van den Berg | 2012-12-28 20:25:29 +0100 |
|---|---|---|
| committer | Pim van den Berg | 2012-12-28 20:25:29 +0100 |
| commit | 79ac52d54a51acdbd469f2d48890eb11e04ac991 (patch) | |
| tree | 2bed6c9c58d6279a0f6da9083107017312d5bfe5 /host.php | |
| parent | don't show plugins the host doesn't have (diff) | |
| download | apt-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 '')
| -rw-r--r-- | host.php | 9 |
1 files changed, 2 insertions, 7 deletions
| @@ -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 | ||
| 10 | if (!$plugin) { | 10 | $selected_plugins = !$plugin ? $CONFIG['overview'] : array($plugin); |
| 11 | $selected_plugins = $CONFIG['overview']; | ||
| 12 | } | ||
| 13 | else { | ||
| 14 | $selected_plugins = array($plugin); | ||
| 15 | } | ||
| 16 | 11 | ||
| 17 | html_start(); | 12 | html_start(); |
| 18 | 13 | ||
| @@ -25,7 +20,7 @@ if(!$plugins) { | |||
| 25 | return false; | 20 | return false; |
| 26 | } | 21 | } |
| 27 | 22 | ||
| 28 | plugins_list($host, $CONFIG['overview'], $plugins, $selected_plugins); | 23 | plugins_list($host, $selected_plugins); |
| 29 | 24 | ||
| 30 | echo '<div class="graphs">'; | 25 | echo '<div class="graphs">'; |
| 31 | foreach ($selected_plugins as $selected_plugin) { | 26 | foreach ($selected_plugins as $selected_plugin) { |
