X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=web%2Fhtdocs%2Fchrome%2Fmenu.mc;h=d7d27b050ead306f6e9569bb6f0df106c35b459e;hb=e61822e08298d3fe51aa1eefa3fd9785ba2c83f8;hp=bec1847322daac37fbe59a8cc2ee9f85d41db9c3;hpb=6e7ecdbb52ed1835c7dbe4d0b912381befff50c9;p=irspy-moved-to-github.git diff --git a/web/htdocs/chrome/menu.mc b/web/htdocs/chrome/menu.mc index bec1847..d7d27b0 100644 --- a/web/htdocs/chrome/menu.mc +++ b/web/htdocs/chrome/menu.mc @@ -1,9 +1,9 @@ -%# $Id: menu.mc,v 1.11 2006-11-13 16:49:08 mike Exp $ +%# $Id: menu.mc,v 1.19 2006-11-29 18:20:42 mike Exp $
Home
Test all targets
Find a target
- Add a target
+ Add a target
Show targets @@ -12,29 +12,42 @@ <% uc($i) %> % }
-% our $rec; -% my $id = $r->param("id"); -% if (!defined $id) { -% $rec = undef; -% } else { +<%perl> +my $id = $r->param("id"); +{ + # Make up ID for newly created records. It would be more + # rigorously correct, but insanely inefficient, to submit the + # record to Zebra and then search for it; but since we know the + # formula for IDs anyway, we just build one by hand. + my $id = $r->param("id"); + my $host = $r->param("host"); + my $port = $r->param("port"); + my $dbname = $r->param("dbname"); + #warn "id='$id', host='$host', port='$port', dbname='$dbname'"; + #warn "%ARGS = {\n" . join("", map { "\t'$_' => '" . $ARGS{$_} . ",'\n" } sort keys %ARGS) . "}\n"; + if ((!defined $id || $id eq "") && + defined $host && defined $port && defined $dbname) { + $id = "$host:$port/$dbname"; + #warn "id set to '$id'"; + } +} +%perl> +% if (defined $id && $r->param("op") ne "copy") {
+ ">Quick Test
+
+ ">Full Test
+
+ ">XML +
<%doc>