d2d9361997-08-24Peter Bortas /*
d709361998-07-22Henrik Grubbström (Grubba)  * $Id: requeststatus.pike,v 1.7 1998/07/22 16:44:37 grubba Exp $
d2d9361997-08-24Peter Bortas  */ inherit "wizard"; constant name= "Status//Access / request status";
5137261997-11-19Henrik Grubbström (Grubba) constant doc = ("Shows the amount of data handled since last restart.");
d2d9361997-08-24Peter Bortas  constant more=0; mixed page_0(object id, object mc) {
f4c3221998-07-20David Hedbor  return sprintf("<h2>Server Overview</h2>"
5c22171998-07-20David 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) {
e180e31998-07-20David Hedbor  string res="";
5c22171998-07-20David Hedbor  foreach(Array.sort_array(roxen->configurations, lambda(object a, object b) {
9c6c021998-07-20David Hedbor  return a->requests < b->requests;
e180e31998-07-20David Hedbor  }), object o) { if(!o->requests) continue;
9c6c021998-07-20David Hedbor  res += sprintf("<h3><a href=%s>%s</a><br>%s</h3>\n", o->query("MyWorldLocation"), o->name,
5c22171998-07-20David Hedbor  replace(o->status(), "<table>", "<table cellpadding=4>"));
e180e31998-07-20David Hedbor  } if(!strlen(res)) return "<b>There are no active virtual servers.</b>"; return
d709361998-07-22Henrik Grubbström (Grubba)  "<b>These are all active virtual servers. They are sorted by the "
e180e31998-07-20David Hedbor  "number of requests they have received - the most active being first. "
d709361998-07-22Henrik Grubbström (Grubba)  "Servers which haven't recevied any requests are not listed.</b>" +
e180e31998-07-20David Hedbor  res;
d2d9361997-08-24Peter Bortas } mixed handle(object id) { return wizard_for(id,0); }
5137261997-11-19Henrik Grubbström (Grubba)