Changeset 851
- Timestamp:
- 04/13/16 18:16:46 (9 years ago)
- Location:
- trunk/cgi-bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/ipdb-rpc.cgi
r850 r851 267 267 die "Pool ID or VRF is required\n" if !$args{parent} && !$args{vrf}; 268 268 ($args{block}) = $ip_dbh->selectrow_array( 269 270 269 "SELECT id FROM poolips WHERE ip = ? AND ".($args{parent} ? "parent_id = ?" : "vrf = ?"), 270 undef, $args{block}, ($args{parent} ? $args{parent} : $args{vrf}) ); 271 271 } 272 272 … … 275 275 # set assignIP_on_update to simplify some calling situations. better to use allocateBlock if possible though. 276 276 my ($code,$msg) = updateBlock($ip_dbh, %args, assignIP_on_update => 1); 277 278 277 if ($code eq 'FAIL') { 279 syslog "err", "$args{rpcsystem}/$args{rpcuser} could not update block/IP ID $args{block}: '$msg'";278 syslog "err", "$args{rpcsystem}/$args{rpcuser} could not update block/IP $args{block} ($binfo->{block}): '$msg'"; 280 279 die "$msg\n"; 281 280 } 282 283 syslog "notice", "$authuser updated $args{block}"; 281 syslog "notice", "$args{rpcsystem}/$args{rpcuser} updated $args{block} ($binfo->{block})"; 284 282 285 283 return $msg; 286 287 284 } # rpc_updateBlock() 288 285 -
trunk/cgi-bin/main.cgi
r839 r851 1317 1317 1318 1318 if ($code eq 'FAIL') { 1319 syslog "err", "$authuser could not update block/IP '$binfo->{block}' (id $webvar{block}): '$msg'";1319 syslog "err", "$authuser could not update block/IP $webvar{block} ($binfo->{block}): '$msg'"; 1320 1320 $page->param(err => "Could not update block/IP $binfo->{block}: $msg"); 1321 1321 return; … … 1323 1323 1324 1324 # If we get here, the operation succeeded. 1325 syslog "notice", "$authuser updated $ binfo->{block}";1325 syslog "notice", "$authuser updated $webvar{block} ($binfo->{block})"; 1326 1326 ##fixme: log details of the change? old way is in the .debug stream anyway. 1327 1327 ##fixme: need to wedge something in to allow "update:field" notifications … … 1725 1725 } 1726 1726 if ($code eq 'OK' || $code =~ /^WARN/) { 1727 syslog "notice", "$authuser deallocated '".$blockinfo->{type}."'-type netblock $webvar{block} ". 1728 $blockinfo->{custid}.", ".$blockinfo->{city}.", desc='".$blockinfo->{description}."'"; 1729 mailNotify($ip_dbh, 'da', "REMOVED: ".$disp_alloctypes{$blockinfo->{type}}." $webvar{block}", 1730 $disp_alloctypes{$blockinfo->{type}}." $webvar{block} deallocated by $authuser\n". 1731 "CustID: ".$blockinfo->{custid}."\nCity: ".$blockinfo->{city}. 1732 "\nDescription: ".$blockinfo->{description}."\n"); 1727 syslog "notice", "$authuser deallocated '".$blockinfo->{type}."'-type netblock ID $webvar{block} ". 1728 "($blockinfo->{block}), $blockinfo->{custid}, $blockinfo->{city}, desc='$blockinfo->{description}'"; 1729 mailNotify($ip_dbh, 'da', "REMOVED: $disp_alloctypes{$blockinfo->{type}} $blockinfo->{block}", 1730 # $webvar{block} useful? do we care about the block ID here? 1731 "$disp_alloctypes{$blockinfo->{type}} $blockinfo->{block} deallocated by $authuser\n". 1732 "CustID: $blockinfo->{custid}\nCity: $blockinfo->{city}\n". 1733 "Description: $blockinfo->{description}\n"); 1733 1734 } else { 1734 1735 $page->param(failmsg => $msg); 1735 1736 if ($webvar{alloctype} =~ /^.i$/) { 1736 syslog "err", "$authuser could not deallocate static IP '$webvar{block}': '$msg'";1737 syslog "err", "$authuser could not deallocate static IP $webvar{block} ($blockinfo->{block}): '$msg'"; 1737 1738 } else { 1738 syslog "err", "$authuser could not deallocate netblock '$webvar{block}': '$msg'";1739 syslog "err", "$authuser could not deallocate netblock $webvar{block} ($blockinfo->{block}): '$msg'"; 1739 1740 $page->param(netblock => 1); 1740 1741 }
Note:
See TracChangeset
for help on using the changeset viewer.