Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ~inc:header.inc~
- <table style="padding-left: 10px;">
- <tr><td><b>Application:</b></td><td> </td><td>Genset 1</td></tr>
- <tr><td><b>Company Name:</b></td><td> </td><td>Power Contintuity</td></tr>
- <tr><td><b>MAC Address:</b></td><td> </td><td>~Config(M)~</td></tr>
- </table>
- <div id="content">
- <h1>Graphical Status <a id="error">- ERROR!</a></h1>
- <p>~Inputs(S)~</p>
- <audio preload="auto">
- <source src="success.wav"></source>
- Your browser isn't invited for super fun audio time.
- </audio>
- <div id="status">
- <div id="loading" style="display:none">Error:<br />Connection to EMACSYS board was lost.</div>
- <div id="display">
- <p></span></p>
- <p>Inputs:<br /><span style="font-size:20pt"></p>
- <a id="btn0">• Input 1</a><br>
- <a id="btn1">• Input 2</a><br>
- <a id="btn2">• Input 3</a><br>
- <a id="btn3">• Input 4</a><br>
- <a id="btn4">• Input 5</a><br>
- <a id="btn5">• Input 6</a><br>
- <a id="btn6">• Input 7</a><br>
- <a id="btn7">• Input 8</a><br>
- <a id="btn8">• Input 9</a><br>
- <a id="btn9">• Input 10</a><br>
- <a id="btn10">• Input 11</a><br>
- <a id="btn11">• Input 12</a><br>
- <a id="btn12">• Input 13</a><br>
- <a id="btn13">• Input 14</a><br>
- <a id="btn14">• Input 15</a><br>
- <a id="btn15">• Input 16</a><br>
- </span> </p>
- <p>Canopy Temperature: <a id="analogue0">?</a>
- <br /><span style="font-size:20pt">
- <a id="pot0">›</a>
- <a id="pot1">›</a>
- <a id="pot2">›</a>
- <a id="pot3">›</a>
- <a id="pot4">›</a>
- <a id="pot5">›</a>
- <a id="pot6">›</a>
- <a id="pot7">›</a>
- <a id="pot8">›</a>
- <a id="pot9">›</a>
- </span></p>
- <p>Engine Heater Temperature: <a id="analogue1">?</a> (30-90 normal)
- <br /><span style="font-size:20pt">
- <a id="1pot0">›</a>
- <a id="1pot1">›</a>
- <a id="1pot2">›</a>
- <a id="1pot3">›</a>
- <a id="1pot4">›</a>
- <a id="1pot5">›</a>
- <a id="1pot6">›</a>
- <a id="1pot7">›</a>
- <a id="1pot8">›</a>
- <a id="1pot9">›</a>
- </span></p>
- </div>
- </div>
- <script type="text/javascript">
- // Parses the xmlResponse from status.xml and updates the status box
- function updateStatus(xmlData) {
- // Check if a timeout occurred
- if(!xmlData)
- {
- document.getElementById('display').style.display = 'none';
- document.getElementById('loading').style.display = 'inline';
- return;
- }
- // Make sure we're displaying the status display
- document.getElementById('loading').style.display = 'none';
- document.getElementById('display').style.display = 'inline';
- // Play audio on state change loader
- // Loop over all the LEDs
- for(i = 0; i < 16; i++) {
- if(getXMLValue(xmlData, 'input'+i) == '1') {
- document.getElementById('btn' + i).style.color = '#d00';
- document.getElementById('btn' + i).innerHTML = ('• ALERT ' + i);
- document.getElementById('error').style.color = '#d00';
- document.getElementByTag("audio");
- audio.play();
- }
- else {
- document.getElementById('btn' + i).style.color = '#090';
- document.getElementById('btn' + i).innerHTML = '•' + getXMLValue(xmlData, 'inputname'+i);
- document.getElementById('error').style.color = '#fff';
- document.getElementByTag("audio");
- audio.stop();
- }
- }
- // Sounds
- // Loop over all the buttons
- // Update the POT value
- document.getElementById('analogue0').innerHTML =getXMLValue(xmlData,'analogue0');
- val=0;
- for(i = 0; i < 10; i++) {
- val=val+10;
- if(getXMLValue(xmlData, 'analogue0') >val)
- document.getElementById('pot' + i).style.color = '#090';
- else
- document.getElementById('pot' + i).style.color = '#fff';
- }
- // Update the POT value 2
- document.getElementById('analogue1').innerHTML =getXMLValue(xmlData,'analogue1');
- val=0;
- for(i = 0; i < 10; i++) {
- val=val+10;
- if(getXMLValue(xmlData, 'analogue1') >val)
- document.getElementById('1pot' + i).style.color = '#090';
- else
- document.getElementById('1pot' + i).style.color = '#fff';
- }
- }
- setTimeout("newAJAXCommand('status.xml', updateStatus, true)",500);
- </script>
- </div>
- ~inc:footer.inc~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement