/[monit]/monit/http/cervlet.c
ViewVC logotype

Diff of /monit/http/cervlet.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.101 by hauk, Wed Sep 24 02:46:47 2003 UTC revision 1.102 by hauk, Wed Sep 24 02:56:55 2003 UTC
# Line 101  static void do_service_file(HttpRequest, Line 101  static void do_service_file(HttpRequest,
101  static void do_service_process(HttpRequest, HttpResponse, Service_T);  static void do_service_process(HttpRequest, HttpResponse, Service_T);
102  static void do_service_host(HttpRequest, HttpResponse, Service_T);  static void do_service_host(HttpRequest, HttpResponse, Service_T);
103  static void print_alerts(HttpResponse res, Service_T s);  static void print_alerts(HttpResponse res, Service_T s);
104  static void print_action_buttons(HttpResponse res, Service_T s);  static void print_buttons(HttpResponse res, Service_T s);
 static void print_depend(HttpResponse res, Service_T s);  
105  static void print_service_common_params(HttpResponse res, Service_T s);  static void print_service_common_params(HttpResponse res, Service_T s);
106    
107    
# Line 1305  static void do_service_device(HttpReques Line 1304  static void do_service_device(HttpReques
1304              "<font>",              "<font>",
1305              (int)stat_buf.st_gid);              (int)stat_buf.st_gid);
1306    
   print_depend(res, s);  
   
1307    {    {
1308            
1309      Device_T dl;      Device_T dl;
# Line 1392  static void do_service_device(HttpReques Line 1389  static void do_service_device(HttpReques
1389        
1390    out_print(res, "</table>");    out_print(res, "</table>");
1391        
1392    print_action_buttons(res, s);    print_buttons(res, s);
1393        
1394  }  }
1395    
# Line 1427  static void do_service_directory(HttpReq Line 1424  static void do_service_directory(HttpReq
1424              s->path);              s->path);
1425        
1426    print_service_common_params(res, s);    print_service_common_params(res, s);
   print_depend(res, s);  
1427        
1428    {    {
1429      struct mytimestamp *t;      struct mytimestamp *t;
# Line 1482  static void do_service_directory(HttpReq Line 1478  static void do_service_directory(HttpReq
1478        
1479    out_print(res, "</table>");    out_print(res, "</table>");
1480        
1481    print_action_buttons(res, s);    print_buttons(res, s);
1482        
1483  }  }
1484    
# Line 1515  static void do_service_file(HttpRequest Line 1511  static void do_service_file(HttpRequest
1511              s->path);              s->path);
1512        
1513    print_service_common_params(res,s);    print_service_common_params(res,s);
   print_depend(res, s);  
1514        
1515    {    {
1516      struct mytimestamp *t;      struct mytimestamp *t;
# Line 1593  static void do_service_file(HttpRequest Line 1588  static void do_service_file(HttpRequest
1588    
1589    out_print(res, "</table>");    out_print(res, "</table>");
1590    
1591    print_action_buttons(res, s);    print_buttons(res, s);
1592        
1593  }  }
1594    
# Line 1620  static void do_service_process(HttpReque Line 1615  static void do_service_process(HttpReque
1615              s->path);              s->path);
1616    
1617    print_service_common_params(res, s);    print_service_common_params(res, s);
   print_depend(res, s);  
1618        
1619    if(Run.doprocess) {    if(Run.doprocess) {
1620      ProcInfo_T pi= s->procinfo;      ProcInfo_T pi= s->procinfo;
# Line 1761  static void do_service_process(HttpReque Line 1755  static void do_service_process(HttpReque
1755        
1756    out_print(res, "</table>");    out_print(res, "</table>");
1757        
1758    print_action_buttons(res, s);    print_buttons(res, s);
1759    
1760  }  }
1761    
# Line 1791  static void do_service_host(HttpRequest Line 1785  static void do_service_host(HttpRequest
1785              "<font color='#ff0000'>Not available</font>");              "<font color='#ff0000'>Not available</font>");
1786        
1787    print_service_common_params(res, s);    print_service_common_params(res, s);
   print_depend(res, s);  
1788    
1789    {    {
1790      Port_T n;      Port_T n;
# Line 1829  static void do_service_host(HttpRequest Line 1822  static void do_service_host(HttpRequest
1822        
1823    out_print(res, "</table>");    out_print(res, "</table>");
1824    
1825    print_action_buttons(res, s);    print_buttons(res, s);
1826    
1827  }  }
1828    
# Line 1887  static void print_alerts(HttpResponse re Line 1880  static void print_alerts(HttpResponse re
1880  }  }
1881    
1882    
1883  static void print_action_buttons(HttpResponse res, Service_T s) {  static void print_buttons(HttpResponse res, Service_T s) {
1884    
1885    char *action[]= {"monitor", "unmonitor"};    char *action[]= {"monitor", "unmonitor"};
1886    char *label[]= {"Enable monitoring", "Disable monitoring"};    char *label[]= {"Enable monitoring", "Disable monitoring"};
# Line 1925  static void print_action_buttons(HttpRes Line 1918  static void print_action_buttons(HttpRes
1918  }  }
1919    
1920    
 static void print_depend(HttpResponse res, Service_T s) {  
       
   Dependant_T d;  
     
   for(d= s->dependantlist; d; d= d->next) {  
     if(d->dependant != NULL) {  
       out_print(res,"<tr><td>Depends on service </td>"  
                 "<td> <a href=%s> %s </a></td></tr>",  
                 d->dependant, d->dependant);  
     }  
   }  
   
 }  
   
   
1921  static void print_service_common_params(HttpResponse res, Service_T s) {  static void print_service_common_params(HttpResponse res, Service_T s) {
1922    
1923      Dependant_T d;
1924    
1925    if(s->group)    if(s->group)
1926        out_print(res,        out_print(res,
1927                  "<tr><td>Group</td><td><font color='#0000ff'>%s"                  "<tr><td>Group</td><td><font color='#0000ff'>%s"
# Line 1956  static void print_service_common_params( Line 1936  static void print_service_common_params(
1936              "</font></td></tr>",              "</font></td></tr>",
1937              statusnames[s->do_monitor]);              statusnames[s->do_monitor]);
1938    
1939      for(d= s->dependantlist; d; d= d->next) {
1940        if(d->dependant != NULL) {
1941          out_print(res,"<tr><td>Depends on service </td>"
1942                    "<td> <a href=%s> %s </a></td></tr>",
1943                    d->dependant, d->dependant);
1944        }
1945      }
1946      
1947    if(s->start) {    if(s->start) {
1948      int i= 0;      int i= 0;
1949      out_print(res, "<tr><td>Start program</td><td>");      out_print(res, "<tr><td>Start program</td><td>");

Legend:
Removed from v.1.101  
changed lines
  Added in v.1.102

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26