CSU CHILL: Difference between revisions
From CSU-CHILL
m (Moved QL stuff out of the 'kml' directory) |
(Added radar status indicator) |
||
Line 6: | Line 6: | ||
-----------"Welcome"----------> | -----------"Welcome"----------> | ||
{| style="width: | {| style="width:240px; border:solid 0px; background:none;" | ||
|style="width: | |style="width:240px; text-align:center; white-space:nowrap; color:#000;"| | ||
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;">[[About CHILL|CSU-CHILL]]</div> | <div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;">[[About CHILL|CSU-CHILL]]</div> | ||
<div style="top:+0.2em; font-size:95%;">National Weather Radar Facility</div> | <div style="top:+0.2em; font-size:95%;">National Weather Radar Facility</div> | ||
Line 25: | Line 25: | ||
*[[CHILL history|History]] | *[[CHILL history|History]] | ||
*'''[[Contacts]]''' | *'''[[Contacts]]''' | ||
<!-- | |||
------------Radar status----------> | |||
|style="width:15%; font-size:95%; color:#000;"| | |||
<html> | |||
<script language="javascript" type="text/javascript" defer="defer"> | |||
var radarStatusAjax; | |||
radarStatusAjax = new XMLHttpRequest(); | |||
var refreshtimer; | |||
refreshtimer = setTimeout("getstatus();", 100); | |||
function parseStatus(statustext) { | |||
var data = eval('(' + statustext + ')'); | |||
if (data.radarStatus == 'Inactive') { | |||
document.getElementById("radarstatus").style.backgroundColor = 'red'; | |||
document.getElementById("radarstatus").innerHTML = ' Down'; | |||
} | |||
else { | |||
document.getElementById("radarstatus").style.backgroundColor = '#00cf00'; | |||
document.getElementById("radarstatus").innerHTML = ' Up'; | |||
} | |||
refreshtimer = setTimeout("getstatus();", 60000); | |||
} | |||
function getstatus() { | |||
var d = new Date; | |||
var status_url = 'http://www.chill.colostate.edu/chill_status/chill_status.json'; | |||
status_url += '?time=' + d.getTime(); | |||
radarStatusAjax.onreadystatechange = function statechanged() { | |||
if (radarStatusAjax.readyState == 4) { | |||
parseStatus(radarStatusAjax.responseText); | |||
} | |||
} | |||
radarStatusAjax.open("GET", status_url, true); | |||
radarStatusAjax.send(null); | |||
} | |||
</script> | |||
<small>Radar<br><a href="http://www.chill.colostate.edu/w/Radar_status_test">status</a>:</small> | |||
<b><div style="padding:5px" id="radarstatus">Up!</div></b> | |||
</html> | |||
|}<!-- | |}<!-- | ||
Revision as of 15:11, 11 July 2011
|
Radar Up!
|
|
|
|
|
|
|