Mercurial > bottledash
comparison views/bottledash_view.tpl @ 22:3dfa9ed1dd8b
added static files
author | sean |
---|---|
date | Thu, 13 Aug 2015 13:01:12 +0200 |
parents | f730dd0bcf85 |
children | f63737665ac5 |
comparison
equal
deleted
inserted
replaced
21:f730dd0bcf85 | 22:3dfa9ed1dd8b |
---|---|
125 | 125 |
126 function set_mon_tile_status(ip, status){ | 126 function set_mon_tile_status(ip, status){ |
127 document.getElementById(ip).className = "tile statusmon " + status; | 127 document.getElementById(ip).className = "tile statusmon " + status; |
128 } | 128 } |
129 | 129 |
130 //check current state of I | 130 //check current state of an IP |
131 function check_server_state(ip){ | 131 function check_server_state(ip){ |
132 var request = new XMLHttpRequest(); | 132 var request = new XMLHttpRequest(); |
133 var params = "service=" + ip; | 133 var params = "service=" + ip; |
134 request.open('POST', "http://localhost:8080/ask-systemstate", false); | 134 request.open('POST', "http://localhost:8080/ask-systemstate", false); |
135 request.send(params); | 135 request.send(params); |
136 | |
137 // console.log(request.responseText); | 136 // console.log(request.responseText); |
138 return request.responseText | 137 return request.responseText |
139 | |
140 } | 138 } |
141 | 139 |
142 function check_server_state_loop() { | 140 function check_server_state_loop() { |
143 for (var i = 0; i < mon_tile_ips.length; i++) { | 141 for (var i = 0; i < mon_tile_ips.length; i++) { |
144 var state = check_server_state(mon_tile_ips[i]) | 142 var state = check_server_state(mon_tile_ips[i]) |