1 <% objToJson(\@macs) %>
4 # XXX: this should be agent-virtualized / limited
6 my $devicepart = $cgi->param('arg');
8 die 'invalid devicepart' unless $devicepart =~ /^\d+$/;
10 my $part_device = qsearchs('part_device', { 'devicepart' => $devicepart } );
11 die "unknown devicepart $devicepart" unless $part_device;
13 my $inventory_class = $part_device->inventory_class;
14 die "devicepart $devicepart has no inventory" unless $inventory_class;
18 qsearch('inventory_item', { 'classnum' => $inventory_class->classnum } );