X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=web%2Fhtdocs%2Fchrome%2Fmenu.mc;h=eeea277d356badbcfb42a42faf120c11abf3a60a;hb=01cd844b101715ca6fc9610fb55eff0592ce4bec;hp=9ab503a28ee73328863db63fe308f54502c5eac6;hpb=8017a14240f3e660dcf4feb9ab072d667cddd330;p=irspy-moved-to-github.git diff --git a/web/htdocs/chrome/menu.mc b/web/htdocs/chrome/menu.mc index 9ab503a..eeea277 100644 --- a/web/htdocs/chrome/menu.mc +++ b/web/htdocs/chrome/menu.mc @@ -1,9 +1,9 @@ -%# $Id: menu.mc,v 1.10 2006-11-01 10:33:09 mike Exp $ +%# $Id: menu.mc,v 1.16 2006-11-16 17:07:01 mike Exp $
Home
Test all targets
Find a target
- Add a target
+ Add a target
Show targets @@ -12,26 +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) {
+ ">Quick Test
+
+ ">Full Test
+
+ ">XML +
<%doc>