1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.0//EN'
>
4 For use with Tomato Firmware only.
5 No part of this file may be used without permission.
9 <meta http-equiv='content-type' content='text/html;charset=utf-
8'
>
10 <meta name='robots' content='noindex,nofollow'
>
11 <title>[<%
ident(); %>] NAS: UPS Monitor
</title>
12 <link rel='stylesheet' type='text/css' href='tomato.css'
>
14 <script type='text/javascript' src='tomato.js'
></script>
15 <style type='text/css'
>
21 <style type='text/css'
>
39 <script type='text/javascript'
>
45 clientSideInclude('ups-status', '/ext/cgi-bin/tomatoups.cgi');
46 clientSideInclude('ups-data', '/ext/cgi-bin/tomatodata.cgi');
48 function clientSideInclude(id
, url
) {
50 // For Safari, Firefox, and other non-MS browsers
51 if (window
.XMLHttpRequest
) {
53 req
= new XMLHttpRequest();
57 } else if (window
.ActiveXObject
) {
58 // For Internet Explorer on Windows
60 req
= new ActiveXObject("Msxml2.XMLHTTP");
63 req
= new ActiveXObject("Microsoft.XMLHTTP");
69 var element
= document
.getElementById(id
);
71 alert("Bad id " + id
+
72 "passed to clientSideInclude." +
73 "You need a div or span element " +
74 "with this id in your page.");
78 // Synchronous request, wait till we have it all
79 req
.open('GET', url
, false);
81 element
.innerHTML
= req
.responseText
;
84 "Sorry, your browser does not support " +
85 "XMLHTTPRequest objects. This page requires " +
86 "Internet Explorer 5 or better for Windows, " +
87 "or Firefox for any system, or Safari. Other " +
88 "compatible browsers may also exist.";
93 <body onload='init()'
>
94 <form id='_fom' method='post' action='tomato.cgi'
>
95 <table id='container' cellspacing=
0>
96 <tr><td colspan=
2 id='header'
>
97 <div class='title'
>Tomato
</div>
98 <div class='version'
>Version <%
version(); %></div>
100 <tr id='body'
><td id='navi'
style=
"height: 188px"><script type='text/javascript'
>navi()</script></td>
101 <td id='content'
style=
"height: 188px">
102 <div id='ident'
><%
ident(); %></div>
103 <input type='hidden' name='_nextpage' value='nas-ups.asp'
>
104 <div class='section-title'
>APC UPS Status
</div>
105 <div class='section'
>
106 <span id=
"ups-status"></span>
108 <div class='section-title'
>APC UPS Response
</div>
109 <div class='section'
>
110 <span id=
"ups-data"></span>
113 <tr><td id='footer' colspan=
2> </td></tr>