Changeset 373 for trunk/nagios-velvice/velvice.cgi
- Timestamp:
- Nov 4, 2018, 11:14:28 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nagios-velvice/velvice.cgi
r372 r373 165 165 $year += 1900; 166 166 $mon++; 167 #my $date= nosbreak(sprintf '%04i-%02i-%02i %02i:%02i:%02i', $year, $mon, $mday, $hour, $min, $sec);167 my $date_sec = nosbreak(sprintf '%04i-%02i-%02i %02i:%02i:%02i', $year, $mon, $mday, $hour, $min, $sec); 168 168 my $date = nosbreak(sprintf '%04i-%02i-%02i %02i:%02i', $year, $mon, $mday, $hour, $min); 169 169 … … 192 192 <link rel="shortcut icon" type="image/ico" href="$config->{'nagios-server'}{'image'}/favicon.ico"> 193 193 <script type="text/javascript"> 194 var first_loop = 0;194 // var first_loop = 0; 195 195 var refresh_sec = 900; // 15 min = 900 s 196 196 var refresh_interval; 197 197 function refresh() { 198 if (first_loop == 0) { 199 first_loop++; 200 return; 201 } 198 // if (first_loop == 0) { 199 // first_loop++; 200 // console.log("Jump First Loop"); 201 // return; 202 // } 202 203 var req = new XMLHttpRequest(); 203 204 console.log("Grabbing Value"); … … 213 214 document.getElementById('master-body').innerHTML = req.responseXML.getElementById('master-body').innerHTML; 214 215 // document.getElementById('master-body').outerHTML = req.responseXML.getElementById('master-body').outerHTML; 215 console.log("Update Value");216 // console.log("Update Value", req.responseXML.getElementById('master-body').outerHTML);216 console.log("Update Page: ", $date_sec); 217 // console.log("Update Page ", req.responseXML.getElementById('master-body').outerHTML); 217 218 218 219 refresh_next = req.responseXML.getElementById('master-body').getAttribute("refresh"); … … 224 225 clearInterval(refresh_interval); 225 226 refresh_interval = setInterval(refresh, refresh_sec * 1000); 226 console.log("Refresh Interval ", refresh_sec);227 console.log("Refresh Interval: ", refresh_sec); 227 228 document.getElementById('master-body').setAttribute("refresh", refresh_sec); 228 229 } … … 238 239 refresh_sec = 60; 239 240 } 240 refresh_interval = setInterval(refresh, refresh_sec * 1000); // Set the refresh() function to run every 900 seconds. 1 second would be 1000 241 // Set the refresh() function to run every 900 seconds. 1 second would be 1000 242 refresh_interval = setInterval(refresh, refresh_sec * 1000); 241 243 } 242 244 </script>
Note: See TracChangeset
for help on using the changeset viewer.