diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-12-15 20:31:53 -0600 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-12-15 20:31:53 -0600 |
commit | da6b5077952f9630f68363df66fa80efc8f1d5b7 (patch) | |
tree | c4b35718d5a76bb1bc19437d1bb0844703db9468 /httemplate/elements | |
parent | 08adf9b62500806763ff3a470228dfdd45494598 (diff) |
RT#39115: View SNMP info on svc_broadband service [got rid of dialog, displays inline]
Diffstat (limited to 'httemplate/elements')
-rw-r--r-- | httemplate/elements/broadband_snmp_get.html (renamed from httemplate/elements/broadband_snmp_get-dialog.html) | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/httemplate/elements/broadband_snmp_get-dialog.html b/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 &> </%doc> % 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' ] &> +<DIV ID="broadband_snmp_get"></DIV> <SCRIPT> function broadband_snmp_get (svcnum) { - var jqd = $( '#broadband_snmp_get_dialog' ); - if (!jqd.dialog( 'isOpen' )) { - jqd.dialog( 'open' ); - } - document.getElementById('broadband_snmp_get_dialog').innerHTML = '<B>Loading...</B>'; + document.getElementById('broadband_snmp_get').innerHTML = 'Loading SNMP...'; broadband_snmp_get_request('svcnum',svcnum, function (result) { var objects = JSON.parse(result) || []; @@ -41,24 +39,14 @@ function broadband_snmp_get (svcnum) { } table.appendChild(row); } - var dialog = document.getElementById('broadband_snmp_get_dialog'); - dialog.innerHTML = ''; - dialog.appendChild(table); + var resultblock = document.getElementById('broadband_snmp_get'); + resultblock.innerHTML = ''; + resultblock.appendChild(table); } // if objects.length } // function ); // broadband_snmp_get_request } // broadband_snmp_get -</SCRIPT> -<SPAN ID="broadband_snmp_get_dialog"></SPAN> -<SPAN ID="broadband_snmp_get_link"> -<A HREF="javascript: void(0)" onclick="broadband_snmp_get('<% $svcnum %>')">(snmp)</A> -</SPAN> -<SCRIPT> -$( '#broadband_snmp_get_dialog' ).dialog({ - position: { my: "left top", at: "left top", of: "#broadband_snmp_get_link" }, - autoOpen: false, - title: 'SNMP', -}); +broadband_snmp_get('<% $svcnum %>'); </SCRIPT> % } #if @snmp <%init> |