From 49ff577b9fbb4b017f0652cdfe567b023d7ea4de Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 10 Apr 2018 09:18:29 -0400 Subject: RT#39115 - added a optional display name for oid --- .../edit/elements/part_export/broadband_snmp_get.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'httemplate/edit/elements') diff --git a/httemplate/edit/elements/part_export/broadband_snmp_get.html b/httemplate/edit/elements/part_export/broadband_snmp_get.html index faf179acc..a426e617d 100644 --- a/httemplate/edit/elements/part_export/broadband_snmp_get.html +++ b/httemplate/edit/elements/part_export/broadband_snmp_get.html @@ -45,8 +45,11 @@ function receive_mib_get(obj, rownum) { - + + <& /elements/auto-table.html, template_row => 'broadband_snmp_get_template', - fieldorder => ['oid'], + fieldorder => ['oid_name','oid'], data => \@data, table => 'snmp', &> - + <& foot.html, %opt &> <%init> my %opt = @_; @@ -73,11 +76,13 @@ foreach my $field ( qw(snmp_version snmp_community snmp_timeout) ) { } my @oids = split("\n", $part_export->option('snmp_oid')); +my @oid_names = split("\n", $part_export->option('snmp_oid_name')); my @data; while (@oids) { my @thisrow = (shift(@oids)); - push @data, \@thisrow if grep length($_), @thisrow; + my $name = shift(@oid_names); + push @data, [$name, \@thisrow] if grep length($_), @thisrow; } my $popup_name = 'popup-'.time."-$$-".rand() * 2**32; -- cgit v1.2.1
Object ID
Object NameObject ID
+ + @@ -54,11 +57,11 @@ function receive_mib_get(obj, rownum) {