mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 13:41:28 -03:30
Merge pull request #476 from jlmitch5/fixIGPercentage
fix instance group percentage
This commit is contained in:
commit
e877651a1e
@ -22,11 +22,14 @@ export default ['templateUrl', 'ComponentsStrings',
|
||||
|
||||
scope.$watch('capacity', function() {
|
||||
if (scope.totalCapacity !== 0) {
|
||||
var percentageCapacity = Math
|
||||
.round(scope.capacity / scope.totalCapacity * 10) / 10 * 100;
|
||||
|
||||
scope.CapacityStyle = {
|
||||
'flex-grow': scope.capacity * 0.01
|
||||
'flex-grow': percentageCapacity * 0.01
|
||||
};
|
||||
|
||||
scope.consumedCapacity = `${scope.capacity}%`;
|
||||
scope.consumedCapacity = `${percentageCapacity}%`;
|
||||
} else {
|
||||
scope.CapacityStyle = {
|
||||
'flex-grow': 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user