* Moved config JS to config.js. Signed-off-by: Digimer <digimer@alteeve.ca>main
parent
66b5c815d0
commit
86259a4783
6 changed files with 87 additions and 44 deletions
@ -0,0 +1,19 @@ |
||||
|
||||
<!-- start header --> |
||||
<!DOCTYPE html> |
||||
<html lang="#!variable!language!#"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
|
||||
<!-- Disable caching during development. --> |
||||
<meta http-equiv="cache-control" content="max-age=0" /> |
||||
<meta http-equiv="cache-control" content="no-cache" /> |
||||
<meta http-equiv="expires" content="0" /> |
||||
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> |
||||
<meta http-equiv="pragma" content="no-cache" /> <title>#!string!brand_0001!# - #!string!brand_0003!#</title> |
||||
|
||||
<link rel="stylesheet" href="#!data!skin::url!#/main.css" media="screen" /> |
||||
<script type="text/javascript" src="/jquery-latest.js"></script> |
||||
<script type="text/javascript" src="#!data!skin::url!#/main.js"></script> |
||||
</head> |
||||
<!-- end header --> |
@ -0,0 +1,45 @@ |
||||
$.ajaxSetup({ |
||||
cache: false |
||||
}); |
||||
$(function() {
|
||||
var say_up = $('#network_link_state').data('up'); |
||||
var say_down = $('#network_link_state').data('down'); |
||||
var say_speed_suffix = $('#network_link_speed').data('mbps'); |
||||
//console.log('say_up: ['+say_up+'], say_down: ['+say_down+'], say_speed_suffix: ['+say_speed_suffix+']');
|
||||
if($("#network_status").length) { |
||||
//console.log('network.json status file exists.');
|
||||
setInterval(function() { |
||||
$.getJSON('/status/network.json', { get_param: 'value' }, function(data) { |
||||
$.each(data.networks, function(index, element) { |
||||
|
||||
//console.log('entry: ['+index+'], name: ['+element.name+'], mac: ['+element.mac+'], link: ['+element.link+'], up order: ['+element.order+']');
|
||||
|
||||
var link = say_up; |
||||
if (element.link == 0) { |
||||
link = say_down; |
||||
} |
||||
$("#"+element.name+"_mac").text(element.mac); |
||||
$("#"+element.name+"_link").text(link); |
||||
$("#"+element.name+"_speed").text(element.speed+' '+say_speed_suffix); |
||||
$("#"+element.name+"_order").text(element.order); |
||||
}); |
||||
}); |
||||
}, 1000); |
||||
} |
||||
else |
||||
{ |
||||
//alert('network status strings not loaded.');
|
||||
} |
||||
if($("#disk_status").length) { |
||||
//alert('disk status exists.');
|
||||
//$("#bar").text('B');
|
||||
} |
||||
}); |
||||
|
||||
$( window ).on( "load", function() |
||||
{ |
||||
// NOTE: Disabled for now. Clears the URL to remove everything off after '?'.
|
||||
// var newURL = location.href.split("?")[0];
|
||||
// window.history.pushState('object', document.title, newURL);
|
||||
console.log('onload fired.'); |
||||
}) |
Loading…
Reference in new issue