Merge pull request #4819 from nwmac/fix-percentage-max-workers

Fix issue where we keep adding a % char to the maxWorkersUnavailable field
This commit is contained in:
Neil MacDougall 2022-03-11 09:41:28 +00:00 committed by GitHub
commit 509ebf7094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -1139,6 +1139,12 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
cluster.clearProvidersExcept(field);
}
}
} else {
// If validation fails, we stay on the form, so we need to undo the formatting of the max unavailable worker
// otherwise we keep adding a '%' to the input field
const maxUnavailableWorker = get(this, 'upgradeStrategy.maxUnavailableWorker');
set(this, 'upgradeStrategy.maxUnavailableWorker', maxUnavailableWorker.replace('%', ''));
}
return ok;