mirror of https://github.com/rancher/ui.git
AKS MaxSurge fixes
This commit is contained in:
parent
6f465e3543
commit
3d1f143c9e
|
|
@ -59,6 +59,13 @@ export default Component.extend({
|
||||||
const labels = get(this, 'nodePool.nodeLabels');
|
const labels = get(this, 'nodePool.nodeLabels');
|
||||||
|
|
||||||
set(this, 'hasLabels', Object.keys(labels || {}).length > 0);
|
set(this, 'hasLabels', Object.keys(labels || {}).length > 0);
|
||||||
|
|
||||||
|
// Ensure maxSurge is set - it may not be for an existing cluster created before the UI was updated to support maxSurge
|
||||||
|
const maxSurge = get(this, 'nodePool.maxSurge');
|
||||||
|
|
||||||
|
if (!maxSurge) {
|
||||||
|
set(this, 'nodePool.maxSurge', 1);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
|
|
||||||
|
|
@ -668,12 +668,12 @@ export default Component.extend(ClusterDriver, {
|
||||||
const intValue = parseInt(value, 10);
|
const intValue = parseInt(value, 10);
|
||||||
|
|
||||||
if (!isNaN(intValue)) {
|
if (!isNaN(intValue)) {
|
||||||
valid = intValue > 1 && intValue < 100;
|
valid = intValue >= 1 && intValue <= 100;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const intValue = parseInt(maxSurge, 10);
|
const intValue = parseInt(maxSurge, 10);
|
||||||
|
|
||||||
valid = !isNaN(intValue) && intValue > 1;
|
valid = !isNaN(intValue) && intValue >= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue