Roxen.git / server / config_interface / actions / debug_summary.pike

version» Context lines:

Roxen.git/server/config_interface/actions/debug_summary.pike:1:   /* -  * $Id: debug_summary.pike,v 1.10 2004/05/25 11:12:24 anders Exp $ +  * $Id: debug_summary.pike,v 1.11 2004/05/25 16:33:12 anders Exp $    */   #include <stat.h>   #include <roxen.h>   //<locale-token project="admin_tasks">LOCALE</locale-token>   #define LOCALE(X,Y) _DEF_LOCALE("admin_tasks",X,Y)      constant action = "debug_info";      LocaleString name= LOCALE(163,"Debug summary");   LocaleString doc = LOCALE(164,
Roxen.git/server/config_interface/actions/debug_summary.pike:160:    return res;   }      mixed parse( RequestID id )   {    string res;    string debuglog = roxen_path("$LOGDIR/debug/default.1");       if (id->variables->download &&    id->variables->download == "summary") { -  res = make_headline(LOCALE(0,"Debug summary"))+"\n"; +  res = make_headline(LOCALE(163,"Debug summary"))+"\n";    res += make_summary();    mapping ret = Roxen.http_string_answer(res, "application/octet-stream");    ret["extra_heads"] = ([]);    Roxen.add_http_header(ret["extra_heads"], "Content-Disposition",    "attachment; filename=debug-summary.txt");    return ret;    }    else if (id->variables->download &&    id->variables->download == "debuglog") {    string res = "---";    object st = file_stat(debuglog);    if (st && st->isreg)    res = Stdio.read_file(debuglog);    mapping ret = Roxen.http_string_answer(res, "application/octet-stream");    ret["extra_heads"] = ([]);    Roxen.add_http_header(ret["extra_heads"], "Content-Disposition",    "attachment; filename="+((debuglog/"/")[-1]));    return ret;    }    -  res = "<font size='+1'><b>"+LOCALE(0,"Debug summary")+"</b></font>\n<p />"; -  res += "<link-gbutton href='debug_summary.pike?download=summary'>"+LOCALE(0,"Download")+ +  res = "<font size='+1'><b>"+LOCALE(163,"Debug summary")+"</b></font>\n<p />"; +  res += "<link-gbutton href='debug_summary.pike?download=summary'>"+LOCALE(41,"Download")+    "</link-gbutton>";    if (file_stat(debuglog))    res += "<link-gbutton href='debug_summary.pike?download=debuglog'>"+ -  LOCALE(0,"Download Debug Log")+ +  LOCALE(153,"Download Debug Log")+    "</link-gbutton>";       res += "<pre>"+Roxen.html_encode_string(make_summary())+"</pre>"    "<br /><br />"    "<cf-ok/>";       return res;   }