Changeset 377 for trunk/nagios-velvice/velvice.cgi
- Timestamp:
- Nov 4, 2018, 1:09:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nagios-velvice/velvice.cgi
r376 r377 17 17 use strict; 18 18 use warnings; 19 use version; our $VERSION = version->declare('0.10. 4');19 use version; our $VERSION = version->declare('0.10.5'); 20 20 21 21 use CGI; … … 165 165 $year += 1900; 166 166 $mon++; 167 my $date_sec = sprintf '%04i-%02i-%02i %02i:%02i:%02i', $year, $mon, $mday, $hour, $min, $sec;167 # my $date_sec = sprintf '%04i-%02i-%02i %02i:%02i:%02i', $year, $mon, $mday, $hour, $min, $sec; 168 168 my $date_min = nosbreak(sprintf '%04i-%02i-%02i %02i:%02i', $year, $mon, $mday, $hour, $min); 169 169 … … 196 196 function refresh() { 197 197 var req = new XMLHttpRequest(); 198 var datenow = new Date(); 198 199 console.log("Grabbing Value"); 199 200 req.open("GET", '$cgi_script_name?only=body', true); // Grabs whatever you've written in this file … … 201 202 if (req.status == 200) { 202 203 document.getElementById('master-body').innerHTML = req.responseXML.getElementById('master-body').innerHTML; 203 console.log("Update Page : $date_sec");204 console.log("Update Page at ", datenow.toLocaleTimeString()); 204 205 205 206 refresh_next = req.responseXML.getElementById('master-body').getAttribute("refresh"); … … 211 212 clearInterval(refresh_interval); 212 213 refresh_interval = setInterval(refresh, refresh_sec * 1000); 213 console.log(" Refresh Interval at $date_sec -", refresh_sec);214 console.log("Update at ", datenow.toLocaleTimeString(), " Refresh Interval: ", refresh_sec); 214 215 document.getElementById('master-body').setAttribute("refresh", refresh_sec); 215 216 } … … 226 227 // Set the refresh() function to run every 900 seconds. 1 second would be 1000 227 228 refresh_interval = setInterval(refresh, refresh_sec * 1000); 228 console.log(" Refresh Interval at $date_sec -", refresh_sec);229 console.log("Start Refresh Interval: ", refresh_sec); 229 230 } 230 231 </script>
Note: See TracChangeset
for help on using the changeset viewer.