mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 03:31:10 -03:30
Merge pull request #476 from jlmitch5/fixIGPercentage
fix instance group percentage
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user