CDR Report: add top sources, top destinations, and longest calls report options,...
[freeside.git] / httemplate / view / svc_hardware.cgi
1 <% include('elements/svc_Common.html',
2             'table'        => 'svc_hardware',
3             'labels'       => \%labels,
4             'fields'       => \@fields,
5           )
6 %>
7 <%init>
8
9 my $fields = FS::svc_hardware->table_info->{'fields'};
10 my %labels = map { $_ =>  ( ref($fields->{$_})
11                              ? $fields->{$_}{'label'}
12                              : $fields->{$_}
13                          );
14                  } keys %$fields;
15 my $model = { field => 'typenum',
16               type  => 'text',
17               value => sub { $_[0]->hardware_type->model }
18             };
19 my $status = { field => 'statusnum',
20                type  => 'text',
21                value => sub { $_[0]->status_label }
22             };
23 my @fields = ($model, qw( serial hw_addr ip_addr smartcard ), $status, 'note' );
24 </%init>