Commit 92d6a31c by Thomas Bosch

metrics

parent 2cd6df07
......@@ -30,6 +30,6 @@ angular.module('springBootAdmin')
})
.controller('metricsCtrl', function ($scope, $stateParams, Application, ApplicationDetails) {
$scope.application = Application.query({id: $stateParams.id}, function(application) {
$scope.metrics.used = 0;
ApplicationDetails.getMetrics(application);
});
});
......@@ -41,4 +41,9 @@ angular.module('springBootAdmin.services', ['ngResource'])
app.info = response;
});
}
this.getMetrics = function(app) {
return $http.get(app.url + '/metrics').success(function(response) {
app.metrics = response;
});
}
}]);
......@@ -3,7 +3,7 @@
<tr>
<th>Used Memory</th>
<th>Free Memory</th>
<th></th>
<th>Processors</th>
<th></th>
<th></th>
<th></th>
......@@ -11,9 +11,9 @@
</thead>
<tbody>
<tr>
<td>{{metrics.used}}</td>
<td>{{metrics.free}}</td>
<td></td>
<td>{{ application.metrics['mem'] / 1024 | number:2 }} MB</td>
<td>{{ application.metrics['mem.free'] / 1024 | number:2 }} MB</td>
<td>{{ application.metrics['processors'] }}</td>
<td></td>
<td></td>
<td></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment