luci-mod-admin-full: style and script fixes for realtime bandwidth graph
- add Math.log2() polyfill for IE 11 - use sans-serif font for time axis Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
bce7543d8f
commit
ecedfe5dcc
1 changed files with 3 additions and 1 deletions
|
@ -59,6 +59,8 @@
|
||||||
var label_scale;
|
var label_scale;
|
||||||
|
|
||||||
|
|
||||||
|
Math.log2 = Math.log2 || function(x) { return Math.log(x) * Math.LOG2E; };
|
||||||
|
|
||||||
function bandwidth_label(bytes, br)
|
function bandwidth_label(bytes, br)
|
||||||
{
|
{
|
||||||
var uby = '<%:kB/s%>';
|
var uby = '<%:kB/s%>';
|
||||||
|
@ -149,7 +151,7 @@
|
||||||
var text = G.createElementNS('http://www.w3.org/2000/svg', 'text');
|
var text = G.createElementNS('http://www.w3.org/2000/svg', 'text');
|
||||||
text.setAttribute('x', i + 5);
|
text.setAttribute('x', i + 5);
|
||||||
text.setAttribute('y', 15);
|
text.setAttribute('y', 15);
|
||||||
text.setAttribute('style', 'fill:#999999; font-size:9pt');
|
text.setAttribute('style', 'fill:#999999; font-size:9pt; font-family:sans-serif');
|
||||||
text.appendChild(G.createTextNode(Math.round((width - i) / step / 60) + 'm'));
|
text.appendChild(G.createTextNode(Math.round((width - i) / step / 60) + 'm'));
|
||||||
|
|
||||||
label_25.parentNode.appendChild(line);
|
label_25.parentNode.appendChild(line);
|
||||||
|
|
Loading…
Reference in a new issue