mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 21:49:27 -02:30
fix instance group percentage
This commit is contained in:
@@ -23,10 +23,10 @@ export default ['templateUrl', 'ComponentsStrings',
|
|||||||
scope.$watch('capacity', function() {
|
scope.$watch('capacity', function() {
|
||||||
if (scope.totalCapacity !== 0) {
|
if (scope.totalCapacity !== 0) {
|
||||||
scope.CapacityStyle = {
|
scope.CapacityStyle = {
|
||||||
'flex-grow': scope.capacity * 0.01
|
'flex-grow': scope.capacity / scope.totalCapacity * 0.01
|
||||||
};
|
};
|
||||||
|
|
||||||
scope.consumedCapacity = `${scope.capacity}%`;
|
scope.consumedCapacity = `${Math.round(scope.capacity / scope.totalCapacity * 10) / 10}%`;
|
||||||
} else {
|
} else {
|
||||||
scope.CapacityStyle = {
|
scope.CapacityStyle = {
|
||||||
'flex-grow': 1
|
'flex-grow': 1
|
||||||
|
|||||||
Reference in New Issue
Block a user