- Timestamp:
- 12/21/12 17:55:49 (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r576 r577 792 792 my $blockdata; 793 793 794 if ($webvar{ alloctype} eq 'rm') {794 if ($webvar{rdepth} == 0) { # $webvar{alloctype} eq 'mm' 795 795 796 796 $blockdata->{block} = $webvar{block}; 797 $blockdata->{city} = getRoutedCity($ip_dbh, $webvar{block});797 $blockdata->{city} = "N/A"; 798 798 $blockdata->{custid} = "N/A"; 799 $blockdata->{type} = $webvar{alloctype};799 $blockdata->{type} = 'mm'; 800 800 $blockdata->{circuitid} = "N/A"; 801 801 $blockdata->{description} = "N/A"; 802 802 $blockdata->{notes} = "N/A"; 803 803 $blockdata->{privdata} = "N/A"; 804 805 } elsif ($webvar{alloctype} eq 'mm') { 806 807 $blockdata->{block} = $webvar{block}; 808 $blockdata->{city} = "N/A"; 809 $blockdata->{custid} = "N/A"; 810 $blockdata->{type} = $webvar{alloctype}; 811 $blockdata->{circuitid} = "N/A"; 812 $blockdata->{description} = "N/A"; 813 $blockdata->{notes} = "N/A"; 814 $blockdata->{privdata} = "N/A"; 804 $blockdata->{rdepth} = 0; 815 805 816 806 } else { 817 807 818 $blockdata = getBlockData($ip_dbh, $webvar{block} )808 $blockdata = getBlockData($ip_dbh, $webvar{block}, $webvar{rdepth}); 819 809 820 810 } # end cases for different alloctypes 821 811 822 812 $page->param(block => $blockdata->{block}); 813 $page->param(rdepth => $blockdata->{rdepth}); 823 814 $page->param(disptype => $disp_alloctypes{$blockdata->{type}}); 824 $page->param(type => $blockdata->{type});815 # $page->param(type => $blockdata->{type}); 825 816 $page->param(city => $blockdata->{city}); 826 817 $page->param(custid => $blockdata->{custid}); … … 850 841 851 842 # need to retrieve block data before deleting so we can notify on that 852 my $blockinfo = getBlockData($ip_dbh, $webvar{block} );853 854 my ($code,$msg) = deleteBlock($ip_dbh, $webvar{block}, $webvar{ alloctype});843 my $blockinfo = getBlockData($ip_dbh, $webvar{block}, $webvar{rdepth}); 844 845 my ($code,$msg) = deleteBlock($ip_dbh, $webvar{block}, $webvar{rdepth}, $webvar{vrf}); 855 846 856 847 $page->param(block => $webvar{block}); 857 if ($code eq 'OK') { 848 $page->param(delparent => $blockinfo->{parent}) if $webvar{rdepth}; 849 $page->param(prdepth => $webvar{rdepth}); 850 if ($code =~ /^WARN/) { 851 my ($bp,$bd) = split /,/, $msg; 852 $page->param(bparent => $bp); 853 $page->param(brdepth => $bd); 854 $page->param(mergeip => $code eq 'WARNPOOL'); 855 } 856 857 if ($code eq 'OK' || $code =~ /^WARN/) { 858 858 syslog "notice", "$authuser deallocated '$webvar{alloctype}'-type netblock $webvar{block} ". 859 859 $blockinfo->{custid}.", ".$blockinfo->{city}.", desc='".$blockinfo->{description}."'"; -
trunk/templates/delete.tmpl
r538 r577 60 60 <input type="button" value="Back" onclick="history.go(-1)"><input type="submit" value="Confirm"> 61 61 <input type="hidden" name="block" value="<TMPL_VAR NAME=block>"> 62 <input type="hidden" name=" alloctype" value="<TMPL_VAR NAME=type>">62 <input type="hidden" name="rdepth" value="<TMPL_VAR NAME=rdepth>"> 63 63 <input type="hidden" name="action" value="finaldelete"> 64 64 </fieldset> -
trunk/templates/finaldelete.tmpl
r517 r577 1 <TMPL_IF webpath></TMPL_IF>2 1 <div class="center"> 3 2 <TMPL_IF failmsg> … … 6 5 <TMPL_ELSE> 7 6 <div class="heading">Success! <TMPL_VAR NAME=block> deallocated.</div> 7 <TMPL_IF bparent><br><div> 8 Warning: 9 <TMPL_IF mergeip>IPs in <TMPL_VAR NAME=block> were released as available static IPs in <TMPL_VAR NAME=bparent> 10 <a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=listpool&pool=<TMPL_VAR NAME=bparent>&rdepth=<TMPL_VAR NAME=brdepth>"><TMPL_VAR NAME=bparent></a>,<br> 11 not released for general netblock assignment under 12 <a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=showsubs&block=<TMPL_VAR NAME=delparent>&rdepth=<TMPL_VAR NAME=prdepth>"><TMPL_VAR NAME=delparent></a>. 13 <TMPL_ELSE> 14 <TMPL_VAR NAME=block> was released as free and merged with blocks under 15 <a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=showsubs&block=<TMPL_VAR NAME=bparent>&rdepth=<TMPL_VAR NAME=brdepth>"><TMPL_VAR NAME=bparent></a>, 16 not <a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=showsubs&block=<TMPL_VAR NAME=delparent>&rdepth=<TMPL_VAR NAME=prdepth>"><TMPL_VAR NAME=delparent></a>. 17 </TMPL_IF> 18 </div> 19 <TMPL_ELSE> 20 <TMPL_IF delparent><div>Return to <a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=showsubs&block=<TMPL_VAR NAME=delparent>&rdepth=<TMPL_VAR NAME=prdepth>"><TMPL_VAR NAME=delparent></a></div></TMPL_IF> 21 </TMPL_IF> 8 22 </TMPL_IF> 9 23 </div>
Note:
See TracChangeset
for help on using the changeset viewer.