X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=web%2Fhtdocs%2Fchrome%2Fmenu.mc;h=623fb579826a66d125313cf9c14fabaf93680bc8;hb=4b15b6b8f210b1bd664e33c84c55a307fed4bf0c;hp=d4d905b65ba59c75180fe22887dddc64314c9c7c;hpb=3f7d9b17212d4f9327601df7c97e03624da51607;p=irspy-moved-to-github.git diff --git a/web/htdocs/chrome/menu.mc b/web/htdocs/chrome/menu.mc index d4d905b..623fb57 100644 --- a/web/htdocs/chrome/menu.mc +++ b/web/htdocs/chrome/menu.mc @@ -1,9 +1,9 @@ -%# $Id: menu.mc,v 1.13 2006-11-15 17:44:35 mike Exp $ +%# $Id: menu.mc,v 1.20 2006-12-04 16:47:27 mike Exp $

Home
Test all targets
Find a target
- Add a target
+ Add a target

Show targets @@ -12,18 +12,35 @@ <% 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'"; + } +} + +% if (defined $id && $r->param("op") ne "copy") {
This Target +
Show details
- Edit details + ">Edit details
- ">Copy target + ">Copy target

">Quick Test