add MAC address and description to svc_broadband label, RT#19115
authorIvan Kohler <ivan@freeside.biz>
Fri, 8 Feb 2013 07:11:26 +0000 (23:11 -0800)
committerIvan Kohler <ivan@freeside.biz>
Fri, 8 Feb 2013 07:11:26 +0000 (23:11 -0800)
FS/FS/svc_broadband.pm

index c791dc4..46d046c 100755 (executable)
@@ -309,7 +309,12 @@ Returns the IP address.
 
 sub label {
   my $self = shift;
-  $self->ip_addr;
+  my $label = 'IP:'. ($self->ip_addr || 'Unknown');
+  $label .= '", MAC:'. $self->mac_addr
+    if $self->mac_addr;
+  $label .= ' ('. $self->description. ')'
+    if $self->description;
+  return $label;
 }
 
 =item insert [ , OPTION => VALUE ... ]