minor UI Improvements

Scanned hosts displayed with their OS, Total monkeys num now presented
This commit is contained in:
itsikkes 2016-07-17 19:12:30 +03:00
parent 9e1b9db646
commit ef325928a9
4 changed files with 32 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -71,6 +71,23 @@
</div>
<!-- /.Network section -->
<!-- Info section -->
<div class="col-lg-3 col-md-6 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<a href="#info" data-toggle="collapse">General Info</a>
</div>
<div id="info" class="panel-body panel-collapse collapse in">
<div>
Num of Monkeys: <label id="infoNumOfMonkeys">0</label>
</div>
</div>
</div>
</div>
<!-- /.Info section -->
<!-- Details section -->
<div class="col-lg-3 col-md-6 col-sm-6">
<div class="panel panel-default">

View File

@ -63,6 +63,8 @@ function initAdmin() {
edges: edges
};
$('#infoNumOfMonkeys').html(monkeys.length)
var options = {
};
@ -132,6 +134,7 @@ function updateMonkeys() {
{
monkeys.push(new_monkeys[i]);
nodes.push(createMonkeyNode(new_monkeys[i]));
$('#infoNumOfMonkeys').html(monkeys.length)
}
}
@ -196,7 +199,18 @@ function createMonkeyNode(monkey) {
}
function createMachineNode(machine) {
img = ICONS_DIR + "computer" + ICONS_EXT;
img = "computer";
if (undefined != machine.os.type) {
if (machine.os.type == "linux") {
img += "-linux";
}
else if (machine.os.type == "windows") {
img += "-windows";
}
}
img = ICONS_DIR + img + ICONS_EXT;
return {
'id': machine.ip_addr,