|
|
|
@ -177,7 +177,17 @@ |
|
|
|
</div> |
|
|
|
<!-- /widget-header --> |
|
|
|
<div class="widget-content"> |
|
|
|
{% include 'users.html' %} |
|
|
|
<table class="table table-hover table-condensed table-bordered"> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th>User</th> |
|
|
|
<th>TTY</th> |
|
|
|
<th>Logged in from</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody id="get-users"> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
<!-- /widget-content --> |
|
|
|
</div> |
|
|
|
@ -283,6 +293,17 @@ dashboard.getDisk = function() { |
|
|
|
$("#get-disk").html( tr ); |
|
|
|
}); |
|
|
|
} |
|
|
|
dashboard.getUsers = function() { |
|
|
|
$.getJSON('/info/getusers/{{ getusers }}', function(data) { |
|
|
|
var tr=''; |
|
|
|
$.each( data, function( index, item){ |
|
|
|
tr+='<tr><td>'+item[0]+'</td><td>'+item[1]+'</td><td>'+item[2]+'</td></tr>'; |
|
|
|
}) |
|
|
|
tr+=''; |
|
|
|
$("#get-users").html( tr ); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var mem_ctx = $("#memoryChart").get(0).getContext("2d"); |
|
|
|
var memChart = new Chart(mem_ctx); |
|
|
|
@ -328,6 +349,7 @@ var load_ctx = $("#loadChart").get(0).getContext("2d"); |
|
|
|
window.setInterval('load_average()', {{ time_refresh }}); |
|
|
|
window.setInterval('dashboard.getOs()', {{ time_refresh }}); |
|
|
|
window.setInterval('dashboard.getDisk()', {{ time_refresh }}); |
|
|
|
window.setInterval('dashboard.getUsers()', {{ time_refresh }}); |
|
|
|
window.setInterval('cpuu_usage()', {{ time_refresh }}); |
|
|
|
}); |
|
|
|
|
|
|
|
|