include munin graphs and generate link
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 26 Aug 2010 19:27:49 +0000 (19:27 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 26 Aug 2010 19:27:49 +0000 (19:27 +0000)
lib/PXElator/html.pm

index 905915b..f464c3e 100644 (file)
@@ -101,6 +101,8 @@ sub conf {
                                chomp($html);
                        } elsif ( $name eq 'kvm' ) {
                                $html = qq|<a href="/start_stop/kvm?nr=$html">$html</a>|;
+                       } elsif ( $name eq 'munin' ) {
+                               $html = join("\n", map { my $url = $_; $url =~ s/-d\w+\.\w+$/.html/; qq|<a href="$url"><img src="$_"></a>| } split(/\s+/s,$html));
                        }
                        $html = qq|<tt>$html</tt>|
                        unless