- Timestamp:
- 01/17/13 15:47:14 (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r585 r586 1462 1462 } elsif ($btype =~ /^.i$/) { 1463 1463 my $binfo = $dbh->selectrow_hashref("SELECT ip AS block, custid, type, city, circuitid, description,". 1464 " notes, modifystamp AS lastmod, privdata, vrf, pool, rdepth ".1464 " notes, modifystamp AS lastmod, privdata, vrf, pool, rdepth, rdns". 1465 1465 " FROM poolips WHERE ip = ?", undef, ($block) ); 1466 1466 # " FROM poolips WHERE ip = ? AND vrf = ?", undef, ($block, $vrf) ); … … 1468 1468 } else { 1469 1469 my $binfo = $dbh->selectrow_hashref("SELECT cidr AS block, parent, custid, type, city, circuitid, ". 1470 "description, notes, modifystamp AS lastmod, privdata, vrf, swip, rdepth ".1470 "description, notes, modifystamp AS lastmod, privdata, vrf, swip, rdepth, rdns". 1471 1471 " FROM allocations WHERE cidr = ? AND rdepth = ?", undef, ($block, $rdepth) ); 1472 1472 # " FROM allocations WHERE cidr = ? AND rdepth = ? AND vrf = ?", undef, ($block, $rdepth, $vrf) ); … … 1502 1502 # or sub-/19 /24 to retrieve - it's the least-wrong way to do things. 1503 1503 1504 my ($rpcblock) = $cidr->split( ($cidr->masklen <= 16 ? 16 : 24) ); 1504 my ($rpcblock) = ($cidr->masklen <= 24 ? $cidr->split( ($cidr->masklen <= 16 ? 16 : 24) ) : $cidr); 1505 1505 1506 my %rpcargs = ( 1506 1507 rpcuser => $args{user}, 1507 rpcsystem => 'ipdb',1508 1508 group => $revgroup, # not sure how this could sanely be exposed, tbh... 1509 1509 cidr => "$rpcblock", 1510 1510 ); 1511 1511 1512 eval { 1513 $result = $server->call('dnsdb.getRevPattern', %rpcargs); 1514 }; 1515 if ($@) { 1516 my $msg = $@; 1517 $msg =~ s/Fault returned from XML RPC Server, fault code 4: error executing RPC `dnsdb.addRDNS'\.\s//; 1518 } 1512 $rdns = _rpc('getRevPattern', %rpcargs); 1519 1513 } 1520 1514 -
trunk/cgi-bin/main.cgi
r585 r586 654 654 $blockinfo->{type} =~ s/\s//; 655 655 656 # Get rDNS info; duplicates a bit of getBlockData but also does the RPC call if possible 657 $blockinfo->{rdns} = getBlockRDNS($ip_dbh, $webvar{block}, $webvar{rdepth}, user => $authuser); 658 656 659 $page->param(block => $webvar{block}); 660 $page->param(rdns => $blockinfo->{rdns}); 657 661 $page->param(rdepth => $blockinfo->{rdepth}); 658 662 -
trunk/templates/edit.tmpl
r576 r586 23 23 24 24 <tr class="row1"> 25 <td class="heading">Reverse DNS pattern:</td> 26 <td class="regular"> 27 <TMPL_IF maychange> 28 <input type="text" name="rdns" size="40" value="<TMPL_VAR NAME=rdns>"> 29 <TMPL_ELSE> 30 <TMPL_VAR NAME=rdns> 31 </TMPL_IF> 32 <input type="button" value=" ? " onclick="helpRDNS()" class="regular"> 33 </td> 34 </tr> 35 36 <tr class="row0"> 25 37 <td class=heading>City:</td> 26 38 <td class="regular"> … … 33 45 </tr> 34 46 35 <tr class="row 0">47 <tr class="row1"> 36 48 <td class=heading>Type:</td> 37 49 <td class=regular> … … 48 60 </tr> 49 61 50 <tr class="row 1">62 <tr class="row0"> 51 63 <td class=heading>Demarc/tower:</td> 52 64 <td class=regular> … … 67 79 </tr> 68 80 69 <tr class="row 0">81 <tr class="row1"> 70 82 <td class=heading>CustID:</td> 71 83 <td class="regular"> … … 78 90 </tr> 79 91 80 <tr class="row 1">92 <tr class="row0"> 81 93 <td class=heading>SWIPed?:</td> 82 94 <td class=regular> … … 93 105 </tr> 94 106 95 <tr class="row 0">107 <tr class="row1"> 96 108 <td class=heading>Last modified:</td> 97 109 <td class=regular><TMPL_VAR NAME=lastmod></td> 98 110 </tr> 99 111 100 <tr class="row 1">112 <tr class="row0"> 101 113 <td class="heading">Circuit ID:</td> 102 114 <td class="regular"> … … 109 121 </tr> 110 122 111 <tr class="row 0">123 <tr class="row1"> 112 124 <td class="heading">Description/Name:</td> 113 125 <td class="regular"> … … 120 132 </tr> 121 133 122 <tr class="row 1">134 <tr class="row0"> 123 135 <td class="heading" valign="top">Notes:</td> 124 136 <td class="regular"> … … 131 143 132 144 <TMPL_IF nocling> 133 <tr class="row 0">145 <tr class="row1"> 134 146 <td class="heading" valign="top">Restricted data:</td> 135 147 <td class="regular"> … … 144 156 145 157 <TMPL_IF maychange> 146 <tr class="row<TMPL_IF nocling> 1<TMPL_ELSE>0</TMPL_IF>">158 <tr class="row<TMPL_IF nocling>0<TMPL_ELSE>1</TMPL_IF>"> 147 159 <td colspan="2" class="center"> 148 160 <input type="submit" value=" Update this block " class="regular"> … … 161 173 <form method="POST" action="main.cgi"> 162 174 <fieldset><legend class="noshow"> </legend> 163 <div class="row<TMPL_IF nocling><TMPL_IF maychange> 0<TMPL_ELSE>1</TMPL_IF><TMPL_ELSE><TMPL_IF maychange>1<TMPL_ELSE>0</TMPL_IF></TMPL_IF>">175 <div class="row<TMPL_IF nocling><TMPL_IF maychange>1<TMPL_ELSE>0</TMPL_IF><TMPL_ELSE><TMPL_IF maychange>0<TMPL_ELSE>1</TMPL_IF></TMPL_IF>"> 164 176 <input type="hidden" name="action" value="delete"> 165 177 <input type="hidden" name="block" value="<TMPL_VAR NAME=block>">
Note:
See TracChangeset
for help on using the changeset viewer.