184 |
my $ip = $1 || $client->peerhost; |
my $ip = $1 || $client->peerhost; |
185 |
if ( $ip ne $server::ip ) { |
if ( $ip ne $server::ip ) { |
186 |
my $hostname = client::conf( $ip, 'hostname' => $param->{hostname} ); |
my $hostname = client::conf( $ip, 'hostname' => $param->{hostname} ); |
187 |
my $deploy = client::conf( $ip, 'deploy' => $param->{deploy} ); |
|
188 |
|
my @table = ( |
189 |
|
'ip' => $ip, |
190 |
|
'hostname' => qq|<input type=text name=hostname value=$hostname>|, |
191 |
|
); |
192 |
|
|
193 |
|
my $deploy; |
194 |
|
|
195 |
|
if ( my $mac = client::mac( $ip ) ) { |
196 |
|
$deploy = client::conf( $ip, 'deploy' => $param->{deploy} ); |
197 |
|
push @table, ( |
198 |
|
'mac' => $mac, |
199 |
|
'deploy' => html::select( 'deploy', $deploy, config::available ) |
200 |
|
); |
201 |
|
$deploy = qq|<h2>PXElinux</h2>| . html::pre( config::for_ip( $ip ) ); |
202 |
|
} |
203 |
|
|
204 |
print $client $ok |
print $client $ok |
205 |
, qq|<form method=get>| |
, qq|<form method=get>| |
206 |
, html::table( 2, |
, html::table( 2, @table ), |
|
'ip' => $ip, |
|
|
'mac' => client::mac( $ip ), |
|
|
'hostname' => qq|<input type=text name=hostname value=$hostname>|, |
|
|
'deploy' => html::select( 'deploy', $deploy, config::available ), |
|
|
) |
|
207 |
, qq|<input type=submit value=change></form>| |
, qq|<input type=submit value=change></form>| |
208 |
, qq|<h2>PXElinux $deploy</h2><pre>| |
, $deploy |
|
, config::for_ip( $ip ) |
|
|
, qq|</pre>| |
|
209 |
; |
; |
210 |
|
|
211 |
if ( my $amt = client::conf( $ip, 'amt' ) ) { |
if ( my $amt = client::conf( $ip, 'amt' ) ) { |
212 |
print $client amt::info( $amt ); |
print $client qq|<h2>AMT</h2>|, amt::info( $amt ); |
213 |
} |
} |
214 |
} else { |
} else { |
215 |
print $client $ok |
print $client $ok |