modules: make most remaining hardcoded strings translatable, patch by "BasicXP" ...
[project/luci.git] / modules / admin-full / luasrc / view / admin_status / wireless.htm
index eb91ae6..ff8382b 100644 (file)
@@ -139,7 +139,7 @@ $Id$
 
 
                                /* plot horizontal time interval lines */
-                               for (var i = step * 60; i < width; i += step * 60)
+                               for (var i = width % (step * 60); i < width; i += step * 60)
                                {
                                        var line = G.createElementNS('http://www.w3.org/2000/svg', 'line');
                                                line.setAttribute('x1', i);
@@ -152,7 +152,7 @@ $Id$
                                                text.setAttribute('x', i + 5);
                                                text.setAttribute('y', 15);
                                                text.setAttribute('style', 'fill:#999999; font-size:9pt');
-                                               text.appendChild(G.createTextNode(Math.round(i / step / 60) + 'm'));
+                                               text.appendChild(G.createTextNode(Math.round((width - i) / step / 60) + 'm'));
 
                                        label_25.parentNode.appendChild(line);
                                        label_25.parentNode.appendChild(text);
@@ -169,7 +169,7 @@ $Id$
                                                text2.setAttribute('x', i + 5);
                                                text2.setAttribute('y', 15);
                                                text2.setAttribute('style', 'fill:#999999; font-size:9pt');
-                                               text2.appendChild(G.createTextNode(Math.round(i / step / 60) + 'm'));
+                                               text2.appendChild(G.createTextNode(Math.round((width - i) / step / 60) + 'm'));
 
                                        label_25_2.parentNode.appendChild(line2);
                                        label_25_2.parentNode.appendChild(text2);
@@ -179,7 +179,7 @@ $Id$
                                label_scale_2.innerHTML = String.format('<%:(%d minute window, %d second interval)%>', data_wanted / 60, 3);
 
                                /* render datasets, start update interval */
-                               XHR.poll(3, '<%=build_url("admin/status/wireless_status", curdev)%>', null,
+                               XHR.poll(3, '<%=build_url("admin/status/realtime/wireless_status", curdev)%>', null,
                                        function(x, data)
                                        {
                                                var noise_floor = 255;
@@ -213,7 +213,7 @@ $Id$
 
                                                        data_rssi.push(data[i][RSSI] - noise_floor);
                                                        data_noise.push(data[i][NOISE] - noise_floor);
-                                                       data_rate.push(Math.floor(data[i][RATE] / 100));
+                                                       data_rate.push(Math.floor(data[i][RATE] / 1000));
                                                }
 
                                                /* cut off outdated entries */
@@ -286,14 +286,14 @@ $Id$
                                                function wireless_label(dbm, noise)
                                                {
                                                        if (noise)
-                                                               return String.format("%d dBm (SNR %d dBm)", noise_floor + dbm - 255, dbm - noise);
+                                                               return String.format("%d <%:dBm%> (SNR %d <%:dBm%>)", noise_floor + dbm - 255, dbm - noise);
                                                        else
-                                                               return String.format("%d dBm", noise_floor + dbm - 255);
+                                                               return String.format("%d <%:dBm%>", noise_floor + dbm - 255);
                                                }
 
                                                function rate_label(mbit)
                                                {
-                                                       return String.format("%d MBit/s", mbit);
+                                                       return String.format("%d <%:Mbit/s%>", mbit);
                                                }
 
                                                label_25.firstChild.data = wireless_label(1.1 * 0.25 * data_max);
@@ -338,23 +338,23 @@ $Id$
 <table style="width:100%; table-layout:fixed" cellspacing="5">
        <tr>
                <td style="text-align:right; vertical-align:top"><strong style="border-bottom:2px solid blue"><%:Signal:%></strong></td>
-               <td id="rssi_bw_cur">0 dBm</td>
+               <td id="rssi_bw_cur">0 <%:dBm%></td>
 
                <td style="text-align:right; vertical-align:top"><strong><%:Average:%></strong></td>
-               <td id="rssi_bw_avg">0 dBm</td>
+               <td id="rssi_bw_avg">0 <%:dBm%></td>
 
                <td style="text-align:right; vertical-align:top"><strong><%:Peak:%></strong></td>
-               <td id="rssi_bw_peak">0 dBm</td>
+               <td id="rssi_bw_peak">0 <%:dBm%></td>
        </tr>
        <tr>
                <td style="text-align:right; vertical-align:top"><strong style="border-bottom:2px solid red"><%:Noise:%></strong></td>
-               <td id="noise_bw_cur">0 dBm</td>
+               <td id="noise_bw_cur">0 <%:dBm%></td>
 
                <td style="text-align:right; vertical-align:top"><strong><%:Average:%></strong></td>
-               <td id="noise_bw_avg">0 dBm</td>
+               <td id="noise_bw_avg">0 <%:dBm%></td>
 
                <td style="text-align:right; vertical-align:top"><strong><%:Peak:%></strong></td>
-               <td id="noise_bw_peak">0 dBm</td>
+               <td id="noise_bw_peak">0 <%:dBm%></td>
        </tr>
 </table>