4 require './mon-lib.pl';
5 &ui_print_header(undef, $text{'index_title'}, "","intro", 1, 1, 0
6 &help_search_link("mon", "man", "doc", "google"));
8 # Check if mon is installed
9 if (!-r $mon_config_file) {
10 print "<p>",&text('err_nomonconf', "<tt>$mon_config_file</tt>",
11 "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
12 &ui_print_footer("/", $text{'index'});
17 @opts = ( 'global', 'groups', 'watches', 'periods', 'users', 'auth',
19 @links = ( 'edit_global.cgi', 'list_groups.cgi', 'list_watches.cgi',
20 'list_periods.cgi', 'list_users.cgi', 'edit_auth.cgi', 'mon.cgi',
22 @titles = map { $text{"${_}_title"} } @opts;
23 @icons = map { "images/${_}.gif" } @opts;
24 &icons_table(\@links, \@titles, \@icons);
26 # check if mon is running
28 print "<table width=100%>\n";
29 if (&check_pid_file($config{'pid_file'})) {
30 print "<tr><form action=stop.cgi>\n";
31 print "<td><input type=submit value=\"$text{'mon_stop'}\"></td>\n";
32 print "<td>$text{'mon_stopdesc'}</td>\n";
33 print "</form></tr>\n";
35 print "<tr><form action=restart.cgi>\n";
36 print "<td><input type=submit value=\"$text{'mon_restart'}\"></td>\n";
37 print "<td>$text{'mon_restartdesc'}</td>\n";
38 print "</form></tr>\n";
42 print "<tr><form action=start.cgi>\n";
43 print "<td><input type=submit value=\"$text{'mon_start'}\"></td>\n";
44 print "<td>$text{'mon_startdesc'}</td>\n";
45 print "</form></tr>\n";
49 &ui_print_footer("/", $text{'index'});