Roxen.git / server / base_server / mainconfig.pike

version» Context lines:

Roxen.git/server/base_server/mainconfig.pike:1:   inherit "config/builders"; - string cvs_version = "$Id: mainconfig.pike,v 1.28 1996/12/10 03:39:45 per Exp $"; + string cvs_version = "$Id: mainconfig.pike,v 1.29 1996/12/13 00:41:16 per Exp $";   inherit "roxenlib";   inherit "config/draw_things";      #include <confignode.h>   #include <module.h>      #define dR "00"   #define dG "06"   #define dB "30"   
Roxen.git/server/base_server/mainconfig.pike:475:    build_module(node);       // We want to see the new module..    node->folded=0;       // If the module have copies, select the actual copy added..    if(module->copies) node = node->descend((string)i, 1);       // Now it is the module..    // We want to see this one immediately. +  if(node) +  {    node->folded = 0; -  +     // Mark the node and all its parents as modified.    node->change(1); -  +  }    return std_redirect(root, id);   }      mixed new_module_copy_copy(object node, object id)   {    roxen->current_configuration = node->config();    return new_module_copy(node, node->data->sname, id);   }      string new_module_form(object id, object node)
Roxen.git/server/base_server/mainconfig.pike:510:    roxen->rescan_modules();    perror("CONFIG: Done.\n");    }       a=roxen->allmodules;    mods=sort_array(indices(a), lambda(string a, string b, mapping m) {    return m[a][0] > m[b][0];    }, a);       res = ({default_head("Add a module")+"\n\n"+ -  "<table width=500><tr><td width=500>" +     "<h2>Select a module to add from the list below</h2>" });       foreach(mods, q)    {    if(b = module_nomore(q, a[q][2], node->config()))    {    if(b->sname != q)    res += ({("<p>"+    (roxen->QUERY(BS)?"<h2>"+a[q][0]+"</h2>":    "<img alt=\""+a[q][0]+"\" src=/auto/module/"+ -  q+" width=500>")+ "<br>"+a[q][1] + "<p>" +  q+" width=500>")+ "<br><blockquote>"+a[q][1] + "<p>"    "<i>A module of the same type is already enabled ("+ b->name    + "). <a href=\"/(delete)" + node->descend(b->name, 1)->path(1)    + "?"+(bar++)+    "\">Disable that module</a> if you want this one insted</i>" -  "\n<p><br><p>")}); +  "\n<p><br><p></blockquote>")});    } else {    res += ({"<p><a href=/(newmodule)"+node->path(1)+"?"+q+"=1>"+    (roxen->QUERY(BS)?"<h2>"+a[q][0]+"</h2>":    "<img border=0 alt=\""+a[q][0]+"\" src=/auto/module/"+    q+" width=500>")+ -  "</a><br>"+a[q][1]+"<p><br><p>"}); +  "</a><blockquote><br>"+a[q][1]+"<p><br><p></blockquote>"});    }    } -  return res*""+"</td></tr></table>"; +  return res*"";   }      mapping new_module(object id, object node)   {    string varname;       if(!sizeof(id->variables))    return stores(new_module_form(id, node));       varname=indices(id->variables)[0];
Roxen.git/server/base_server/mainconfig.pike:1377:    int lm=1;       if(o->type == NODE_CONFIGURATIONS)    BUTTON(newconfig, "New virtual server", left);       if(o->type == NODE_CONFIGURATION)    BUTTON(newmodule, "New module", left);       if(o->type == NODE_MODULE)    { -  BUTTON(delete, "Delete", left); +  BUTTON(delete, "Delete module", left);    if(o->data->copies)    BUTTON(newmodulecopy, "Copy module", left);    }       i=0;    if(o->type == NODE_MODULE_MASTER_COPY || o->type == NODE_MODULE_COPY    || o->type == NODE_MODULE_COPY_VARIABLES)    { -  BUTTON(delete, "Delete", left); -  BUTTON(refresh, "Reload", left); +  BUTTON(delete, "Delete module", left); +  BUTTON(refresh, "Reload module", left);    }       if(o->type == NODE_CONFIGURATION)    BUTTON(delete,"Delete this server", left);       if(nunfolded(o))    BUTTON(foldall, "Fold all",left);    if(o->changed)    BUTTON(unfoldmodified, "Unfold modified", left);   
Roxen.git/server/base_server/mainconfig.pike:1412:          if(!lm)    {    PUSH("<img border=0 alt=\"\" hspacing=0 vspacing=0 src=/auto/button/rm/%20>");    PUSH("</nobr><br clear=all>");    lm=1;    }       if((o->changed||root->changed)) +  {    BUTTON(save, "Save", left); -  +  PUSH("<img border=0 alt=\"\" hspacing=0 vspacing=0 src=/auto/button/%20%20%20%20%20%20>"); +  }    BUTTON(restart, "Restart", left);    BUTTON(shutdown,"Shutdown", left);       PUSH("<img border=0 alt=\"\" hspacing=0 vspacing=0 src=/auto/button/rm/%20>");    PUSH("</nobr><br clear=all>");   // PUSH("<p align=right><font size=-1 color=blue><a href=$docurl><font color=blue>"+roxen->real_version +"</font></a></font></p>");    PUSH("</body>\n");    return stores(res*"");   }