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 |
|
|
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; |
1389 |
|
|
1390 |
out_print(res, "</table>"); |
out_print(res, "</table>"); |
1391 |
|
|
1392 |
print_action_buttons(res, s); |
print_buttons(res, s); |
1393 |
|
|
1394 |
} |
} |
1395 |
|
|
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; |
1478 |
|
|
1479 |
out_print(res, "</table>"); |
out_print(res, "</table>"); |
1480 |
|
|
1481 |
print_action_buttons(res, s); |
print_buttons(res, s); |
1482 |
|
|
1483 |
} |
} |
1484 |
|
|
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; |
1588 |
|
|
1589 |
out_print(res, "</table>"); |
out_print(res, "</table>"); |
1590 |
|
|
1591 |
print_action_buttons(res, s); |
print_buttons(res, s); |
1592 |
|
|
1593 |
} |
} |
1594 |
|
|
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; |
1755 |
|
|
1756 |
out_print(res, "</table>"); |
out_print(res, "</table>"); |
1757 |
|
|
1758 |
print_action_buttons(res, s); |
print_buttons(res, s); |
1759 |
|
|
1760 |
} |
} |
1761 |
|
|
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; |
1822 |
|
|
1823 |
out_print(res, "</table>"); |
out_print(res, "</table>"); |
1824 |
|
|
1825 |
print_action_buttons(res, s); |
print_buttons(res, s); |
1826 |
|
|
1827 |
} |
} |
1828 |
|
|
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"}; |
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" |
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>"); |