Ignore:
Timestamp:
04/27/18 15:28:45 (7 years ago)
Author:
Kris Deugau
Message:

/trunk

Start adding a generalized in-your-face infonotice space to attach warnings
to a netblock. See #17 and #23, sort of.

  • table to hold the notices, since they're likely to be far fewer than the overall allocation count
  • show any notices for the parent chain for new allocations in the admin tools
File:
1 edited

Legend:

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

    r906 r915  
    149149  ($fbid, $fb, $fbparent) = findAllocateFrom($ip_dbh, $maskbits, $webvar{alloctype}, '','',
    150150        (gimme => "$cidr", allowpriv => 1));
     151
     152  # retrieve any notices
     153  my $nlist = getBlockNotices($ip_dbh, $fbparent);
     154  my @notices;
     155  foreach (@$nlist) {
     156    push @notices, $_->{notice} if $_->{notice};
     157  }
     158  my $blockmsg = join("<br>\n", @notices);
     159  $page->param(blockmsg => $blockmsg);
     160
    151161  $page->param(fbid => $fbid);
    152162  $page->param(parid => $fbparent);
     
    205215    goto ERRJUMP;
    206216  }
     217
     218  # retrieve any notices
     219  my $nlist = getBlockNotices($ip_dbh, $webvar{parent});
     220  my @notices;
     221  foreach (@$nlist) {
     222    push @notices, $_->{notice} if $_->{notice};
     223  }
     224  my $blockmsg = join("<br>\n", @notices);
     225  $page->param(blockmsg => $blockmsg);
    207226
    208227  my ($retcode,$msg) = allocateBlock($ip_dbh, cidr => $webvar{cidr}, fbid => $webvar{fbid},
Note: See TracChangeset for help on using the changeset viewer.