Changeset 308


Ignore:
Timestamp:
04/17/12 18:12:07 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

UI-layer changes to move action logging for importAXFR() out of
dns.cgi (see #35) and introduce a UI checkbox to merge matching
A/AAAA and PTR records on import (see #26, sort of)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r297 r308  
    14721472  $page->param(rwsoa => $webvar{rwsoa}) if $webvar{rwsoa};
    14731473  $page->param(rwns => $webvar{rwns}) if $webvar{rwns};
     1474  # This next one is arguably better on by default, but Breaking Things Is Bad, Mmmkay?
     1475  $page->param(mergematching => $webvar{mergematching}) if $webvar{mergematching};
    14741476  $page->param(dominactive => 1) if (!$webvar{domactive} && $webvar{doit});     # eww.
    14751477  $page->param(importdoms => $webvar{importdoms}) if $webvar{importdoms};
     
    14901492    }
    14911493
     1494    # Bizarre Things Happen when you AXFR a null-named zone.
     1495    $webvar{importdoms} =~ s/^\s+//;
    14921496    my @domlist = split /\s+/, $webvar{importdoms};
    14931497    my @results;
     
    14951499      my %row;
    14961500      my ($code,$msg) = importAXFR($dbh, $webvar{ifrom}, $domain, $webvar{group},
    1497         $webvar{zonestatus}, $webvar{rwsoa}, $webvar{rwns});
     1501        $webvar{zonestatus}, $webvar{rwsoa}, $webvar{rwns}, $webvar{mergematching});
    14981502      $row{domok} = $msg if $code eq 'OK';
    14991503      if ($code eq 'WARN') {
     
    15061510      }
    15071511      $msg = "<br />\n".$msg if $msg =~ m|<br />|;
    1508       logaction(domainID($dbh, $domain), $session->param("username"), $webvar{group},
    1509         "AXFR import $domain from $webvar{ifrom} ($code): $msg");
    15101512      $row{domain} = $domain;
    15111513      push @results, \%row;
  • trunk/templates/axfr.tmpl

    r38 r308  
    3535</tr>
    3636<tr class="datalinelight">
     37        <td>Merge records on A+PTR or AAAA+PTR match?</td>
     38        <td><input type="checkbox" name="mergematching"<TMPL_IF mergematching> checked="checked"</TMPL_IF> /></td>
     39</tr>
     40<tr class="datalinelight">
    3741        <td>Import as active?</td>
    3842        <td><input type="checkbox" name="domactive"<TMPL_UNLESS dominactive> checked="checked"</TMPL_UNLESS> /></td>
     
    4044<tr class="datalinelight">
    4145        <td valign="top">Domains to import:<br />(one per line)</td>
    42         <td><textarea name="importdoms" rows="10" cols="25"><TMPL_IF importdoms><TMPL_VAR NAME=importdoms></TMPL_IF></textarea></td>
     46        <td><textarea name="importdoms" rows="10" cols="45"><TMPL_IF importdoms><TMPL_VAR NAME=importdoms></TMPL_IF></textarea></td>
    4347</tr>
    4448<tr class="datalinelight">
Note: See TracChangeset for help on using the changeset viewer.