From aba308a52b4cf39e9bd84301514b45734f540260 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Tue, 15 Dec 2015 20:31:53 -0600 Subject: [PATCH] RT#39115: View SNMP info on svc_broadband service [got rid of dialog, displays inline] --- FS/FS/part_export/broadband_snmp_get.pm | 3 +- ...nmp_get-dialog.html => broadband_snmp_get.html} | 34 +++++++--------------- httemplate/view/svc_broadband.cgi | 2 +- 3 files changed, 13 insertions(+), 26 deletions(-) rename httemplate/elements/{broadband_snmp_get-dialog.html => broadband_snmp_get.html} (57%) diff --git a/FS/FS/part_export/broadband_snmp_get.pm b/FS/FS/part_export/broadband_snmp_get.pm index faa51ed06..fafe91a65 100644 --- a/FS/FS/part_export/broadband_snmp_get.pm +++ b/FS/FS/part_export/broadband_snmp_get.pm @@ -30,8 +30,7 @@ tie my %options, 'Tie::IxHash', 'options' => \%options, 'no_machine' => 1, 'notes' => <<'END', -Use this export to configure the community and object ids for displaying realtime -SNMP data from the service IP address when viewing a provisioned service. Timeout is +Display broadband service status information via SNMP. Timeout is per object, and should be small enough for realtime use. This export takes no action during provisioning itself; it is expected that snmp will be separately configured on the service machine. diff --git a/httemplate/elements/broadband_snmp_get-dialog.html b/httemplate/elements/broadband_snmp_get.html similarity index 57% rename from httemplate/elements/broadband_snmp_get-dialog.html rename to httemplate/elements/broadband_snmp_get.html index 61bb9c763..d4cc4e49d 100644 --- a/httemplate/elements/broadband_snmp_get-dialog.html +++ b/httemplate/elements/broadband_snmp_get.html @@ -1,9 +1,10 @@ <%doc> -Adds a link to display snmp statistics based on broadband_snmp_get export config. -Performs necessary checks such that, if no such exports are configured for the passed -service, returns blank space (ie may be safely invoked even if no exports are configured.) +Adds a table to display dynamically loaded snmp statistics based on broadband_snmp_get +export config. Performs necessary checks such that, if no such exports are configured +for the passed service, returns blank space (ie may be safely invoked even if no exports +are configured.) - <& '/elements/broadband_snmp_get-dialog.html', svc => $svc &> + <& '/elements/broadband_snmp_get.html', svc => $svc &> % if (@snmp) { @@ -11,13 +12,10 @@ service, returns blank space (ie may be safely invoked even if no exports are co 'url' => $fsurl.'misc/xmlhttp-broadband_snmp_get.cgi', 'subs' => [ 'broadband_snmp_get_request' ] &> +
- - -(snmp) - - % } #if @snmp <%init> diff --git a/httemplate/view/svc_broadband.cgi b/httemplate/view/svc_broadband.cgi index bc272e844..0517c307a 100644 --- a/httemplate/view/svc_broadband.cgi +++ b/httemplate/view/svc_broadband.cgi @@ -72,7 +72,6 @@ sub ip_addr { my $out = $ip_addr; $out .= ' (' . include('/elements/popup_link-ping.html', ip => $ip_addr) . ')' if $ip_addr; - $out .= include('/elements/broadband_snmp_get-dialog.html', svc => $svc); if ($svc->cust_svc->part_svc->part_export('cacti')) { $out .= ' (