From dbd820133bc1a0795c1a41ccb9e79542ad776ab7 Mon Sep 17 00:00:00 2001 From: VoigtS Date: Wed, 30 Oct 2024 16:45:40 +0100 Subject: [PATCH] Add minimum is critical feature to the UI --- .../widgets/app/components/castellum/configuration/edit.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/shared_filesystem_storage/app/javascript/widgets/app/components/castellum/configuration/edit.jsx b/plugins/shared_filesystem_storage/app/javascript/widgets/app/components/castellum/configuration/edit.jsx index 97e4fc88da..cc478d04e2 100644 --- a/plugins/shared_filesystem_storage/app/javascript/widgets/app/components/castellum/configuration/edit.jsx +++ b/plugins/shared_filesystem_storage/app/javascript/widgets/app/components/castellum/configuration/edit.jsx @@ -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", } } @@ -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)