Roxen.git / server / config_interface / dbs / db_list.pike

version» Context lines:

Roxen.git/server/config_interface/dbs/db_list.pike:18:    return cfg->query_name();   }      string format_table_owner (mapping(string:string) mod_info, void|int skip_conf)   {    // Note: Code duplication in browser.pike.       if ((<0, "">)[mod_info->conf]) return 0;       Configuration c = roxen.find_configuration( mod_info->conf ); +  // Make sure that the configuration is enabled. +  // Otherwise we get spurious "the deleted module XXX in YYY" below. +  c && c->low_init();    RoxenModule m = c && !(<0, "">)[mod_info->module] &&    c->find_module( mod_info->module );    ModuleInfo i =    !(<0, "">)[mod_info->module] &&    roxen.find_module( (mod_info->module/"#")[0] );    string mn;       if (!skip_conf) {    if (c) {    mn = "<a href='../sites/site.html/" +
Roxen.git/server/config_interface/dbs/db_list.pike:135:    foreach( DBManager.list_groups(), string g )    rres[g]="";       foreach( sort(indices(q)), string db )    {    string db_group = DBManager.db_group(db);    string db_url = DBManager.db_url( db );       string res =    "<tr><td class='db'>" + -  (view_mode ? "" : "<a href='browser.pike?db="+db+"'>") + +  (view_mode ? "" : "<a href='browser.pike?db="+db+"&amp;&usr.set-wiz-id;'>") +    "<cimg style='vertical-align: -2px' border='0' format='gif'"    " src='&usr.database-small;' alt='' max-height='12'/> " +    db +    (view_mode ? "" : "</a>") +    "</td>";       mapping(string:int) db_stats;    if ( mixed e = catch { -  db_stats = DBManager.db_stats( db ); +  db_stats = DBManager.db_stats( db ) || ([]);    } ) {    string em = describe_error(e);    sscanf( em, "%*sreconnect to SQL-server%s", em);    rres[db_group] += res +    "<td colspan='4'>" +    (db_url ? Roxen.html_encode_string (db_url) + "<br />" : "") +    "<font color='&usr.warncolor;'>" + em + "</font></td>"    "</tr>\n";    continue;    }
Roxen.git/server/config_interface/dbs/db_list.pike:180:    else    {    if( mixed err = catch( DBManager.cached_get( db ) ) )    res += "<td><font color='&usr.warncolor;'>" +    _(381,"Failed to connect") + ": " +    describe_error(err) + "</font></td>";    else    res += "<td>remote</td>";    }    +  // Backup schedule +  +  res += "<td>" + (DBManager.db_schedule(db) || +  ("<i>" + _(1116, "NONE") + "</i>")) + "</td>"; +     // Owner/info column       mapping(string:string) db_mod_info = DBManager.module_table_info( db, "" );       if (db == "local")    res += "<td>" +    _(546, "Internal data that cannot be shared between servers.") +    "</td>";    else if (db == "shared")    res += "<td>" +
Roxen.git/server/config_interface/dbs/db_list.pike:214:       array(array(string)) cats = ({});    foreach( indices(rres), string c )    if( c != "internal" )    cats += ({ ({DBManager.get_group(c)->lname, c}) });    else    cats = ({ ({DBManager.get_group(c)->lname, c}) }) + cats;       foreach( cats[0..0]+sort(cats[1..]); int i; array q ) {    res += "<tbody>\n" -  "<tr class='group-hdr'><th colspan='5'>" + (i ? "<br/>" : "") + +  "<tr class='group-hdr'><th colspan='6'>" + (i ? "<br/>" : "") +    "<a style='font-size: larger'" -  " href='edit_group.pike?group=" + q[1] + "'>" + q[0] + "</a>" +  " href='edit_group.pike?group=" + q[1] + "&amp;&usr.set-wiz-id;'>" + q[0] + "</a>"    "</th></tr>\n"    "<tr class='column-hdr'>"    "<th>Name</th>"    "<th class='num'>Tables</th>"    // "<th class='num'>Rows</th>"    "<th class='num'>Size</th>"    "<th>Type</th>" -  +  "<th>Backup Schedule</th>"    "<th>Owner/info</th>"    "</tr>\n" +    rres[ q[1] ] +    "</tbody>\n";    }       return Roxen.http_string_answer(res+"</table>");   }