modules/admin-full: add DSL status to index page (#620)
[project/luci.git] / modules / admin-full / luasrc / view / admin_status / load.htm
index 4537645..a002715 100644 (file)
@@ -8,8 +8,6 @@ You may obtain a copy of the License at
 
        http://www.apache.org/licenses/LICENSE-2.0
 
-$Id$
-
 -%>
 
 <%+header%>
@@ -116,7 +114,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);
@@ -129,7 +127,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);
@@ -235,7 +233,7 @@ $Id$
 
                                                label_01_cur.innerHTML = (data_01[data_01.length-1] / 100).toFixed(2);
                                                label_05_cur.innerHTML = (data_05[data_05.length-1] / 100).toFixed(2);
-                                               label_15_cur.innerHTML = (data_01[data_15.length-1] / 100).toFixed(2);
+                                               label_15_cur.innerHTML = (data_15[data_15.length-1] / 100).toFixed(2);
 
                                                label_01_avg.innerHTML = (data_01_avg / 100).toFixed(2);
                                                label_05_avg.innerHTML = (data_05_avg / 100).toFixed(2);
@@ -244,9 +242,6 @@ $Id$
                                                label_01_peak.innerHTML = (data_01_peak / 100).toFixed(2);
                                                label_05_peak.innerHTML = (data_05_peak / 100).toFixed(2);
                                                label_15_peak.innerHTML = (data_15_peak / 100).toFixed(2);
-
-                                               /* reset timer */
-                                               window.setTimeout(update_graph, 1000);
                                        }
                                );
                        }
@@ -262,7 +257,7 @@ $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 #ff0000"><%:1 Minute Load:%></strong></td>
+               <td style="text-align:right; vertical-align:top"><strong style="border-bottom:2px solid #ff0000; white-space:nowrap"><%:1 Minute Load:%></strong></td>
                <td id="lb_load01_cur">0</td>
 
                <td style="text-align:right; vertical-align:top"><strong><%:Average:%></strong></td>
@@ -272,7 +267,7 @@ $Id$
                <td id="lb_load01_peak">0</td>
        </tr>
        <tr>
-               <td style="text-align:right; vertical-align:top"><strong style="border-bottom:2px solid #ff6600"><%:5 Minute Load:%></strong></td>
+               <td style="text-align:right; vertical-align:top"><strong style="border-bottom:2px solid #ff6600; white-space:nowrap"><%:5 Minute Load:%></strong></td>
                <td id="lb_load05_cur">0</td>
 
                <td style="text-align:right; vertical-align:top"><strong><%:Average:%></strong></td>
@@ -282,7 +277,7 @@ $Id$
                <td id="lb_load05_peak">0</td>
        </tr>
        <tr>
-               <td style="text-align:right; vertical-align:top"><strong style="border-bottom:2px solid #ffaa00"><%:15 Minute Load:%></strong></td>
+               <td style="text-align:right; vertical-align:top"><strong style="border-bottom:2px solid #ffaa00; white-space:nowrap"><%:15 Minute Load:%></strong></td>
                <td id="lb_load15_cur">0</td>
 
                <td style="text-align:right; vertical-align:top"><strong><%:Average:%></strong></td>