[! use strict; use Proxmox::Utils; use Proxmox::Form; use Proxmox::LogReader; use Proxmox::HTMLTable; !] [- my $cinfo = $fdat{__cinfo}; my $cid = $fdat{cid} || $udat{__cid} || $cinfo->{local}->{cid}; $udat{__cid} = $fdat{cid} if defined ($fdat{cid}); my $out = ""; if ($cinfo->{local}->{role} ne '-') { my $frm = Proxmox::Form->new (\%fdat); my @nodes; foreach my $ni (@{$cinfo->{nodes}}) { if ($ni->{cid} == $cinfo->{local}->{cid}) { push @nodes, [$ni->{cid}, "localhost ($ni->{ip})"]; } else { push @nodes, [$ni->{cid}, "$ni->{name} ($ni->{ip})"]; } } $frm->add_element("cid", "dynamicdropdown", $cid,'', \@nodes); my $html_form = $frm->out_js_code() . $frm->out_formheader(); $html_form .= ""; $html_form .= "
Cluster node selection: "; $html_form .= $frm->out_element("cid"); $html_form .= $frm->out_formfooter(); $out .= $html_form . "
" . __("Log file is empty") . ".
" } print OUT $out; -]