summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-03-04 14:06:30 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-03-04 14:06:30 +0000
commit9de7ff8e69420b16078c51f6a1181d4438b653e9 (patch)
treed49be3041ba35d1a15ca2dd16286304e5d93a6aa /modules
parent7b402d19642d94458f89ddd51222069bbb25ca5e (diff)
modules/admin-full: reverse time labels in realtime stats (#386)
Diffstat (limited to 'modules')
-rw-r--r--modules/admin-full/luasrc/view/admin_status/bandwidth.htm4
-rw-r--r--modules/admin-full/luasrc/view/admin_status/connections.htm4
-rw-r--r--modules/admin-full/luasrc/view/admin_status/load.htm4
-rw-r--r--modules/admin-full/luasrc/view/admin_status/wireless.htm6
4 files changed, 9 insertions, 9 deletions
diff --git a/modules/admin-full/luasrc/view/admin_status/bandwidth.htm b/modules/admin-full/luasrc/view/admin_status/bandwidth.htm
index e793dde86..003c3ebdc 100644
--- a/modules/admin-full/luasrc/view/admin_status/bandwidth.htm
+++ b/modules/admin-full/luasrc/view/admin_status/bandwidth.htm
@@ -147,7 +147,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);
@@ -160,7 +160,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);
diff --git a/modules/admin-full/luasrc/view/admin_status/connections.htm b/modules/admin-full/luasrc/view/admin_status/connections.htm
index eae17ef13..3b3618520 100644
--- a/modules/admin-full/luasrc/view/admin_status/connections.htm
+++ b/modules/admin-full/luasrc/view/admin_status/connections.htm
@@ -119,7 +119,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);
@@ -132,7 +132,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);
diff --git a/modules/admin-full/luasrc/view/admin_status/load.htm b/modules/admin-full/luasrc/view/admin_status/load.htm
index 4537645ca..64d2f3fb6 100644
--- a/modules/admin-full/luasrc/view/admin_status/load.htm
+++ b/modules/admin-full/luasrc/view/admin_status/load.htm
@@ -116,7 +116,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 +129,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);
diff --git a/modules/admin-full/luasrc/view/admin_status/wireless.htm b/modules/admin-full/luasrc/view/admin_status/wireless.htm
index 006cee701..152436318 100644
--- a/modules/admin-full/luasrc/view/admin_status/wireless.htm
+++ b/modules/admin-full/luasrc/view/admin_status/wireless.htm
@@ -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);