[freeside-commits] branch master updated. 66c1457c1820264d0dce794f42cf20be768c6dc3

Jonathan Prykop jonathan at 420.am
Fri Jan 30 13:29:10 PST 2015


The branch, master has been updated
       via  66c1457c1820264d0dce794f42cf20be768c6dc3 (commit)
      from  9ab7745327a6e244ddd25fe8178532a4161fa722 (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 66c1457c1820264d0dce794f42cf20be768c6dc3
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 dc9ac59..16a5ea9 100644
--- a/FS/FS/svc_hardware.pm
+++ b/FS/FS/svc_hardware.pm
@@ -132,7 +132,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