diff options
author | Javier Hernandez <jhernandez@soleta.eu> | 2024-01-15 10:11:20 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-01-15 10:23:05 +0100 |
commit | d075cdd0034559d378b118c578f650397912111e (patch) | |
tree | ca22b298f743f1a5f1837c7fba83652eb14721b3 | |
parent | 04fe9e836746144a597d270db16142046f1b69b3 (diff) |
forms: Remove netiface from client's form
Remove netiface selectable in clientsDetails form.
eth{0,1,2} is misleading, it does not represent the real device in the client.
And users we know always boot from the first device.
Hide this feature until there is a better design for this.
-rw-r--r-- | ogcp/forms/action_forms.py | 4 | ||||
-rw-r--r-- | ogcp/views.py | 7 |
2 files changed, 2 insertions, 9 deletions
diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py index ed9825a..3c53d0c 100644 --- a/ogcp/forms/action_forms.py +++ b/ogcp/forms/action_forms.py @@ -123,10 +123,6 @@ class ClientDetailsForm(FlaskForm): choices=[('ogLive', 'Default'),]) remote = BooleanField(label=_l('Remote')) maintenance = BooleanField(label=_l('Maintenance')) - netiface = SelectField(label=_l('Interface'), - choices=[('eth0', 'eth0'), - ('eth1', 'eth1'), - ('eth2', 'eth2')]) repo = SelectField(label=_l('Repository')) room = SelectField(label=_l('Room')) folder_id = HiddenField() diff --git a/ogcp/views.py b/ogcp/views.py index c00098f..cf162be 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -881,8 +881,6 @@ def action_client_info(): form.remote.render_kw = {'readonly': True} form.maintenance.data = db_client['maintenance'] form.maintenance.render_kw = {'readonly': True} - form.netiface.data = db_client['netiface'] - form.netiface.render_kw = {'readonly': True} repositories = get_repositories(server) form.repo.choices = [(repo["id"], repo["name"]) for repo in repositories if db_client['repo_id'] == repo["id"]] @@ -945,7 +943,7 @@ def action_client_update(): "serial_number": form.serial_number.data, "netdriver": "generic", "maintenance": form.maintenance.data, - "netiface": form.netiface.data, + "netiface": "eth0", "repo_id": int(form.repo.data), "netmask": "0", "remote": form.remote.data, @@ -984,7 +982,6 @@ def action_client_update(): form.livedir.render_kw = {'readonly': True} form.remote.data = db_client['remote'] form.maintenance.data = db_client['maintenance'] - form.netiface.data = db_client['netiface'] current_mode = db_client['boot'] r = server.get('/mode') @@ -1110,7 +1107,7 @@ def action_client_add(): "maintenance": form.maintenance.data, "name": form.name.data, "netdriver": "generic", - "netiface": form.netiface.data, + "netiface": "eth0", "netmask": "0", "remote": form.remote.data, "repo_id": int(form.repo.data), |