www-thermferm/liveview.php

changeset 284
9e6fb5aed618
parent 271
e3f56dc46bcd
child 294
e07b08283d96
equal deleted inserted replaced
283:affe4d2adc94 284:9e6fb5aed618
192 $outstr .= ' $("#load_led2_'.$unr.'").html(data.led2);'.PHP_EOL; 192 $outstr .= ' $("#load_led2_'.$unr.'").html(data.led2);'.PHP_EOL;
193 $outstr .= ' $("#load_led3_'.$unr.'").html(data.led3);'.PHP_EOL; 193 $outstr .= ' $("#load_led3_'.$unr.'").html(data.led3);'.PHP_EOL;
194 $outstr .= ' $("#load_sw1_'.$unr.'").html(data.sw1);'.PHP_EOL; 194 $outstr .= ' $("#load_sw1_'.$unr.'").html(data.sw1);'.PHP_EOL;
195 $outstr .= ' $("#load_sw2_'.$unr.'").html(data.sw2);'.PHP_EOL; 195 $outstr .= ' $("#load_sw2_'.$unr.'").html(data.sw2);'.PHP_EOL;
196 $outstr .= ' $("#load_sw3_'.$unr.'").html(data.sw3);'.PHP_EOL; 196 $outstr .= ' $("#load_sw3_'.$unr.'").html(data.sw3);'.PHP_EOL;
197 if ($mode == "PROFILE")
198 $outstr .= ' $("#prof_state_'.$unr.'").html(data.profile_state);'.PHP_EOL;
197 $outstr .= ' });'.PHP_EOL; 199 $outstr .= ' });'.PHP_EOL;
198 $outstr .= ' }, 10000);'.PHP_EOL; 200 $outstr .= ' }, 10000);'.PHP_EOL;
199 $outstr .= ' });'.PHP_EOL; 201 $outstr .= ' });'.PHP_EOL;
200 $outstr .= ' </script>'.PHP_EOL; 202 $outstr .= ' </script>'.PHP_EOL;
201 $outstr .= ' <div id="fermentor">'.PHP_EOL; 203 $outstr .= ' <div id="fermentor">'.PHP_EOL;
266 $i++; 268 $i++;
267 } 269 }
268 } 270 }
269 } 271 }
270 $outstr .= ' <div style="color: blue; width: 148px; height: 23px; overflow: hidden;">Profile: '.$prof_name.'</div>'.PHP_EOL; 272 $outstr .= ' <div style="color: blue; width: 148px; height: 23px; overflow: hidden;">Profile: '.$prof_name.'</div>'.PHP_EOL;
271 $outstr .= ' <div style="color: blue; width: 148px; height: 23px; overflow: hidden;">State: '.$prof_state.'</div>'.PHP_EOL; 273 $outstr .= ' <div id="prof_state_'.$unr.'" style="color: blue; width: 148px; height: 23px; overflow: hidden;">State: '.$prof_state.'</div>'.PHP_EOL;
272 274
273 $outstr .= ' <form id="set_profile_'.$unr.'" action="index.php" method="post">'.PHP_EOL; 275 $outstr .= ' <form id="set_profile_'.$unr.'" action="index.php" method="post">'.PHP_EOL;
274 if ($prof_state == "OFF") { 276 if ($prof_state == "OFF") {
275 $outstr .= ' <select name="SetProfile" style="width: 130px;">'.PHP_EOL; 277 $outstr .= ' <select name="SetProfile" style="width: 130px;">'.PHP_EOL;
276 $outstr .= ' <option value="">None</option>'.PHP_EOL; 278 $outstr .= ' <option value="">None</option>'.PHP_EOL;
290 $outstr .= ' </select>'.PHP_EOL; 292 $outstr .= ' </select>'.PHP_EOL;
291 $outstr .= ' <input type="submit" value="Set" name="key">'.PHP_EOL; 293 $outstr .= ' <input type="submit" value="Set" name="key">'.PHP_EOL;
292 if ($profile != "(null)") 294 if ($profile != "(null)")
293 $outstr .= ' <input type="submit" value="Start" name="key">'.PHP_EOL; 295 $outstr .= ' <input type="submit" value="Start" name="key">'.PHP_EOL;
294 296
295 } else if ($prof_state == "RUN") { 297 } else if (startsWith($prof_state, "RUN")) {
296 $outstr .= ' <input type="hidden" value="'.$profile.'" name="SetProfile">'.PHP_EOL; 298 $outstr .= ' <input type="hidden" value="'.$profile.'" name="SetProfile">'.PHP_EOL;
297 $outstr .= ' <input type="submit" value="Pause" name="key">'.PHP_EOL; 299 $outstr .= ' <input type="submit" value="Pause" name="key">'.PHP_EOL;
298 $outstr .= ' <input type="submit" value="Abort" name="key">'.PHP_EOL; 300 $outstr .= ' <input type="submit" value="Abort" name="key">'.PHP_EOL;
299 } else if ($prof_state == "PAUSE") { 301 } else if ($prof_state == "PAUSE") {
300 $outstr .= ' <input type="hidden" value="'.$profile.'" name="SetProfile">'.PHP_EOL; 302 $outstr .= ' <input type="hidden" value="'.$profile.'" name="SetProfile">'.PHP_EOL;
302 $outstr .= ' <input type="submit" value="Abort" name="key">'.PHP_EOL; 304 $outstr .= ' <input type="submit" value="Abort" name="key">'.PHP_EOL;
303 } else if ($prof_state == "DONE") { 305 } else if ($prof_state == "DONE") {
304 $outstr .= ' <input type="hidden" value="'.$profile.'" name="SetProfile">'.PHP_EOL; 306 $outstr .= ' <input type="hidden" value="'.$profile.'" name="SetProfile">'.PHP_EOL;
305 $outstr .= ' <input type="submit" value="Off" name="key">'.PHP_EOL; 307 $outstr .= ' <input type="submit" value="Off" name="key">'.PHP_EOL;
306 } 308 }
307 //$outstr .= ' <input type="text" name="Beer" size="5" value="'.$set_temperature.'">'.PHP_EOL;
308 $outstr .= ' <input type="hidden" value="'.$unit.'" name="UUID">'.PHP_EOL; 309 $outstr .= ' <input type="hidden" value="'.$unit.'" name="UUID">'.PHP_EOL;
309 $outstr .= ' </form>'.PHP_EOL; 310 $outstr .= ' </form>'.PHP_EOL;
310 } 311 }
311 $outstr .= ' </div>'.PHP_EOL; 312 $outstr .= ' </div>'.PHP_EOL;
312 $outstr .= ' </div> <!-- fermentor_panel_top -->'.PHP_EOL; 313 $outstr .= ' </div> <!-- fermentor_panel_top -->'.PHP_EOL;

mercurial