X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_port.pm;h=a0252b49278c53cd3bf758af974767af989a49d7;hb=7f4e4fddb595f5c825a18c88ed79029160650dc9;hp=b5f88fda9ffef82107df14b194cbf7432302c886;hpb=40eba685efe118970146190a6502071f29d57ce2;p=freeside.git diff --git a/FS/FS/svc_port.pm b/FS/FS/svc_port.pm index b5f88fda9..a0252b492 100644 --- a/FS/FS/svc_port.pm +++ b/FS/FS/svc_port.pm @@ -80,7 +80,8 @@ sub table_info { 'name' => 'Port', #'name_plural' => 'Ports', #optional, #'longname_plural' => 'Ports', #optional - 'sorts' => [ 'svcnum', 'serviceid' ], # optional sort field (or arrayref of sort fields, main first) + #'sorts' => [ 'svcnum', 'serviceid' ], # optional sort field (or arrayref of sort fields, main first) + 'sorts' => [ 'serviceid' ], # optional sort field (or arrayref of sort fields, main first) 'display_weight' => 75, 'cancel_weight' => 10, 'fields' => { @@ -238,7 +239,7 @@ sub _format_bandwidth { } # and hopefully we don't have folks doing Tbps on a single port :) - $value = sprintf("%.2f$suffix",$value) if $value >= 0; + $value = sprintf("%6.2f$suffix",$value) if $value >= 0; $value; } @@ -342,7 +343,7 @@ sub graph_png { my $out_avg = $self->_format_bandwidth($out_sum/$numsamples); my $percentile = max( $self->_percentile(\@in), $self->_percentile(\@out) ); - my @percentile = ( $percentile x scalar(@in) ); + my @percentile = map $percentile, @in; $percentile = $self->_format_bandwidth($percentile); #for below warn "$me timediff=$timediff bwdiff=$bwdiff start=$start end=$end ". @@ -412,11 +413,11 @@ sub graph_png { my $black = $gd->colorAllocate(0,0,0); $gd->string(gdMediumBoldFont,50,$height-55, - "Current: $in_curr Average: $in_avg Maximum: $in_max Minimum: $in_min",$black); + "Current:$in_curr Average:$in_avg Maximum:$in_max Minimum:$in_min",$black); $gd->string(gdMediumBoldFont,50,$height-35, - "Current: $out_curr Average: $out_avg Maximum: $out_max Minimum: $out_min",$black); + "Current:$out_curr Average:$out_avg Maximum:$out_max Minimum:$out_min",$black); $gd->string(gdMediumBoldFont,50,$height-15, - "95th percentile: $percentile", $black); + "95th percentile:$percentile", $black); return $gd->png; }