From: Jonathan Prykop Date: Wed, 16 Dec 2015 02:31:53 +0000 (-0600) Subject: RT#39115: View SNMP info on svc_broadband service [got rid of dialog, displays inline] X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=aba308a52b4cf39e9bd84301514b45734f540260 RT#39115: View SNMP info on svc_broadband service [got rid of dialog, displays inline] --- 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-dialog.html deleted file mode 100644 index 61bb9c763..000000000 --- a/httemplate/elements/broadband_snmp_get-dialog.html +++ /dev/null @@ -1,68 +0,0 @@ -<%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.) - - <& '/elements/broadband_snmp_get-dialog.html', svc => $svc &> - - -% if (@snmp) { -<& '/elements/xmlhttp.html', - 'url' => $fsurl.'misc/xmlhttp-broadband_snmp_get.cgi', - 'subs' => [ 'broadband_snmp_get_request' ] - &> - - - -(snmp) - - -% } #if @snmp -<%init> -my(%opt) = @_; -my @snmp = $opt{'svc'}->cust_svc->part_svc->part_export('broadband_snmp_get'); -my $svcnum = $opt{'svc'}->svcnum; - diff --git a/httemplate/elements/broadband_snmp_get.html b/httemplate/elements/broadband_snmp_get.html new file mode 100644 index 000000000..d4cc4e49d --- /dev/null +++ b/httemplate/elements/broadband_snmp_get.html @@ -0,0 +1,56 @@ +<%doc> +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.html', svc => $svc &> + + +% if (@snmp) { +<& '/elements/xmlhttp.html', + 'url' => $fsurl.'misc/xmlhttp-broadband_snmp_get.cgi', + 'subs' => [ 'broadband_snmp_get_request' ] + &> +
+ +% } #if @snmp +<%init> +my(%opt) = @_; +my @snmp = $opt{'svc'}->cust_svc->part_svc->part_export('broadband_snmp_get'); +my $svcnum = $opt{'svc'}->svcnum; + 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 .= ' (