diff options
author | Pim van den Berg | 2009-12-05 20:23:25 +0100 |
---|---|---|
committer | Pim van den Berg | 2009-12-05 20:23:25 +0100 |
commit | 1a076098050969d217f7abe8ec2102719fcba21d (patch) | |
tree | a44dedb92ce9687b5465963292de427dc08d0dd6 /host.php | |
parent | temporary disable swap_io (diff) | |
download | apt-panopticon_cgp-1a076098050969d217f7abe8ec2102719fcba21d.zip apt-panopticon_cgp-1a076098050969d217f7abe8ec2102719fcba21d.tar.gz apt-panopticon_cgp-1a076098050969d217f7abe8ec2102719fcba21d.tar.bz2 apt-panopticon_cgp-1a076098050969d217f7abe8ec2102719fcba21d.tar.xz |
load plugins on the host page via ajax
Diffstat (limited to '')
-rw-r--r-- | host.php | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -21,21 +21,24 @@ if(!$plugins) { | |||
21 | # first the ones defined in overview | 21 | # first the ones defined in overview |
22 | foreach($CONFIG['overview'] as $plugin) { | 22 | foreach($CONFIG['overview'] as $plugin) { |
23 | if (in_array($plugin, $plugins)) { | 23 | if (in_array($plugin, $plugins)) { |
24 | printf("<h3><img src=\"%s/layout/minus.gif\" alt=\"[-]\"> %s</h3>\n", $CONFIG['weburl'], $plugin); | 24 | printf('<div id="%s">'."\n", $plugin); |
25 | printf("<h3><span class=\"point\" onclick=\"javascript:rmP('%s','%s')\"><img src=\"%s/layout/minus.gif\" alt=\"[-]\"> %s</span></h3>\n", $host, $plugin, $CONFIG['weburl'], $plugin); | ||
25 | graphs_from_plugin($host, $plugin); | 26 | graphs_from_plugin($host, $plugin); |
27 | print "</div>\n"; | ||
26 | } | 28 | } |
27 | } | 29 | } |
28 | 30 | ||
29 | # other plugins | 31 | # other plugins |
30 | foreach($plugins as $plugin) { | 32 | foreach($plugins as $plugin) { |
31 | if (!in_array($plugin, $CONFIG['overview'])) { | 33 | if (!in_array($plugin, $CONFIG['overview'])) { |
32 | $url = sprintf('<a href="%s/host.php?h=%s&p=%s">%s</a>'."\n", $CONFIG['weburl'], $host, $plugin, $plugin); | 34 | printf('<div id="%s">'."\n", $plugin); |
33 | if ($splugin == $plugin) { | 35 | if ($splugin == $plugin) { |
34 | printf("<h3><img src=\"%s/layout/minus.gif\" alt=\"[-]\"> %s</h3>\n", $CONFIG['weburl'], $url); | 36 | printf("<h3><span class=\"point\" onclick=\"javascript:rmP('%s','%s')\"><img src=\"%s/layout/minus.gif\" alt=\"[-]\"> %s</span></h3>\n", $host, $plugin, $CONFIG['weburl'], $plugin); |
35 | graphs_from_plugin($host, $plugin); | 37 | graphs_from_plugin($host, $plugin); |
36 | } else { | 38 | } else { |
37 | printf("<h3><img src=\"%s/layout/plus.gif\" alt=\"[+]\"> %s</h3>\n", $CONFIG['weburl'], $url); | 39 | printf("<h3><span class=\"point\" onclick=\"javascript:getP('%s','%s')\"><img src=\"%s/layout/plus.gif\" alt=\"[+]\"> %s</span></h3>\n", $host, $plugin, $CONFIG['weburl'], $plugin); |
38 | } | 40 | } |
41 | print "</div>\n"; | ||
39 | } | 42 | } |
40 | } | 43 | } |
41 | 44 | ||