84 |
( $name, qq|<input name=$name value="$html" size=$size>| ) |
( $name, qq|<input name=$name value="$html" size=$size>| ) |
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>|; |
my $amt_ip = amt::ip($ip,$html); |
88 |
|
$html = qq|<a title="$html" href=http://$amt_ip:16992/logon.htm target=$amt_ip>$amt_ip</a>|; |
89 |
|
|
90 |
$html .= qq| power: | |
if ( $format ne 'inline' ) { |
91 |
. ( amt::power_on($ip) |
my $power = amt::power_on($ip); |
92 |
|
$html .= qq| power: | |
93 |
|
. ( $power |
94 |
? qq|<a href=/amt/PowerDown/$ip title="turn off">on</a>| |
? qq|<a href=/amt/PowerDown/$ip title="turn off">on</a>| |
95 |
: qq|<a href=/amt/PowerUp/$ip title="turn on" >off</a>| |
: qq|<a href=/amt/PowerUp/$ip title="turn on" >off</a>| |
96 |
) if $format ne 'inline'; |
); |
97 |
|
client::conf( $ip, 'power' => $power ? 'on' : 'off' ); |
98 |
|
} |
99 |
} elsif ( $name eq 'ssh' ) { |
} elsif ( $name eq 'ssh' ) { |
100 |
$html =~ s{\s(\S{16}).+(\S{16})\s}{ $1..$2 }; |
$html =~ s{\s(\S{16}).+(\S{16})\s}{ $1..$2 }; |
101 |
chomp($html); |
chomp($html); |
110 |
qq|<em>$name</em> $html<br>| |
qq|<em>$name</em> $html<br>| |
111 |
} |
} |
112 |
} |
} |
113 |
} sort keys %$conf; |
} grep { length($conf->{$_}) > 0 } sort keys %$conf; |
114 |
|
|
115 |
$format eq 'inline' ? join("\n", @opts) : @opts; |
$format eq 'inline' ? join("\n", @opts) : @opts; |
116 |
} |
} |