summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2023-11-24 13:28:06 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-11-27 09:44:47 +0100
commit4f565255af3f841155012e89478a2fab8396273c (patch)
treea6341ca0b75afda153b23cc2c5cd7b312d0c119a
parent3f27dd3ef140248fb790a7c616335525a87e31fd (diff)
client: Remove 'netmask' in form
Remove unnecessary field 'netmask' from forms used to create and update clients. Netmask is configured in rooms instead.
-rw-r--r--ogcp/forms/action_forms.py1
-rw-r--r--ogcp/views.py5
2 files changed, 2 insertions, 4 deletions
diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py
index 4a18738..1918bf8 100644
--- a/ogcp/forms/action_forms.py
+++ b/ogcp/forms/action_forms.py
@@ -104,7 +104,6 @@ class ClientDetailsForm(FlaskForm):
ip = StringField(label=_l('IP'))
mac = StringField(label=_l('MAC'))
serial_number = StringField(label=_l('Serial Number'))
- netmask = StringField(label=_l('Netmask'))
livedir = SelectField(label=_l('ogLive'),
choices=[('ogLive', 'Default'),])
remote = BooleanField(label=_l('Remote'))
diff --git a/ogcp/views.py b/ogcp/views.py
index 72be70a..bf4fdb0 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -865,7 +865,7 @@ def action_client_update():
"maintenance": form.maintenance.data,
"netiface": form.netiface.data,
"repo_id": int(form.repo.data),
- "netmask": form.netmask.data,
+ "netmask": "0",
"remote": form.remote.data,
"room": int(form.room.data),
"name": form.name.data,
@@ -898,7 +898,6 @@ def action_client_update():
form.name.data = db_client['name']
form.mac.data = db_client['mac']
form.serial_number.data = db_client['serial_number']
- form.netmask.data = db_client['netmask']
form.livedir.render_kw = {'readonly': True}
form.remote.data = db_client['remote']
form.maintenance.data = db_client['maintenance']
@@ -931,7 +930,7 @@ def action_client_add():
"name": form.name.data,
"netdriver": "generic",
"netiface": form.netiface.data,
- "netmask": form.netmask.data,
+ "netmask": "0",
"remote": form.remote.data,
"repo_id": int(form.repo.data),
"room": int(form.room.data),