Changeset 1129


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
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/gsw3mir.pl

    r845 r1129  
    1 #!/usr/local/bin/perl5 -w
     1#!/usr/bin/perl -w
    22
    33###########################################################################
  • trunk/gsdl/bin/script/mkcol.pl

    r1031 r1129  
    5151    print STDERR "   -title text         The title for the collection\n";
    5252    print STDERR "   -about text         The about text for the collection\n";
    53     print STDERR "   -plugins list       Space separated list of perl plugin modules to use\n";
     53    print STDERR "   -plugin text        perl plugin module to use (there may be multiple\n";
     54    print STDERR "                       plugin entries\n";
    5455    print STDERR "   -refine   list      Space separated list of perl plugin modules to use\n";
    5556
     
    106107        $line =~ s/\*\*title\*\*/$title/g;
    107108        $line =~ s/\*\*about\*\*/$about/g;
    108         $line =~ s/\*\*plugins\*\*/$plugins/g;
     109        $line =~ s/\*\*plugins\*\*/$pluginstring/g;
    109110        $line =~ s/\*\*refine\*\*/$refine/g;
    110111
     
    119120
    120121
    121 my (@indexes, @indexestext);
     122my (@indexes, @indexestext, @plugin);
    122123
    123124# get and check options
     
    132133               'title/.+/', \$title,
    133134               'about/.+/', \$about,
    134                'plugins/.+/GMLPlug TEXTPlug ArcPlug RecPlug/', \$plugins,
     135               'plugin/.+', \@plugin,
    135136               'refine/.+/', \$refine
    136137               )) {
     
    138139    die "\n";
    139140}
    140    
     141
     142# load default plugins if none were on command line   
     143if (!scalar(@plugin)) {
     144    @plugin = (GMLPlug,TEXTPlug,ArcPlug,RecPlug);
     145}
     146
    141147# get and check the collection name
    142148($collection) = @ARGV;
     
    195201}
    196202
     203$pluginstring = "";
     204foreach $plugin (@plugin) {
     205    $pluginstring .= "plugin         $plugin\n";
     206}
    197207
    198208# make sure the model collection exists
  • trunk/gsdl/cgi-bin/webpage_buildcol.pl

    r841 r1129  
    1 #!/usr/local/bin/perl5 -w
     1#!/usr/bin/perl -w
    22
    33###########################################################################
     
    118118    my $full_importname = &util::filename_cat($full_dirname,"import");
    119119
    120     my $log_filename = &util::filename_cat($ENV{'GSDLHOME'},"log","$dirname.bld");
     120    my $log_filename = &util::filename_cat($ENV{'GSDLHOME'},"etc","$dirname.bld");
    121121    if (!open (LOGOUT, ">$log_filename"))
    122122    {
  • trunk/gsdl/cgi-bin/webpage_buildstatus.pl

    r724 r1129  
    1 #!/usr/local/bin/perl5 -w
     1#!/usr/bin/perl -w
    22
    33###########################################################################
  • trunk/gsdl/cgi-bin/webpage_delcol.pl

    r841 r1129  
    1 #!/usr/local/bin/perl5 -w
     1#!/usr/bin/perl -w
    22
    33###########################################################################
     
    140140    my $mess_url = "$args->{'httpbuild'}&bca=mess";
    141141    $mess_url .= "&bc1dirname=$dirname" if ($delete_area ne "all");
    142     print "Content: text/html\n\n $mess_url&head=_headdone_&mess=_messdonedelcol_\n\n";
     142    print "Location: $mess_url&head=_headdone_&mess=_messdonedelcol_\n\n";
    143143    return;
    144144
  • trunk/gsdl/cgi-bin/webpage_editcol.pl

    r724 r1129  
    1 #!/usr/local/bin/perl5 -w
     1#!/usr/bin/perl -w
    22
    33###########################################################################
  • trunk/gsdl/cgi-bin/webpage_mkcol.pl

    r724 r1129  
    1 #!/usr/local/bin/perl5 -w
     1#!/usr/bin/perl -w
    22
    33###########################################################################
     
    153153    $cmd .= " -creator $contact_email";
    154154    $cmd .= " -about   \"$about_desc\"";
    155     $cmd .= " -plugins \"GMLPlug ${src_format}Plug ArcPlug RecPlug\"";
     155    $cmd .= " -plugin  \"GMLPlug\"";
     156    $cmd .= " -plugin  \"${src_format}Plug\"";
     157    $cmd .= " -plugin  \"ArcPlug\"";
     158    $cmd .= " -plugin  \"RecPlug\"";
    156159### $cmd .= " -refine  \"$refine_plugs\"";
    157160    $cmd .= " $unique_dirname";
     
    162165    {
    163166        # append copydir, file_or_url and input_dir to end of collect.cfg
     167        # we'll also append DocumentUseHTML if processing HTML docs
    164168        my $cfg_filename
    165169        = &util::filename_cat($ENV{'GSDLHOME'},"collect",$unique_dirname,
     
    170174        {
    171175            print CFGAPP "\n";
     176
     177            if ($src_format eq "HTML") {
     178            print CFGAPP "format\tDocumentUseHTML\ttrue\n\n";
     179            }
     180
    172181            print CFGAPP "building\tfileorurl\t$file_or_url\n";
    173182            print CFGAPP "building\tinputdir\t$input_dir\n";
  • trunk/gsdl/macros/authen.dm

    r876 r1129  
    1111_content_ {
    1212<br><br><br><br>
    13 _messagestatus_
    14 
    1513<form name="login" method="get" action="_gwcgi_">
    1614<input type=hidden name="e" value="_If_(_cgiarger_,_cgiarger_,_decodedcompressedoptions_)">
    1715_hiddenargs_
     16<center><table width=_pagewidth_>
     17<tr><td>
     18_messagestatus_
     19</td></tr>
    1820
    19 <table border=0>
    20 <tr><td>_textusername_</td><td><input type="text" name="un" value="_cgiargun_" size=10></td></tr>
    21 <tr><td>_textpassword_</td><td><input type="password" name="pw" size=10></td></tr>
    22 <tr><td></td><td><input type="submit" value="sign in"></td></tr>
     21<tr><td>
     22<table><td>_textusername_</td>
     23<td><input type="text" name="un" value="_cgiargun_" size=10></td>
     24<td></td></tr>
     25<tr><td>_textpassword_</td>
     26<td><input type="password" name="pw" size=10></td>
     27<td><input type="submit" value="sign in"></td>
     28</tr>
     29</table>
     30<td></tr>
    2331</table>
    2432</form>
  • trunk/gsdl/macros/build.dm

    r725 r1129  
    1010<table width=100%>
    1111  <tr>
    12     <td><img src="/gsdl/images/gsdl_height.gif" width=2 height=77></td>
     12    <td><img src="_httpimg_/spacer.gif" width=2 height=77></td>
    1313    <td>_iconblankbar_
    1414        <center><h2>_1_</h2></center>
     
    4444}
    4545
     46_httpiconstop_ {_httpimg_/stop.gif}
    4647
    4748_iconwizardnext_{<img src="_httpiconmore_" align=absbottom
     
    7374_bcargfileorurl_    {file}
    7475_bcarginputdir_     {}
    75 _bcargcopydir_      {}
     76_bcargcopydir_      {yes}
    7677_bcargingsdlarea_   {no}
    7778_bcargacronyms_     {off}
     
    287288       This process is structured as a series of Web pages, overseen by the
    288289    new-collection &quot;wizard.&quot  The wizard bar at the bottom of the page
    289     shows you the sequences of pages to be completed.  You can return to
    290     a previously page by clicking on the corresponding item in the wizard bar.
     290    shows you the sequence of pages to be completed.  You can return to
     291    a previous page by clicking on the corresponding item in the wizard bar.
    291292  </td>
    292293</tr>
     
    454455          \}
    455456      \}
    456 
    457457        simulate_get_action("_httpbuild_&bca=newcol");
    458458   \}
     
    654654    Note, once a collection has been built it
    655655    is not necessary for the source data to remain in the Greenstone
    656     collection area -- the collection can be safely access, browsed
     656    collection area -- the collection can be safely accessed, browsed
    657657    and searched without this.  If you wish, however, to make changes
    658     to the collection and then rebuilt it then
    659     the source data must still be avialable.
     658    to the collection and then rebuild, the source data must still be available.
    660659     </font>
    661660  </td>
     
    906905
    907906<tr>
    908   <td>Colletion to edit:</td>
     907  <td>Collection to edit:</td>
    909908  <td colspan=3>
    910909     _fullnamemenu_
     
    11891188
    11901189   <!-- Hide code from non-js browsers
    1191    var timer = 5;
     1190   var timer = 10;
    11921191   function restart_count_down() \{
    1193     timer=5;
     1192    timer=10;
    11941193    setTimeout("count_down()",1000);
    11951194   \}
     
    13941393
    13951394<tr>
    1396   <td>Colletion to delete:</td>
     1395  <td>Collection to delete:</td>
    13971396  <td colspan=3>
    13981397     _fullnamemenu_
  • trunk/gsdl/macros/english2.dm

    r1095 r1129  
    9292_heightselcolgr_ {17}
    9393_altselcolgr_ {"Select a collection"}
    94 
    95 
    96 ######################################################################
    97 # 'status' pages
    98 package status
    99 ######################################################################
    100 
    101 
    102 #------------------------------------------------------------
    103 # text macros
    104 #------------------------------------------------------------
    105 
    106 _textframebrowser_ {You must have a frame enabled browser to view this.}
    107 _textusermanage_ {User management}
    108 _textlistusers_ {list users}
    109 _textaddusers_ {add a new user}
    110 
    111 _textinfo_ {Information}
    112 _textgeneral_ {general}
    113 _textarguments_ {arguments}
    114 _textactions_ {actions}
    115 _textprotocols_ {protocols}
    116 
    117 _textcollections_ {Collections}
    118 _textnewcoll_ {new collection}
    119 _texteditcoll_ {edit collection}
    120 _textbuildcoll_ {build collection}
    121 _textdeletecoll_ {delete collection}
    122 
    123 _textlogs_ {Logs}
    124 _textinitlog_ {init log}
    125 _texterrorlog_ {error log}
    126 
    127 _textreturnhome_ {Return to home page}
    128 
    129 _titlewelcome_ { Maintenance and Administration }
    130 
    131 _welcome_ {
    132 
    133 <p> Maintenance and administration services available include:
    134     view on-line logs;
    135     create, maintain and update collections;
    136     and access technical information such as CGI arguments. 
    137     These services are accessed using the
    138     side navigation bar on the lefthand side of the page.
    139 }
    140 
    141 
    142 #------------------------------------------------------------
    143 # icons
    144 #------------------------------------------------------------
    14594
    14695
  • trunk/gsdl/macros/status.dm

    r931 r1129  
    2222<table width=100%>
    2323  <tr>
    24     <td><img src="/gsdl/images/spacer.gif" width=2 height=77></td>
     24    <td><img src="_httpimg_/spacer.gif" width=2 height=77></td>
    2525    <td>_iconblankbar_
    2626        <center><h2>_1_</h2></center>
     
    5757_select_ {
    5858<a href="_httppagehome_" target=_top border=0><img src="_httpimg_/gsdl.gif"></a>
     59<p>
     60<a href="_gwcgi_?e=_compressedoptions_&a=status&sp=welcome" target=infoframe>_textadminhome_</a>
     61<a href="_httppagehome_" target=_top>_textreturnhome_</a>
     62
    5963
    6064_If_("_cgiarguma_" ne "\_cgiarguma\_",
     
    8084<a href="_gwcgi_?e=_compressedoptions_&a=status&sp=initlog" target=infoframe>_textinitlog_</a><br>
    8185<a href="_gwcgi_?e=_compressedoptions_&a=status&sp=errorlog" target=infoframe>_texterrorlog_</a>
    82 
    83 <p>
    84 <a href="_httppagehome_" target=_top>_textreturnhome_</a>
    8586}
    8687
    8788
     89_textframebrowser_ {You must have a frame enabled browser to view this.}
     90_textusermanage_ {User management}
     91_textlistusers_ {list users}
     92_textaddusers_ {add a new user}
     93
     94_textinfo_ {Information}
     95_textgeneral_ {general}
     96_textarguments_ {arguments}
     97_textactions_ {actions}
     98_textprotocols_ {protocols}
     99
     100_textcollections_ {Collection management}
     101_textnewcoll_ {create new collection}
     102_texteditcoll_ {edit collection}
     103_textbuildcoll_ {build collection}
     104_textdeletecoll_ {delete collection}
     105
     106_textlogs_ {Logs}
     107_textinitlog_ {init log}
     108_texterrorlog_ {error log}
     109
     110_textadminhome_ {admin home}
     111_textreturnhome_ {Greenstone home}
     112
     113_titlewelcome_ { Maintenance and Administration }
     114
     115_welcome_ {
     116
     117<center>
     118<table width=_pagewidth_><tr><td>
     119Maintenance and administration services available include:
     120<ul>
     121<li>view on-line logs
     122<li>create, maintain and update collections
     123<li>access technical information such as CGI arguments
     124</ul>
     125These services are accessed using the side navigation bar on the
     126lefthand side of the page.
     127<p>
     128_iconblankbar_
     129</td></tr>
     130<tr><th align=left><br>Collection Status</th></tr>
     131<tr><td>
     132<font color=gray>
     133Collections will only appear as &quot;running&quot; if their build.cfg
     134files exist, are readable, contain a valid builddate field (i.e. > 0),
     135and are in the collection's index directory (i.e. NOT the building
     136directory).
     137<p>
     138click <i>abbrev.</i> for information on a collection
     139<br>
     140click <i>collection</i> to view a collection
     141</font>
     142</td></tr>
     143</table>
     144</center>
     145}
  • trunk/gsdl/macros/users.dm

    r876 r1129  
    8787</font></td></tr>
    8888<tr><td>comment</td><td colspan=2><input type="text" name="umc" value="_users:usersargc_" size=50></td></tr>
    89 <tr></td><td><td><input type="submit" name=beu value="submit"></td></tr>
     89<tr><td></td><td colspan=2><input type="submit" name=beu value="submit">
     90<input type="submit" name=uma value="cancel"></td></tr>
    9091</table>
    9192</form>
  • 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.