3 # Display a list of hosts to which configurations are copied
5 require './cfengine-lib.pl';
6 &ui_print_header(undef, $text{'push_title'}, "", "push");
8 if (!&has_command($config{'cfrun'})) {
9 print &text('push_ecmd', "<tt>$config{'cfrun'}</tt>",
10 "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
11 &ui_print_footer("/", $text{'index'});
15 ($hosts, $opts) = &get_cfrun_hosts();
16 print "<form action=save_push.cgi>\n";
17 print "<table border width=100%>\n";
18 print "<tr $tb> <td><b>$text{'push_header'}</b></td> </tr>\n";
19 print "<tr $cb> <td><table width=100%>\n";
21 print "<tr> <td><b>$text{'push_domain'}</b></td>\n";
22 printf "<td><input name=domain size=30 value='%s'></td> </tr>\n",
25 print "<tr> <td><b>$text{'push_users'}</b></td>\n";
26 printf "<td><input name=access size=50 value='%s'> %s</td> </tr>\n",
27 join(" ", split(/,/, $opts->{'access'})),
28 &user_chooser_button("access", 1);
30 print "</table><table border>\n";
31 print "<tr> <td><b>$text{'push_host'}</b></td> ",
32 "<td><b>$text{'push_opts'}</b></td> </tr>\n";
34 foreach $h (@$hosts, [ ], [ ]) {
36 printf "<td><input name=host_$i size=30 value='%s'></td>\n", $h->[0];
37 printf "<td><input name=opts_$i size=30 value='%s'></td>\n", $h->[1];
41 print "</table></td></tr></table>\n";
42 print "<input type=submit value='$text{'save'}'></form>\n";
46 print "<form action=push.cgi>\n";
47 print "<table width=100%><tr>\n";
48 print "<td><input type=submit value='$text{'push_push'}'></td>\n";
49 print "<td>",&text('push_pushdesc',
50 "<tt>$config{'cfrun'}</tt>"),"</td>\n";
51 print "</tr></table></form>\n";
54 &ui_print_footer("", $text{'index_return'});