--- lib/PXElator/html.pm 2009/08/31 15:14:43 386 +++ lib/PXElator/html.pm 2011/02/12 14:47:00 559 @@ -51,7 +51,6 @@ , qq|| - , qq|| ); } @@ -71,7 +70,7 @@ my ($ip,$conf,$format) = @_; my @editable = splice(@_,3); - warn "# conf ",dump( $ip, $conf, $format, [ @editable ] ); +# warn "# conf ",dump( $ip, $conf, $format, [ @editable ] ); $format ||= 'inline'; @@ -85,7 +84,8 @@ } else { if ( $name eq 'amt' ) { my $amt_ip = amt::ip($ip,$html); - $html = qq|$amt_ip|; + # $html contains password! + $html = qq|$amt_ip|; if ( $format ne 'inline' ) { my $power = amt::power_on($ip); @@ -99,15 +99,20 @@ } elsif ( $name eq 'ssh' ) { $html =~ s{\s(\S{16}).+(\S{16})\s}{ $1..$2 }; chomp($html); - } - $html = qq|
$html
| - unless - $html =~ s{\b(\S+)\t(\S+)\t(\S+)\b}{$3 }gs; + } elsif ( $name eq 'kvm' ) { + $html = qq|$html|; + } elsif ( $name eq 'munin' ) { + $html = join("\n", map { my $url = $_; $url =~ s/-d\w+\.\w+$/.html/; qq|
| } split(/\s+/s,$html)); + } elsif ( $name eq 'ports' ) { + $html =~ s{\b(\S+)\t(\S+)\t(\S+)\b}{$3 }gs; + } else { + $html = qq|$html|; + }; if ( $format =~ /edit|table/ ) { ( $name, $html ); } else { - qq|$name $html
| + qq|
$name $html
| } } } grep { length($conf->{$_}) > 0 } sort keys %$conf;