From 3da7eef0dc426b970eafd42e84ad870c8fd51915 Mon Sep 17 00:00:00 2001 From: Cristian Mondo Date: Tue, 28 Feb 2023 14:40:58 -0300 Subject: [PATCH] Add new fields in the GUI to edit filesystem size for root var and log The new filesystems - var, root and log - are not able to be modified from the GUI, because the form does not show these filesystems. This fix adds the new filesystems so they can be modified. Closes-Bug: 2008810 Test Plan: PASS: Modify the new filesystems from the GUI. If the size is decreased, the appropriate error message will be displayed. PASS: Modify the other filesystems from the GUI. If the size is decreased, the appropriate error message will be displayed. Signed-off-by: Cristian Mondo Change-Id: Idfe3b48762708fbed5f7d029445590667c1c43cc --- .../admin/inventory/filesystems/forms.py | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/filesystems/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/filesystems/forms.py index 38257961..1727e72b 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/filesystems/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/filesystems/forms.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2019 Wind River Systems, Inc. +# Copyright (c) 2019-2023 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -53,6 +53,24 @@ class UpdateFilesystems(forms.SelfHandlingForm): help_text=_("Scratch storage space in gibibytes."), min_value=0) + root = forms.IntegerField( + label=_("Root Storage (GiB)"), + required=True, + help_text=_("Root storage space in gibibytes."), + min_value=0) + + var = forms.IntegerField( + label=_("Var Storage (GiB)"), + required=True, + help_text=_("Var storage space in gibibytes."), + min_value=0) + + log = forms.IntegerField( + label=_("Log Storage (GiB)"), + required=True, + help_text=_("Log storage space in gibibytes."), + min_value=0) + failure_url = 'horizon:admin:inventory:detail' failure_message = 'Failed to update host filesystems configuration.'