[freeside-commits] freeside/torrus/perllib/Torrus/Renderer HTML.pm, 1.14, 1.15
Ivan,,,
ivan at wavetail.420.am
Tue Oct 25 19:44:18 PDT 2011
Update of /home/cvs/cvsroot/freeside/torrus/perllib/Torrus/Renderer
In directory wavetail.420.am:/tmp/cvs-serv17189/torrus/perllib/Torrus/Renderer
Modified Files:
HTML.pm
Log Message:
fix ports with dashes (-) not showing their monitoring status, RT#14926
Index: HTML.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/torrus/perllib/Torrus/Renderer/HTML.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -w -d -r1.14 -r1.15
--- HTML.pm 1 Mar 2011 00:09:39 -0000 1.14
+++ HTML.pm 26 Oct 2011 02:44:16 -0000 1.15
@@ -120,7 +120,10 @@
'freesideComponent' => sub { return $self->freesideComponent(@_); },
'uri_escape' => sub { return uri_escape(@_); },
'matches' => sub { return $_[0] =~ $_[1]; },
- 'iface_underscore' => sub { $_[0] =~ s/[\/\.]/_/g; return $_[0]; },
+
+ #false laziness w/Torrus_Internal::add_interface, update both
+ 'iface_underscore' => sub { $_[0] =~ s/[\/\.\-]/_/g; return $_[0]; },
+
'load_nms' => sub { return $self->load_nms; },
'get_serviceids' => sub { my $nms = shift;
my $router = shift;
@@ -131,13 +134,15 @@
if($type eq 'nms-add_iface.html') {
my $host = shift;
- my $iface = shift;
+ my $interface = shift;
my $nms = shift;
my $serviceids = shift;
- if ( $serviceids && $serviceids->{$iface} ) {
+ if ( $serviceids && $serviceids->{$interface} ) {
- my $svc_port = $nms->find_svc($serviceids->{$iface});
+ my $serviceid = $serviceids->{$interface};
+
+ my $svc_port = $nms->find_svc($serviceid);
if ($svc_port) {
my $url = $Torrus::Freeside::FSURL.
@@ -145,13 +150,13 @@
return "<A HREF='$url'>View Service</A>";
} else {
my $component =
- $nms->find_torrus_srvderive_component($serviceids->{$iface});
+ $nms->find_torrus_srvderive_component($serviceid);
if ($component) {
- return $serviceids->{$iface}. ' combined into '.
+ return "$serviceid combined into ".
$component->torrus_srvderive->serviceid;
} else {
- return 'Monitored as '. $serviceids->{$iface}.
+ return "Monitored as $serviceid".
'; not yet provisioned or combined';
}
}
@@ -161,7 +166,7 @@
return
$self->freesideComponent('/elements/popup_link.html',
'action' => "/freeside/misc/".
- $type."?host=$host;iface=$iface",
+ $type."?host=$host;iface=$interface",
'label' => 'Monitor for billing',
'actionlabel' => 'Monitor interface',
);
More information about the freeside-commits
mailing list