Changeset 1129 for trunk/gsdl/src/recpt


Ignore:
Timestamp:
2000-04-20T10:30:25+12:00 (24 years ago)
Author:
sjboddie
Message:

tidied up status pages and end-user collection building

Location:
trunk/gsdl/src/recpt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/authenaction.cpp

    r755 r1129  
    2828/*
    2929   $Log$
     30   Revision 1.10  2000/04/19 22:30:23  sjboddie
     31   tidied up status pages and end-user collection building
     32
    3033   Revision 1.9  1999/11/01 21:11:35  sjboddie
    3134   changed arguments passed to many functions
     
    300303                         + "_"));
    301304  // change style of header and footer if page is a frame
    302   if (args["sp"] != "frameset") {
     305  if ((args["sp"].empty()) || (args["sp"] == "frameset")) {
    303306    disp.setmacro ("header", "authen", "_status:infoheader_(Log in)");
    304307    disp.setmacro ("header", "authenok", "_status:infoheader_(Log in)");
     
    306309    disp.setmacro ("footer", "authenok", "_status:infofooter_(Log in)");
    307310  }
    308   else {
    309     //    disp.setmacro ("header", "authen", "_Global:header_"); //****
    310     //    disp.setmacro ("header", "authenok", "_Global:header_");
    311     //    disp.setmacro ("footer", "authen", "_Global:footer_");
    312     //    disp.setmacro ("footer", "authenok", "_Global:footer_");
    313     disp.setmacro ("header", "authen", "_:header_");
    314     disp.setmacro ("header", "authenok", "_:header_");
    315     disp.setmacro ("footer", "authen", "_:footer_");
    316     disp.setmacro ("footer", "authenok", "_:footer_");
    317   }
    318    
    319311
    320312  // get a list of saved configuration arguments (if possible)
  • trunk/gsdl/src/recpt/buildaction.cpp

    r1000 r1129  
    8080bool buildaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, cgiargsclass &args,
    8181                 ostream &/*logout*/) {
    82   if ((args["bca"] != "buildstatus") && (args["bca"] != "collog"))
     82
     83  text_t &arg_bca = args["bca"];
     84  if (!((arg_bca == "buildstatus") || (arg_bca == "collog") || (arg_bca == "blankpage")
     85    || ((arg_bca == "buildcol") && (args["wizard"] == "buildexec"))))
    8386    {
    8487      // authenticate the user if authentication is avaiable
  • trunk/gsdl/src/recpt/statusaction.cpp

    r995 r1129  
    2828/*
    2929   $Log$
     30   Revision 1.26  2000/04/19 22:30:23  sjboddie
     31   tidied up status pages and end-user collection building
     32
    3033   Revision 1.25  2000/02/29 21:00:31  sjboddie
    3134   fixed some compiler warnings
     
    138141}
    139142
    140 void statusaction::output_welcome (cgiargsclass &/*args*/, displayclass &disp,
    141                   outconvertclass &outconvert,
    142                   ostream &textout, ostream &/*logout*/) {
    143   textout << outconvert << disp << "_status:infoheader_(_titlewelcome_)\n"
    144     "_status:welcome_\n"
    145     "_status:infofooter_\n";
     143void statusaction::output_welcome (cgiargsclass &/*args*/, recptprotolistclass *protos,
     144                   displayclass &disp, outconvertclass &outconvert,
     145                   ostream &textout, ostream &logout) {
     146
     147  textout << outconvert << disp
     148      << "_status:infoheader_(_titlewelcome_)\n"
     149      << "_status:welcome_"
     150      << "<center><table width=_pagewidth_>\n"
     151      << "<th align=left>abbrev.</th><th align=left>collection</th>"
     152      << "<th align=left>public?</th><th align=left>running?</th></tr>\n";
     153
     154  recptprotolistclass::iterator rprotolist_here = protos->begin();
     155  recptprotolistclass::iterator rprotolist_end = protos->end();
     156  while (rprotolist_here != rprotolist_end) {
     157    if ((*rprotolist_here).p != NULL) {
     158      text_t protoname = (*rprotolist_here).p->get_protocol_name();
     159      text_tarray collist;
     160      comerror_t err;
     161      (*rprotolist_here).p->get_collection_list (collist, err, logout);
     162      if (err == noError) {
     163    text_tarray::iterator collist_here = collist.begin();
     164    text_tarray::iterator collist_end = collist.end();
     165
     166    while (collist_here != collist_end) {
     167
     168        textout << outconvert << disp
     169            << "<tr><td><a href=\"_gwcgi_?e=_compressedoptions_&a=status&sp=collectioninfo&pr="
     170            << protoname
     171            << "&c="
     172            << *collist_here
     173            << "\">"
     174            << *collist_here
     175            << "</a></td>";
     176
     177      ColInfoResponse_t cinfo;
     178      (*rprotolist_here).p->get_collectinfo (*collist_here, cinfo, err, logout);
     179      if (err == noError) {
     180        text_t collname = *collist_here;
     181        text_tmap::iterator it = cinfo.collectionmeta.find("collectionname");
     182        if (it != cinfo.collectionmeta.end()) collname = (*it).second;
     183
     184        textout << "<td>";
     185        if (cinfo.buildDate > 0)
     186          textout << outconvert << disp
     187              << "<a href=\"_httppagex_(about)&c=" << *collist_here
     188              << "\" target=_top>";
     189
     190        textout << outconvert << disp << collname;
     191
     192        if (cinfo.buildDate > 0) textout << "</a>";
     193
     194        textout << "</td>";
     195
     196        if (cinfo.isPublic) textout << "<td>yes</td>";
     197        else textout << "<td>no</td>";
     198       
     199        if (cinfo.buildDate > 0)
     200          textout << outconvert << "<td>yes</td>";
     201        else
     202          textout << "<td>no</td>";
     203       
     204      } else {
     205        textout << "<td></td><td></td><td></td>";
     206      }
     207
     208      textout << "</tr>\n";
     209      collist_here ++;
     210    }
     211      }
     212    }
     213    rprotolist_here ++;
     214  }
     215
     216  textout << "</table></center>\n";
     217  textout << outconvert << disp << "_status:infofooter_\n";
    146218}
    147219
     
    856928}
    857929
    858 bool statusaction::do_action (cgiargsclass &args, recptprotolistclass * /*protos*/,
     930bool statusaction::do_action (cgiargsclass &args, recptprotolistclass *protos,
    859931                  browsermapclass * /*browsers*/, displayclass &disp,
    860932                  outconvertclass &outconvert, ostream &textout,
     
    898970  if (arg_sp == "frameset") output_frameset (args, disp, outconvert, textout, logout);
    899971  else if (arg_sp == "select") output_select (args, disp, outconvert, textout, logout);
    900   else if (arg_sp == "welcome") output_welcome (args, disp, outconvert, textout, logout);
     972  else if (arg_sp == "welcome") output_welcome (args, protos, disp, outconvert, textout, logout);
    901973  else if (arg_sp == "generalinfo") output_generalinfo (args, disp, outconvert, textout, logout);
    902974  else if (arg_sp == "argumentinfo") output_argumentinfo (args, disp, outconvert, textout, logout);
  • trunk/gsdl/src/recpt/statusaction.h

    r760 r1129  
    4444            outconvertclass &outconvert,
    4545            ostream &textout, ostream &logout);
     46
    4647  void output_select (cgiargsclass &args, displayclass &disp,
    4748              outconvertclass &outconvert,
    4849              ostream &textout, ostream &logout);
    4950
    50   void output_welcome (cgiargsclass &args, displayclass &disp,
    51                outconvertclass &outconvert,
    52                ostream &textout, ostream &logout);
     51  void output_welcome (cgiargsclass &args, recptprotolistclass *protos,
     52               displayclass &disp, outconvertclass &outconvert,
     53               ostream &textout, ostream &logout);
     54
    5355  void output_generalinfo (cgiargsclass &args, displayclass &disp,
    5456               outconvertclass &outconvert,
    5557               ostream &textout, ostream &logout);
     58
    5659  void output_argumentinfo (cgiargsclass &args, displayclass &disp,
    5760                outconvertclass &outconvert,
    5861                ostream &textout, ostream &logout);
     62
    5963  void output_actioninfo (cgiargsclass &args, displayclass &disp,
    6064              outconvertclass &outconvert,
    6165              ostream &textout, ostream &logout);
     66
    6267  void output_protocolinfo (cgiargsclass &args, displayclass &disp,
    6368                outconvertclass &outconvert,
    6469                ostream &textout, ostream &logout);
     70
    6571  void output_collectioninfo (cgiargsclass &args, displayclass &disp,
    6672                  outconvertclass &outconvert,
    6773                  ostream &textout, ostream &logout);
     74
    6875  void output_initlog (cgiargsclass &args, displayclass &disp,
    6976               outconvertclass &outconvert,
    7077               ostream &textout, ostream &logout);
     78
    7179  void output_errorlog (cgiargsclass &args, displayclass &disp,
    7280            outconvertclass &outconvert,
Note: See TracChangeset for help on using the changeset viewer.