<%doc> Quite a bit of false laziness with edit/elements/part_export/broadband_snmp.html <& head.html, %opt &> <& /elements/tr-select.html, label => 'SNMP version', field => 'snmp_version', options => [ '1', '2c' ], curr_value => $part_export->option('version') &> <& /elements/tr-input-text.html, label => 'Community', field => 'snmp_community', curr_value => $part_export->option('community') || $opt{'export_info'}->{'options'}->{'snmp_community'}->{'default'}, &> <& /elements/tr-input-text.html, label => 'Timeout (seconds)', field => 'snmp_timeout', curr_value => $part_export->option('timeout') || $opt{'export_info'}->{'options'}->{'snmp_timeout'}->{'default'}, &> <& /elements/auto-table.html, template_row => 'broadband_snmp_get_template', fieldorder => ['oid'], data => \@data, table => 'snmp', &> <& foot.html, %opt &> <%init> my %opt = @_; my $part_export = $opt{part_export} || FS::part_export->new; my @oids = split("\n", $part_export->option('snmp_oid')); my @data; while (@oids) { my @thisrow = (shift(@oids)); push @data, \@thisrow if grep length($_), @thisrow; } my $popup_name = 'popup-'.time."-$$-".rand() * 2**32;
Object ID