* Made some progress on displaying the network state on an HTML page using jquery. It's ugly as sin, but it works.
* Fixed a bug in Storage->write_file() where the parent directory wasn't created if it was missing. Also removed passing the mode to the parent directory creation as the file mode rarely applies to the directory (ie: 644 breaks directories but is common for files). * Changed Template->skin to return just the skin name, not the path. * Updated scancore-update-states to write the network state information to both xml (for ScanCore) and JSON (for jquery) files. Signed-off-by: Digimer <digimer@alteeve.ca>main
parent
bea6bc5e69
commit
8c42b78e63
17 changed files with 329 additions and 94 deletions
After Width: | Height: | Size: 368 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.2 KiB |
@ -0,0 +1,3 @@ |
||||
From the gnome project; |
||||
- network-wired-connected.png |
||||
- network-wired-disconnected.png |
@ -1,14 +1,81 @@ |
||||
/* |
||||
Colours; |
||||
- Darkest Gray: #343434 |
||||
- Logo Gray: #9ba0a5 |
||||
- Lightest Gray: #f7f7f7 |
||||
- Font Dark Gray: #444444 |
||||
- Font Light Gray: #f2f2f2 |
||||
- Alteeve Red: #d02724 |
||||
- Darkest Gray: #343434 |
||||
- Logo Gray: #9ba0a5 |
||||
- Lightest Gray: #f7f7f7 |
||||
- Font Dark Gray: #444444 |
||||
- Font Light Gray: #f2f2f2 |
||||
- Alteeve Red: #d02724 |
||||
- Footer background: #171717 |
||||
- Footer text: #515151 |
||||
*/ |
||||
|
||||
body { |
||||
background-image: url("skins/alteeve/images/Texture.jpg"); |
||||
background-repeat: repeat-y; |
||||
font-family: 'Dejavu Sans', Arial, Helvetica, Verdana, Sans-Serif; |
||||
background-image: url("/skins/alteeve/images/Texture.jpg"); |
||||
background-repeat: repeat; |
||||
color: #f2f2f2; |
||||
} |
||||
|
||||
.body_table { |
||||
width: 90%; |
||||
border: 0.1em solid blue; |
||||
margin: auto; |
||||
top: 0; |
||||
position: absolute; |
||||
left: 5% |
||||
} |
||||
|
||||
table { |
||||
border-spacing: 0; |
||||
border-collapse: collapse; |
||||
} |
||||
td { |
||||
border: 1px solid green; |
||||
padding: 0; |
||||
border-collapse: collapse; |
||||
} |
||||
|
||||
.logo { |
||||
height: 2.5em; |
||||
} |
||||
|
||||
.header { |
||||
text-align: center; |
||||
background: #343434; |
||||
color: #f2f2f2; |
||||
border-bottom: 0.2em solid #d02724; |
||||
} |
||||
.header a:link, .header a:visited { |
||||
cursor: pointer; |
||||
color: #f6f6f6; |
||||
text-decoration: none; |
||||
} |
||||
.header a:hover { |
||||
cursor: pointer; |
||||
color: #f6f6f6; |
||||
text-decoration: none; |
||||
} |
||||
|
||||
.footer { |
||||
text-align: center; |
||||
background: #171717; |
||||
font-size: 12px; |
||||
color: #515151; |
||||
width: 90%; |
||||
position: fixed; |
||||
bottom: 0; |
||||
left: 5%; |
||||
} |
||||
|
||||
.footer a:link, .footer a:visited { |
||||
cursor: pointer; |
||||
text-decoration: none; |
||||
color: #515151; |
||||
} |
||||
|
||||
.footer a:hover { |
||||
cursor: pointer; |
||||
text-decoration: none; |
||||
color: #616161; |
||||
} |
||||
|
@ -0,0 +1,22 @@ |
||||
$(function() {
|
||||
var say_up = "Up"; |
||||
var say_down = "Down"; |
||||
if($("#network_status").length) { |
||||
//alert('network status exists.');
|
||||
$.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+']'); |
||||
var link = say_up; |
||||
if (element.link == 0) { |
||||
link = say_down; |
||||
} |
||||
$("#"+element.name+"_mac").text(element.mac); |
||||
$("#"+element.name+"_link").text(link); |
||||
}); |
||||
});
|
||||
} |
||||
if($("#disk_status").length) { |
||||
//alert('disk status exists.');
|
||||
//$("#bar").text('B');
|
||||
} |
||||
}); |
Loading…
Reference in new issue