summaryrefslogtreecommitdiffstats
path: root/ogcp
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-13 10:07:52 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-05-13 10:07:52 +0200
commit7299b157d7a21f1c389daee75a78019f770d6368 (patch)
treed15bcbd4288fdce50cc066ccb6459e6f116414ad /ogcp
parent2b905ddcaf9ffcf66edb5a228f8626bc9ac7d78e (diff)
remove Format field from partition setup form
Remove the 'Format' field from the Partition and Format form as the default value will always be to format the partitions. This will lead to less portantial codepaths to maintain and support and less manual clicks in the web form.
Diffstat (limited to 'ogcp')
-rw-r--r--ogcp/forms/action_forms.py1
-rw-r--r--ogcp/templates/actions/setup.html2
-rw-r--r--ogcp/views.py4
3 files changed, 2 insertions, 5 deletions
diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py
index f2a3602..94388c8 100644
--- a/ogcp/forms/action_forms.py
+++ b/ogcp/forms/action_forms.py
@@ -56,7 +56,6 @@ class PartitionForm(FlaskForm):
('FAT32', 'FAT32'),
('EMPTY', 'Empty')])
size = IntegerField(label=_l('Size (KB)'))
- format_partition = BooleanField(label=_l('Format'))
class SelectClientForm(FlaskForm):
ips = HiddenField()
diff --git a/ogcp/templates/actions/setup.html b/ogcp/templates/actions/setup.html
index 014fb7a..a81d67e 100644
--- a/ogcp/templates/actions/setup.html
+++ b/ogcp/templates/actions/setup.html
@@ -47,7 +47,6 @@
<th>{{ _('Type') }}</th>
<th>{{ _('Filesystem') }}</th>
<th>{{ _('Size') }} (MB)</th>
- <th>{{ _('Format?') }}</th>
<th colspan="2"></th>
</tr>
</thead>
@@ -60,7 +59,6 @@
<td>{{ partition.part_type(class_="form-control") }}</td>
<td>{{ partition.fs(class_="form-control") }}</td>
<td>{{ partition.size(class_="form-control") }}</td>
- <td>{{ partition.format_partition(class_="form-control") }}</td>
<td>
<button class="btn btn-danger" type="button" onclick="RemovePartition(this)">
{{ _('Remove') }}
diff --git a/ogcp/views.py b/ogcp/views.py
index c756ac9..431e9c1 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -671,7 +671,7 @@ def action_setup_modify():
'code': str(partition.part_type.data),
'filesystem': str(partition.fs.data),
'size': str(partition.size.data * 1024),
- 'format': str(int(partition.format_partition.data))}
+ 'format': '1'}
payload['partition_setup'].append(partition_setup)
if partition.part_type.data == 'CACHE':
@@ -684,7 +684,7 @@ def action_setup_modify():
'code': 'EMPTY',
'filesystem': 'EMPTY',
'size': '0',
- 'format': '0',
+ 'format': '1',
}
payload['partition_setup'].append(empty_part)