From 3a02a1bce4190ce0d94883709e0a6c362bcb0af3 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Wed, 9 Dec 2015 23:39:52 -0600 Subject: RT#39115: View SNMP info on svc_broadband service --- httemplate/elements/broadband_snmp_get-dialog.html | 68 ++++++++ httemplate/elements/select-mib-popup.html | 186 --------------------- 2 files changed, 68 insertions(+), 186 deletions(-) create mode 100644 httemplate/elements/broadband_snmp_get-dialog.html delete mode 100644 httemplate/elements/select-mib-popup.html (limited to 'httemplate/elements') diff --git a/httemplate/elements/broadband_snmp_get-dialog.html b/httemplate/elements/broadband_snmp_get-dialog.html new file mode 100644 index 000000000..61bb9c763 --- /dev/null +++ b/httemplate/elements/broadband_snmp_get-dialog.html @@ -0,0 +1,68 @@ +<%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/select-mib-popup.html b/httemplate/elements/select-mib-popup.html deleted file mode 100644 index f95ce2b97..000000000 --- a/httemplate/elements/select-mib-popup.html +++ /dev/null @@ -1,186 +0,0 @@ -<& /elements/header-popup.html &> - - - - - - - - - - - - - - - - - - - - - - - - - -
Module:
Object:
- -
Module:
Data type:
- -
-<& /elements/xmlhttp.html, - url => $p.'misc/xmlhttp-mib-browse.html', - subs => [qw( search get_module_list )], -&> - -<& /elements/footer.html &> -<%init> -my $callback = 'alert("(no callback defined)" + selected_mib.stringify)'; -$cgi->param('callback') =~ /^(\w+)$/; -if ( $1 ) { - # construct the JS function call expresssion - $callback = 'window.parent.' . $1 . '(selected_mib'; - foreach ($cgi->param('arg')) { - # pass-through arguments - /^(\w+)$/ or next; - $callback .= ",'$1'"; - } - $callback .= ')'; -} - - -- cgit v1.2.1