Changeset 605 for branches


Ignore:
Timestamp:
10/09/13 15:36:14 (11 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Brown-paper-bag fixup commit:

  • add another type to the set which can use nodes
  • template and code changes to let admin allocations includ VRF info
  • fix subtle bug in getTypeList() that returned the Routing type when it shouldn't
  • compare and display VRF info on searches
  • minor HTML formatting tweaks for clarity

Bump version to 2.8.1

Location:
branches/stable
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/stable

    • Property svn:mergeinfo changed
      /trunkmerged: 603
  • branches/stable/Makefile

    r601 r605  
    33
    44PKGNAME=ipdb
    5 VERSION=2.8
     5VERSION=2.8.1
    66RELEASE=1
    77
  • branches/stable/cgi-bin/IPDB.pm

    r601 r605  
    514514    # and contained (_r) types, dynamic-allocation ranges (_e), static IP pools (_d and _p),
    515515    # and the "miscellaneous" cn, in, and en types.
    516     $tlist = $dbh->selectall_arrayref("SELECT type,listname FROM alloctypes WHERE listorder <= 500 ".
     516    $tlist = $dbh->selectall_arrayref("SELECT type,listname FROM alloctypes WHERE listorder < 500 ".
    517517        "AND type NOT LIKE '_i' ORDER BY listorder", { Slice => {} });
    518518  } elsif ($tgroup eq 'p') {
  • branches/stable/cgi-bin/admin.cgi

    r601 r605  
    203203  my ($retcode,$msg) = allocateBlock($ip_dbh, $webvar{cidr}, $webvar{alloc_from},
    204204        $webvar{custid}, $webvar{alloctype}, $webvar{city}, $webvar{desc}, $webvar{notes},
    205         $webvar{circid});
     205        $webvar{circid}, undef, undef, $webvar{vrf});
    206206  if ($retcode eq 'OK') {
    207207    syslog "notice", "$authuser allocated '$webvar{cidr}' to '$webvar{custid}' as ".
  • branches/stable/cgi-bin/main.cgi

    r601 r605  
    679679  $page->param(havenodeid => $nodeid);
    680680
    681   if ($blockinfo->{type} eq 'fr' || $blockinfo->{type} eq 'bi') {
     681  if ($blockinfo->{type} eq 'fr' || $blockinfo->{type} eq 'bi' || $blockinfo->{type} eq 'ai') {
    682682    $page->param(typesupportsnodes => 1);
    683683    $page->param(nodename => $nodename);
  • branches/stable/cgi-bin/search.cgi

    r601 r605  
    148148  # Columns actually returned.  Slightly better than hardcoding it
    149149  # in each (sub)select
    150   my $cols = "cidr,custid,type,city,description";
     150  my $cols = "cidr,custid,type,city,description,vrf";
    151151
    152152  # hack fix for undefined variables
     
    350350#    which probably shouldn't be for reasons of sanity.
    351351
    352   my $cols = "cidr,custid,type,city,description";
     352  my $cols = "cidr,custid,type,city,description,vrf";
    353353
    354354  if ($category eq 'all') {
     
    368368    # Query for a customer ID.  Note that we can't restrict to "numeric-only"
    369369    # as we have non-numeric custIDs in the legacy data.  :/
    370     $sql = "select $cols from searchme where custid ilike '%$query%' or description ilike '%$query%'";
     370    $sql = "select $cols from searchme where custid ilike '%$query%'".
     371        " or description ilike '%$query%' or vrf ilike '%$query%'";
    371372    my $count = countRows($sql);
    372373    $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset";
     
    465466  my $count = 0;
    466467  my @sresults;
    467   while (my ($block, $custid, $type, $city, $desc) = $sth->fetchrow_array) {
     468  while (my ($block, $custid, $type, $city, $desc, $vrf) = $sth->fetchrow_array) {
    468469    my %row = (
    469470        rowclass => $count++ % 2,
     
    474475        disptype => $disp_alloctypes{$type},
    475476        city => $city,
    476         desc => $desc
     477        desc => $desc,
     478        vrf => $vrf,
    477479        );
    478480    push @sresults, \%row;
  • branches/stable/templates/admin/alloc.tmpl

    r594 r605  
    3535</tr>
    3636<tr class="row0">
     37<td>VRF identifier:</td><td><input name=vrf size=40></td>
     38</tr>
     39<tr class="row1">
    3740<td>Description/Name:</td><td><input name="desc" size="40"></td>
    3841</tr>
    39 <tr class="row1">
     42<tr class="row0">
    4043<td>Notes:</td><td><textarea name="notes" rows="3" cols="40"></textarea></td>
    4144</tr>
  • branches/stable/templates/admin/header.tmpl

    r601 r605  
    1212<div>
    1313
    14 <TMPL_UNLESS mainpage><a href="<TMPL_VAR NAME=webpath>/cgi-bin/admin.cgi">Back</a> to main<hr></TMPL_UNLESS>
     14<TMPL_UNLESS mainpage><a href="<TMPL_VAR NAME=webpath>/cgi-bin/admin.cgi">Back</a> to Admin Tools<hr></TMPL_UNLESS>
    1515
  • branches/stable/templates/assign.tmpl

    r598 r605  
    3030<td>Allocation:</td>
    3131<td>
    32 <input name="block" value="<TMPL_VAR NAME=block>">
     32<input name="block" size="25" value="<TMPL_VAR NAME=block>">
    3333<input type="hidden" name="fbassign" value="y">
    3434</td>
  • branches/stable/templates/search/sresults.tmpl

    r593 r605  
    2121<td><TMPL_VAR NAME=disptype></td>
    2222<td><TMPL_VAR NAME=city></td>
    23 <td><TMPL_VAR NAME=desc></td>
     23<td><TMPL_VAR NAME=desc><TMPL_IF vrf> - vrf:<TMPL_VAR NAME=vrf></TMPL_IF></td>
    2424</tr>
    2525</TMPL_LOOP>
Note: See TracChangeset for help on using the changeset viewer.