Ignore:
Timestamp:
05/16/13 16:43:45 (11 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Introduce informational VRF tags on allocations to match uncomitted patch
in production.
Also add a minor main.cgi error-log-cleanup hack around deleting routed
blocks and master blocks instead of bending getBlockData() out of shape
only to have to put it back when the database structure changes get merged.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/main.cgi

    r596 r598  
    331331        type => $ipinfo->{type},
    332332        allocfrom => $pool,
     333        vrf => $ipinfo->{vrf},
    333334        );
    334335    } elsif ($webvar{fbtype} eq 'n') {
     
    477478  $page->param(cidr => $cidr);
    478479  $page->param(city => $q->escapeHTML($webvar{city}));
     480  $page->param(vrf => $webvar{vrf});
    479481  $page->param(custid => $webvar{custid});
    480482  $page->param(circid => $q->escapeHTML($webvar{circid}));
     
    521523  my ($code,$msg) = allocateBlock($ip_dbh, $webvar{fullcidr}, $webvar{alloc_from},
    522524        $webvar{custid}, $webvar{alloctype}, $webvar{city}, $webvar{desc}, $webvar{notes},
    523         $webvar{circid}, $webvar{privdata}, $webvar{node});
     525        $webvar{circid}, $webvar{privdata}, $webvar{node}, $webvar{vrf});
    524526
    525527  if ($code eq 'OK' || $code eq 'WARN') {
     
    695697## end node hack
    696698
     699  $page->param(vrf => $blockinfo->{vrf});
     700
    697701  my ($lastmod,undef) = split /\s+/, $blockinfo->{lastmod};
    698702  $page->param(lastmod => $lastmod);
     
    735739        type            => $webvar{alloctype},
    736740        swip            => $webvar{swip},
     741        vrf             => $webvar{vrf},
    737742        );
    738743
     
    784789  $page->param(city => $webvar{city});
    785790  $page->param(disptype => $disp_alloctypes{$webvar{alloctype}});
     791  $page->param(vrf => $webvar{vrf});
    786792  $page->param(custid => $webvar{custid});
    787793  $page->param(swip => $webvar{swip} eq 'on' ? 'Yes' : 'No');
     
    869875  # need to retrieve block data before deleting so we can notify on that
    870876  my $blockinfo = getBlockData($ip_dbh, $webvar{block});
     877# hack pthui.  This goes away with the new structure, since routed
     878# and master blocks can be retrieved with getBlockData()
     879if ($webvar{alloctype} eq 'rm') {
     880  $blockinfo = { custid => 'N/A', city => $webvar{city}, description => 'N/A' };
     881} elsif ($webvar{alloctype} eq 'mm') {
     882  $blockinfo = { custid => 'N/A', city => 'N/A', description => 'N/A' };
     883}
    871884
    872885  my ($code,$msg) = deleteBlock($ip_dbh, $webvar{block}, $webvar{alloctype});
Note: See TracChangeset for help on using the changeset viewer.