d2d936 | 1997-08-24 | Peter Bortas | | |
d70936 | 1998-07-22 | Henrik Grubbström (Grubba) | | * $Id: requeststatus.pike,v 1.7 1998/07/22 16:44:37 grubba Exp $
|
d2d936 | 1997-08-24 | Peter Bortas | | */
inherit "wizard";
constant name= "Status//Access / request status";
|
513726 | 1997-11-19 | Henrik Grubbström (Grubba) | | constant doc = ("Shows the amount of data handled since last restart.");
|
d2d936 | 1997-08-24 | Peter Bortas | |
constant more=0;
mixed page_0(object id, object mc)
{
|
f4c322 | 1998-07-20 | David Hedbor | | return sprintf("<h2>Server Overview</h2>"
|
5c2217 | 1998-07-20 | David Hedbor | | "This is the summary status of all virtual servers. "
"Click <b>[Next->]</b> to see the statistics for each "
"indiviual server, or <b>[Cancel]</b> to return to the "
"previous menu.<p>%s",
roxen->full_status());
}
mixed page_1(object id)
{
|
e180e3 | 1998-07-20 | David Hedbor | | string res="";
|
5c2217 | 1998-07-20 | David Hedbor | | foreach(Array.sort_array(roxen->configurations,
lambda(object a, object b) {
|
9c6c02 | 1998-07-20 | David Hedbor | | return a->requests < b->requests;
|
e180e3 | 1998-07-20 | David Hedbor | | }), object o) {
if(!o->requests)
continue;
|
9c6c02 | 1998-07-20 | David Hedbor | | res += sprintf("<h3><a href=%s>%s</a><br>%s</h3>\n",
o->query("MyWorldLocation"),
o->name,
|
5c2217 | 1998-07-20 | David Hedbor | | replace(o->status(), "<table>", "<table cellpadding=4>"));
|
e180e3 | 1998-07-20 | David Hedbor | | }
if(!strlen(res))
return "<b>There are no active virtual servers.</b>";
return
|
d70936 | 1998-07-22 | Henrik Grubbström (Grubba) | | "<b>These are all active virtual servers. They are sorted by the "
|
e180e3 | 1998-07-20 | David Hedbor | | "number of requests they have received - the most active being first. "
|
d70936 | 1998-07-22 | Henrik Grubbström (Grubba) | | "Servers which haven't recevied any requests are not listed.</b>" +
|
e180e3 | 1998-07-20 | David Hedbor | | res;
|
d2d936 | 1997-08-24 | Peter Bortas | | }
mixed handle(object id) { return wizard_for(id,0); }
|
513726 | 1997-11-19 | Henrik Grubbström (Grubba) | |
|