Skip to content
Snippets Groups Projects
Commit 1a62327a authored by Panagis Tselentis's avatar Panagis Tselentis
Browse files

Fix issue #179

parent 86ba4e80
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,14 @@
}
}
$scope.convert2Unit = function(number) {
if(number >= 1000000) {
return (number/1000000).toFixed(2) + "M"
}else{
return number.toString();
}
}
$scope.isEnabled = function(name) {
for(var key in $scope.info.plugins.enabled_in_cluster) {
if(name === $scope.info.plugins.enabled_in_cluster[key]) {
......
......@@ -44,34 +44,34 @@
<div class="panel-title">
<i class="mdi mdi-lan-connect"></i>&nbsp;
CONNECTIONS
<span class="pull-right">Total Requests: <strong>{{status.server.total_requests}}</strong></span>
<span class="pull-right">Total Requests: <strong>{{convert2Unit(status.server.total_requests)}}</strong></span>
</div>
</div>
<div class="panel-body">
<div class="row text-center">
<div class="col-sm-2">
<strong>ACTIVE</strong>
<h3>{{status.server.connections_active}}</h3>
<h3>{{convert2Unit(status.server.connections_active)}}</h3>
</div>
<div class="col-sm-2">
<strong>READING</strong>
<h3>{{status.server.connections_reading}}</h3>
<h3>{{convert2Unit(status.server.connections_reading)}}</h3>
</div>
<div class="col-sm-2">
<strong>WRITING</strong>
<h3>{{status.server.connections_writing}}</h3>
<h3>{{convert2Unit(status.server.connections_writing)}}</h3>
</div>
<div class="col-sm-2">
<strong>WAITING</strong>
<h3>{{status.server.connections_waiting}}</h3>
<h3>{{convert2Unit(status.server.connections_waiting)}}</h3>
</div>
<div class="col-sm-2">
<strong>ACCEPTED</strong>
<h3>{{status.server.connections_accepted}}</h3>
<h3>{{convert2Unit(status.server.connections_accepted)}}</h3>
</div>
<div class="col-sm-2">
<strong>HANDLED</strong>
<h3>{{status.server.connections_handled}}</h3>
<h3>{{convert2Unit(status.server.connections_handled)}}</h3>
</div>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment