Changeset 621


Ignore:
Timestamp:
07/04/14 13:18:11 (10 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Brown-paper-bag fix for patch in r620; forgot to include the SQL update,
forgot to include the new field in the column selection, and got the logic
sense for whether to show the "edit block" or "allocate free IP" link
inverted. *sigh*

Location:
branches/stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/ipdb.psql

    r598 r621  
    7373);
    7474
    75 CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes, allocations.circuitid, allocations.vrf FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes, poolips.circuitid, poolips.vrf FROM poolips;
     75CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes, allocations.circuitid, allocations.vrf, 'n' AS available FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes, poolips.circuitid, poolips.vrf, poolips.available FROM poolips;
    7676
    7777CREATE TABLE "alloctypes" (
  • branches/stable/cgi-bin/search.cgi

    r620 r621  
    148148  # Columns actually returned.  Slightly better than hardcoding it
    149149  # in each (sub)select
    150   my $cols = "cidr,custid,type,city,description,vrf";
     150  my $cols = "cidr,custid,type,city,description,vrf,available";
    151151
    152152  # hack fix for undefined variables
     
    351351#    which probably shouldn't be for reasons of sanity.
    352352
    353   my $cols = "cidr,custid,type,city,description,vrf";
     353  my $cols = "cidr,custid,type,city,description,vrf,available";
    354354
    355355  if ($category eq 'all') {
     
    478478        desc => $desc,
    479479        vrf => $vrf,
    480         avail => $avail eq 'y',
     480        avail => ($avail eq 'y' ? 1 : 0),
    481481        );
    482482    push @sresults, \%row;
  • branches/stable/templates/search/sresults.tmpl

    r620 r621  
    1717<TMPL_LOOP NAME=sresults>
    1818<tr class="row<TMPL_VAR NAME=rowclass>">
    19 <td><TMPL_IF issub>Sub </TMPL_IF><a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?<TMPL_IF avail>action=edit&amp;block=<TMPL_VAR NAME=block><TMPL_ELSE>action=assign&block=<TMPL_VAR NAME=block>&fbtype=i</TMPL_IF>"><TMPL_VAR NAME=block></a><TMPL_IF ispool>&nbsp; <a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=listpool&amp;pool=<TMPL_VAR NAME=block>">List IPs</a></TMPL_IF></td>
     19<td><TMPL_IF issub>Sub </TMPL_IF><a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?<TMPL_IF avail>action=assign&block=<TMPL_VAR NAME=block>&fbtype=i<TMPL_ELSE>action=edit&amp;block=<TMPL_VAR NAME=block></TMPL_IF>"><TMPL_VAR NAME=block></a><TMPL_IF ispool>&nbsp; <a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=listpool&amp;pool=<TMPL_VAR NAME=block>">List IPs</a></TMPL_IF></td>
    2020<td><TMPL_VAR NAME=custid></td>
    2121<td><TMPL_VAR NAME=disptype></td>
Note: See TracChangeset for help on using the changeset viewer.