Skip to content

Commit

Permalink
Add minimum is critical feature to the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
VoigtS committed Oct 30, 2024
1 parent aea945b commit dbd8201
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ export default class CastellumConfigurationEditModal extends React.Component {
size_minimum: (cfg.size_constraints || {}).minimum || "",
size_maximum: (cfg.size_constraints || {}).maximum || "",
free_minimum: (cfg.size_constraints || {}).minimum_free || "",
minimum_free_is_critical: (cfg.size_constraints || {}).minimum_free != "" ? "true" : "false",
}
}

Expand Down Expand Up @@ -290,8 +291,9 @@ export default class CastellumConfigurationEditModal extends React.Component {
if (values.free_minimum != "") {
config.size_constraints = config.size_constraints || {}
config.size_constraints.minimum_free = parseInt(values.free_minimum, 10)
config.size_constraints.minimum_free_is_critical = true
}

this.props
.configureAutoscaling(this.props.projectID, config)
.then(this.close)
Expand Down

0 comments on commit dbd8201

Please sign in to comment.