summaryrefslogtreecommitdiffstats
path: root/ogcp/forms
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-09-14 10:56:58 +0200
committerRoberto Hueso Gómez <rhueso@soleta.eu>2020-09-14 10:56:58 +0200
commit7815d1fac7392757f057efa25ceee2047403c86c (patch)
treecfa3cac58bd8b2ddc33481482ee491ce5fa56a9c /ogcp/forms
parent9df3c538f337d9c01b735e141fd2ab040724d73c (diff)
Add partitions setup forms
This provides a menu to setup the internal partitions setup of each machine. Delete partitions is still just a placeholder.
Diffstat (limited to 'ogcp/forms')
-rw-r--r--ogcp/forms/action_forms.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py
index d6416bd..6479b48 100644
--- a/ogcp/forms/action_forms.py
+++ b/ogcp/forms/action_forms.py
@@ -1,4 +1,6 @@
-from wtforms import Form, SubmitField, HiddenField, SelectField
+from wtforms import (
+ Form, SubmitField, HiddenField, SelectField, BooleanField, IntegerField
+)
from flask_wtf import FlaskForm
from flask_babel import _
@@ -8,3 +10,20 @@ class WOLForm(FlaskForm):
choices=[('broadcast', 'Broadcast'),
('unicast', 'Unicast')])
submit = SubmitField(label=_('Submit'))
+
+class PartitionForm(FlaskForm):
+ ips = HiddenField()
+ disk = HiddenField()
+ partition = HiddenField()
+ part_type = SelectField(label=_('Type'),
+ choices=[('LINUX', 'Linux'),
+ ('NTFS', 'NTFS'),
+ ('EMPTY', 'Empty')])
+ fs = SelectField(label=_('Filesystem'),
+ choices=[('EXT4', 'EXT4'),
+ ('NTFS', 'NTFS'),
+ ('EMPTY', 'Empty')])
+ size = IntegerField(label=_('Size (KB)'))
+ format_partition = BooleanField(label=_('Format'))
+ modify = SubmitField(label=_('Modify'))
+ delete = SubmitField(label=_('Delete'))