Changeset 830 for trunk


Ignore:
Timestamp:
04/08/16 15:03:39 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Add link(s) into DNSAdmin in per-IP DNS edit segment on allocation edit
page. Also extend for IPv6.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/main.cgi

    r829 r830  
    11001100  if ($blockinfo->{revavail} || $blockinfo->{revpartial}) {
    11011101    $page->param(showrev => ($blockinfo->{revavail} || $blockinfo->{revpartial}) );
     1102    $page->param(v6 => $cidr->{isv6});
     1103    $page->param(dnslink => $IPDB::dnsadmin_url);
     1104
     1105    # get the DNSAdmin zone ID(s) for this allocation.
     1106    # Multiple zones should be rare, but are NOT impossible!
     1107    my $revlist = getRevID($ip_dbh, user => $authuser, cidr => $blockinfo->{block},
     1108        location => $blockinfo->{location});
     1109    $page->param(revlist => $revlist);
     1110
    11021111    my $cached;
    11031112    # Get rDNS info;  duplicates a bit of getBlockData but also does the RPC call if possible
     
    12841293  }
    12851294
     1295  # and now IPv6
     1296##fixme:  how to remove an entry?  maybe treat empty host as "delete meeeee!"?
     1297  if ($webvar{v6list}) {
     1298    my @v6lines = split /\n/, $webvar{v6list};
     1299    foreach (@v6lines) {
     1300      s/^\s+//;
     1301      s/\s+$//;
     1302      next if /^$/;
     1303      my ($ip,$name) = split /,/;
     1304      $iprev{"host_$ip"} = $name;
     1305    }
     1306  }
     1307
    12861308  # Merge with reserved freeblock
    12871309  $updargs{fbmerge} = $webvar{expandme} if $webvar{expandme};
  • trunk/templates/edit.tmpl

    r828 r830  
    3939<td class="heading">Reverse DNS:</td>
    4040<TMPL_IF showrev>
     41<TMPL_IF v6>
     42<td class="regular">
     43<div class="rdns revdata">
     44<ul class="collapsible nocheckbox notalist">
     45<li>
     46<label for="per-iplist">Enter per-IP reverse entries as comma-separated ip,host lines below (click to show) <img src="<TMPL_VAR NAME=webpath>/images/tree_open.png"></label>
     47<input type="checkbox" id="per-iplist" />
     48<ul class="notalist">
     49<li>
     50<textarea rows="8" cols="70" name="v6list" class="regular"><TMPL_VAR NAME=v6list></textarea>
     51View reverse zone(s):
     52<TMPL_LOOP NAME=revlist><a href="<TMPL_VAR NAME=dnslink>/dns.cgi?page=reclist&amp;id=<TMPL_VAR NAME=rdns_id>&amp;defrec=n&amp;revrec=y"><TMPL_VAR NAME=revnet></a>
     53</TMPL_LOOP>
     54</li>
     55</ul>
     56</li>
     57</ul>
     58</div>
     59</td>
     60<TMPL_ELSE>
    4161<td class="regular">
    4262Pattern: <TMPL_IF maychange>
     
    6383</TMPL_LOOP>
    6484</table>
     85<TMPL_IF revlist>View reverse zone(s):
     86<TMPL_LOOP NAME=revlist><a href="<TMPL_VAR NAME=dnslink>/dns.cgi?page=reclist&amp;id=<TMPL_VAR NAME=rdns_id>&amp;defrec=n&amp;revrec=y"><TMPL_VAR NAME=revnet></a>
     87</TMPL_LOOP></TMPL_IF>
    6588</li>
    6689</ul>
     
    7093</TMPL_IF>
    7194</td>
     95</TMPL_IF>
    7296<TMPL_ELSE>
    7397<td>Reverse DNS information not currently available for this netblock</td>
Note: See TracChangeset for help on using the changeset viewer.