summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2024-01-12 12:05:34 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-01-12 12:18:00 +0100
commit088316e006638c2f2b7c9de98df40e8f488f9c52 (patch)
tree21fc2d9819d690ef8e387840acb698621517d4e9
parentc20061db56083dde9649dd2f480c77c2663d778b (diff)
views: Make client details form read only
In client details command, show read-only form
-rw-r--r--ogcp/views.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index b34c169..c414af3 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -863,18 +863,29 @@ def action_client_info():
db_client = r.json()
form.name.data = db_client['name']
+ form.name.render_kw = {'readonly': True}
form.ip.data = db_client['ip']
+ form.ip.render_kw = {'readonly': True}
form.mac.data = db_client['mac']
+ form.mac.render_kw = {'readonly': True}
form.serial_number.data = db_client['serial_number']
+ form.serial_number.render_kw = {'readonly': True}
form.livedir.data = db_client['livedir']
+ form.livedir.render_kw = {'readonly': True}
form.remote.data = db_client['remote']
+ 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"]]
+ form.repo.render_kw = {'readonly': True}
form.room.data = db_client['room']
+ form.room.render_kw = {'readonly': True}
form.boot.data = db_client['boot']
+ form.boot.render_kw = {'readonly': True}
r = server.get('/oglive/list')
if r.status_code != requests.codes.ok: