4 require './mon-lib.pl';
5 &ui_print_header(undef, $text{'watches_title'}, "");
7 $conf = &get_mon_config();
8 @watches = &find("watch", $conf);
10 print "<table border width=100%>\n";
11 print "<tr $tb> <td><b>$text{'watches_group'}</b></td> ",
12 "<td><b>$text{'watches_services'}</b></td> </tr>\n";
13 foreach $w (@watches) {
15 print "<td><a href='edit_watch.cgi?idx=$w->{'index'}'>",
16 "$w->{'values'}->[0]</a></td> <td>\n";
17 local @servs = &find("service", $w->{'members'});
19 local $i = &find_value("interval", $s->{'members'});
20 print "<a href='edit_service.cgi?idx=$w->{'index'}&",
21 "sidx=$s->{'index'}'>$s->{'values'}->[0] ($i)",
22 "</a> | \n";
24 print "<a href='edit_service.cgi?idx=$w->{'index'}&new=1'>",
25 "$text{'watches_sadd'}</a></td>\n";
31 print "<b>$text{'watches_none'}</b><p>\n";
33 print "<form action=create_watch.cgi>\n";
34 print "<input type=submit value='$text{'watches_add'}'>\n";
35 print "<select name=group>\n";
36 foreach $s (&find("hostgroup", $conf)) {
37 print "<option>$s->{'values'}->[0]\n";
39 print "</select></form>\n";
41 &ui_print_footer("", $text{'index_return'});