1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

fix rounding of capacity percentage

This commit is contained in:
John Mitchell 2017-09-28 11:18:55 -04:00
parent 9219f0f682
commit c57d39dcd9
No known key found for this signature in database
GPG Key ID: FE6A9B5BD4EB5C94

View File

@ -23,7 +23,7 @@ export default ['templateUrl', 'ComponentsStrings',
scope.$watch('capacity', function() {
if (scope.totalCapacity !== 0) {
var percentageCapacity = Math
.round(scope.capacity / scope.totalCapacity * 10) / 10 * 100;
.round(scope.capacity / scope.totalCapacity * 1000) / 10;
scope.CapacityStyle = {
'flex-grow': percentageCapacity * 0.01