Roxen.git / server / config_interface / boxes / schedule.pike

version» Context lines:

Roxen.git/server/config_interface/boxes/schedule.pike:48:    }    tr.sched.second:not(:last-child) td {    border-bottom: 1px solid #ddd;    }    tr.sched td.next-rel {    font-size: 11px;    color: #9b9;    }    tr.sched td.desc div {    font-size: 11px; -  opacity: 0.7; +  color: #555;    }    tr.sched td.desc p {    margin: 0;    padding: 0;    }";         int(-1..1) list_schedule_var(Variable.Variable vv,    mapping(string:Variable.Variable) all_vars)   {
Roxen.git/server/config_interface/boxes/schedule.pike:160:    desc = (string) desc;    if (sizeof(desc) < 50)    return desc;    if (has_value(desc, "</p>"))    return (desc / "</p>")[0];    if (has_value(desc, ". "))    return (desc / ". ")[0] + ".";    return desc;   }    - string parse(RequestID id) + string parse_low(RequestID id)   {    mapping(string:Variable.Variable) vars = ([ ]);    mapping(Variable.Variable:int) next_run = ([ ]);    mapping(string:RoxenModule) mod_lookup = ([ ]);       // Find eligible Variable.Schedule instances    foreach (roxen->variables; string key; Variable.Variable gv) {    if (int status = list_schedule_var(gv, roxen->variables)) {    vars["_global:" + key] = gv;    next_run[gv] = (status > 0) ? get_next_run(gv, roxen->variables) : -1;
Roxen.git/server/config_interface/boxes/schedule.pike:206:    int now = time();    array(mapping) rows = ({ });    foreach (vars; string key; Variable.Schedule sv) {    string mod_id = (key / ":")[0];    RoxenModule m = mod_lookup[mod_id];    string mod_name =    (mod_id == "_global") ? 0 : beautify_group_name(m->module_name);    string conf_name =    m ? Roxen.html_encode_string(m->my_configuration()->name) :    "Global Settings"; +  string var_name = (string) sv->name(); +  string var_group_name = +  has_value(var_name, ":") ? +  replace((var_name / ":")[0], " ", "%20") : "Settings";    string curl = -  (m && conf_name) ? +  ((mod_id != "_global") && conf_name) ?    ("/sites/site.html/" + replace(conf_name, " ", "%20") + "/") : -  "/global_settings/?section=Auto%20Maintenance&amp;&usr.set-wiz-id;"; +  "/global_settings/?section=" + var_group_name + "&amp;&usr.set-wiz-id;";    string mname = m && Roxen.get_modfullname(m);    string mgroup = "zz_misc";    if (mname) {    if (sscanf(mname, "%s:%*s", mgroup) != 2)    mgroup = "zz_misc";    if (mgroup == "zz_misc") mgroup = "Other";    }    string murl =    m && (curl +    Roxen.http_encode_invalids(mgroup) + "!0/" +    replace(m->sname(), "#", "!") + -  "/?section=Status&amp;&usr.set-wiz-id;"); -  string var_name = beautify_group_name(sv->name()); +  "/?section=" + var_group_name + "&amp;&usr.set-wiz-id;");    int next_ts = next_run[sv];    mapping row = ([ -  "var_name": var_name, +  "var_name": beautify_group_name(var_name),    "mod_name": mod_name,    "conf_name": conf_name,    "mod_desc": trim_desc(sv->doc() || ""),    "disabled": next_ts < 0,    "next_ts": next_ts,    "next_msg": get_next_msg(next_ts),    "next_rel": get_next_rel(next_ts),    "curl": curl,    "murl": murl,    "sort_key": get_sort_key(next_ts, conf_name, var_name) ]);
Roxen.git/server/config_interface/boxes/schedule.pike:332:    "<a class='confname' href='" + row->curl + "'>" +    row->conf_name + "</a>") : "") +    "."    "</td>"    "</tr>"    "<tr class='sched second " + disabled_cls + "'>"    "<td class='next-rel'>" + row->next_rel + "</td>"    "<td class='desc'><div>" + row->mod_desc + "</div></td>"    "</tr>";    } +  return res; + }    -  + string parse(RequestID id) + { +  string res; +  if (mixed err = catch { res = parse_low(id); }) { +  werror("Error generating schedule:\n%s\n", describe_backtrace(err)); +  res = "<tr><td>(An unknown error occurred.)</td></tr>"; +  }    return    "<box type='" + box + "' title='" + box_name + "'>"    "<style type='text/css'>" + css + "</style>"    "<table cellpadding='0' cellspacing='0' border='0'>" + res + "</table>"    "</box>";   }