Handle hostnames with upper-case letters
[webmin.git] / cluster-software / compare_form.cgi
1 #!/usr/local/bin/perl
2 # Show form for comparing packages on multiple servers
3
4 require './cluster-software-lib.pl';
5 &ui_print_header(undef, $text{'compare_title'}, "");
6
7 print "$text{'compare_desc'}<p>\n";
8
9 print &ui_form_start("compare.cgi", "post");
10 print "<table>\n";
11
12 # Hosts to compare
13 print "<tr> <td valign=top><b>$text{'compare_hosts'}</b></td> <td>\n";
14 print &ui_radio("all", 1, [ [ 1, $text{'compare_all'} ],
15                             [ 0, $text{'compare_sel'} ] ]),"<br>\n";
16 %smap = map { $_->{'id'}, $_ } &list_servers();
17 @sel = map { [ $_->{'id'}, &server_name($smap{$_->{'id'}}) ] }
18            &list_software_hosts();
19 @groups = &servers::list_all_groups();
20 push(@sel, map { [ "group_".$_->{'name'}, &text('edit_group', $_->{'name'}) ] }
21                @groups);
22 print &ui_select("hosts", undef, \@sel, 5, 1);
23 print "</td> </tr>\n";
24
25 # Show all, or just mismatches?
26 print "<tr> <td><b>$text{'compare_showall'}</b></td> <td>\n";
27 print &ui_radio("showall", 0, [ [ 1, $text{'compare_showall1'} ],
28                                 [ 0, $text{'compare_showall0'} ] ]);
29 print "</td> </tr>\n";
30
31 print "</table>\n";
32 print &ui_submit($text{'compare_ok'});
33 print &ui_form_end();
34
35 &ui_print_footer("", $text{'index_return'});