1. 04 Aug, 2008 1 commit
  2. 20 Jul, 2008 1 commit
  3. 18 Jul, 2008 2 commits
    • Leigh B. Stoller's avatar
      Minor fix. · 6cb0ab6f
      Leigh B. Stoller authored
      6cb0ab6f
    • Leigh B. Stoller's avatar
      Now that the documentation links all point to the wiki, change the · 19ff170f
      Leigh B. Stoller authored
      search function to redirect over to the wiki. Note that all of the KB
      entries are stored in the Wiki now.
      
      There is a new defs variable called $REMOTEWIKIDOCS that currently
      defaults to on. When on, documentation and search goto to emulab.net,
      but when off, they go to local docs that will be unpacked in
      /usr/testbed/www/wikidocs on the remote boss. Searches also stay
      local, and the swish config has been updated to reflect that change.
      19ff170f
  4. 15 Mar, 2007 1 commit
  5. 12 Feb, 2007 1 commit
    • Leigh B. Stoller's avatar
      * Replace the argument processing code in all pages. Currently we rely on · 48acc8e3
      Leigh B. Stoller authored
        register_globals=1 to turn POST/GET/COOKIES arguments in local variables.
        This is known to be a terrible security risk, and we keep saying we are
        going to fix it, and now I am. In order to accomplish this on a
        transitional basis (since I don't want the entire web interface to stop
        working while I debug it), and because the code just needs the cleanup, I
        am doing it like this: Each page will sport new declarations at the top:
      
      	RequiredPageArguments("experiment", PAGEARG_EXPERIMENT,
                                    "template",   PAGEARG_TEMPLATE,
                                    "instance",   PAGEARG_INSTANCE,
                                    "metadata",   PAGEARG_METADATA,
                                    "osinfo",     PAGEARG_OSINFO,
                                    "image",      PAGEARG_IMAGE,
                                    "project",    PAGEARG_PROJECT,
                                    "group",      PAGEARG_GROUP,
                                    "user",       PAGEARG_USER,
      			      "node",       PAGEARG_NODE,
      			      "yesno",      PAGEARG_BOOLEAN,
      			      "message",    PAGEARG_STRING,
      			      "age",        PAGEARG_INTEGER,
                                    "cost",       PAGEARG_NUMERIC,
                                    "formfields", PAGEARG_ARRAY,
                                    "unknown",    PAGEARG_ANYTHING);
      
      	OptionalPageArguments("canceled", PAGEARG_BOOLEAN);
      
        The first token in each pair is the name of the global variable to
        set, and the second token is the type. So, for "experiment" we look at
        the URL for a pid/eid or exptidx, etc, sanity check them (safe for a
        DB query), and then try to find that experiment in the DB. If it maps
        to an experiment, set global variable $experiment to the object. Since
        its a required argument, produce an error if not supplied. Similar
        treatment for optional arguments, with the obvious difference.
      
        The goal is to have ALL argument processing in one place, consistent,
        and correct. I've found numerous places where we leak unchecked
        arguments into queries. It also cuts out a lot of duplicated code.
      
      * To make the above easier to deal with, I've been replacing lots of
        hardcoded URLS in the code of the form:
      
      	foo.php3?pid=$pid&eid=$eid ...
      
        with
      
              CreateURL("foo", $experiment)
      
        which creates and returns the neccessary url string, by looking at
        the type of its arguments (experiment, template, instance, etc.)
      
        Eventually plan to replace them all so that URL handling throughout
        the code is all defined in one place (all the new URL code is in
        url_defs.php).
      
      * I have cranked up error reporting to tell me anytime a variable is
        used before it is initialized, plus a bunch of other stuff that PHP
        deems improper. Think of it like -Wall ... and boy we get a lot of
        warnings.  A very large percentage of the diffs are to fix all these
        warnings.
      
        The warnings are currently going to /usr/testbed/log/php-errors.log,
        and I'll be adding a script to capture them each night and mail them
        to tbops. This file also gets errors (this will be a change for
        developers; rather then seeing errors and warnings dumped in the
        middle of web pages, they will go to this file instead).
      
      * Major refactoring of the code. More objects (nodes, images, osids).
        Moving tons of queries into the objects in the hopes of someday
        getting to a point where we can split the web interface onto a
        different server.  Lots of general cleanup.
      48acc8e3
  6. 17 Aug, 2005 1 commit
    • Leigh B. Stoller's avatar
      The Emulab Knowledge Base! · 6f08c442
      Leigh B. Stoller authored
      Okay, I implemented a primitive Knowledge Base! The current contents are
      *all* the existing FAQ entries, which I entered manually. Here are the
      details.
      
      * My reason for doing this is that we need something very simple. The wiki
        is too much of a barrier, and its search capabilities are pathetic.
      
      * The search page for the Knowledge Base is:
      
      	https://www.emulab.net/kb-search.php3
      
        Fairly primitive keyword search. Turns out that mysql 4.0 has a bunch for
        really good text searching functions built in, but we run 3.23 ... so I
        had to roll it myself. So, its a simple keyword (space or comma
        separated) search, no regular expressions.
      
      * Each DB record has a "faq_entry" flag, so creating the current FAQ on the
        fly from the DB is easy. See:
      
      	https://www.emulab.net/kb-faq.php3
      
      * In reddot mode, you can add new KB entries:
      
      	https://www.emulab.net/kb-manage.php3
      
        The form is fairly obvious but here are details anyway:
      
          Section Name: Choose an existing title, or make up a new one.
          Title:        The title of the KB (or FAQ) entry.
          Faq Entry:    Check this box if the new entry should show up in the FAQ.
          X Ref Tag:    A token so you can refer to other KB entries by name,
                        instead of by its index. Within the KB entry you would
                        write: <a href=kb-show.php3?xref_tag=sometag>
          Body:         Whatever you like. I took the existing FAQ entries and
                        stuck them with no changes except for the xref_tag
                        mentioned about (since some entries referenced other
                        entries).
      
      * Once you click on sumbit, you will see the entry as it will appear to
        users, along with a submenu to Modify/Delete/Add entries. You can modify
        the current entry from that menu. Mere users do not see this menu, only
        when in reddot mode.
      
      * The intent here is that we can generate new entries really easy, right
        from email if you like (with appropriate <pre> or <xmp> tags around it).
      
      * I have added sql/knowlbase-create.sql and a makefile target to
        generate that file when creating a distribution. I also added a section
        to install/boss-install to insert the entries into the new DB.
      
      * I hooked the search function into the existing Search Documentation link.
        We know search both the Knowledge Base *and* the Documentation on doc
        searches. This probably needs a little more work to get right.
      
      * I changed a lot of faq links to be more consistent and to reference
        the proper xref_tags (#swapping instead of #UTT-34).
      6f08c442
  7. 16 Apr, 2004 1 commit
    • Leigh B. Stoller's avatar
      Replace old and tired webglimpse with new and modern index/search · ac1c62df
      Leigh B. Stoller authored
      soeftware called swish-e since webglimpse was broken, did not install
      out of the box, no longer being maintained by the authors, and
      generally a pain in the ass.
      
      swish-e is probably overkill, but it works and can be configured and
      run from a single configuration file (swish.conf.in).
      
      I've removed the advanced search form and replaced with simple form.
      I can bring back advanced stuff if needed, although better to wait
      until the swish-e port is upgraded and there is better backend support
      for generating the html output.
      
      There is a backend script called websearch that is called from the php
      search page. It invokes swish and spits out html that is amenable to
      being inbedded in our existing page layout (we were not able to do
      that with webglimpse).
      ac1c62df
  8. 16 Aug, 2002 1 commit
    • Chad Barb's avatar
      · 60529980
      Chad Barb authored
      The big one.
      
      New look;
      most of the changes are in menu.php3.
      
      A lot of the changes in other files are s/<TD>/<TH>/
      for table headers.
      
      Also closed some tags, tweaked some table styles, etc..
      
      No actual functionality should have changed.
      
      Will be installing soon...
      60529980
  9. 07 Jul, 2002 1 commit
  10. 12 Nov, 2001 1 commit
    • Leigh B. Stoller's avatar
      Check in search page stuff. I've incorporated the web form from the · 423e25a5
      Leigh B. Stoller authored
      webglimpse dir right into search.php3. Its a simple form and I wanted
      it to look a little different. It also allows me to get rid of the
      FollowSymlinks change I made a couple of days ago. I've added a
      install section that creates a symlink to the webglimpse dir, but
      thats strictly for convenience. The install target cds into that
      directory and reruns the glimpse index (its very quick cause we do not
      have much documentation, perhaps a second. Overall, I do not like the
      webglimpse stuff, but it will do for now.
      423e25a5