[freeside-commits] branch FREESIDE_3_BRANCH updated. 4c6648c06d62df50aeb39baf81552ecde0a5f6ba

Jonathan Prykop jonathan at 420.am
Mon Feb 2 13:39:45 PST 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  4c6648c06d62df50aeb39baf81552ecde0a5f6ba (commit)
      from  b403c08477da81266b789e103767f096daff4828 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4c6648c06d62df50aeb39baf81552ecde0a5f6ba
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Fri Jan 30 15:27:36 2015 -0600

    #32873: Hardware Service Display of variable on interface

diff --git a/FS/FS/svc_hardware.pm b/FS/FS/svc_hardware.pm
index b28cc9e..d9c3c46 100644
--- a/FS/FS/svc_hardware.pm
+++ b/FS/FS/svc_hardware.pm
@@ -133,7 +133,17 @@ sub search_sql {
 
 sub label {
   my $self = shift;
-  $self->serial || $self->display_hw_addr;
+  my @label = ();
+  if (my $type = $self->hardware_type) {
+    push @label, 'Type:' . $type->description;
+  }
+  if (my $ser = $self->serial) {
+    push @label, 'Serial#' . $ser;
+  }
+  if (my $mac = $self->display_hw_addr) {
+    push @label, 'MAC:'. $mac;
+  }
+  return join(', ', @label);
 }
 
 =item insert

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/svc_hardware.pm |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list