1 |
package html; |
package html; |
2 |
|
|
3 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
4 |
|
use amt; |
5 |
|
|
6 |
sub table { |
sub table { |
7 |
my $cols = shift; |
my $cols = shift; |
85 |
} else { |
} else { |
86 |
if ( $name eq 'amt' ) { |
if ( $name eq 'amt' ) { |
87 |
$html = qq|<a title="$html" href=http://$ip:16992/logon.htm>logon</a>|; |
$html = qq|<a title="$html" href=http://$ip:16992/logon.htm>logon</a>|; |
88 |
|
|
89 |
|
$html .= qq| power: | |
90 |
|
. ( amt::power_on($ip) |
91 |
|
? qq|<a href=/amt/PowerDown/$ip title="turn off">on</a>| |
92 |
|
: qq|<a href=/amt/PowerUp/$ip title="turn on" >off</a>| |
93 |
|
) if $format ne 'inline'; |
94 |
} elsif ( $name eq 'ssh' ) { |
} elsif ( $name eq 'ssh' ) { |
95 |
$html =~ s{\s(\S{16}).+(\S{16})\s}{ $1..$2 }; |
$html =~ s{\s(\S{16}).+(\S{16})\s}{ $1..$2 }; |
96 |
chomp($html); |
chomp($html); |