mirror of https://git.48k.eu/ogcp
views: Fix table showing client's partitions
Display partition table in Scopes -> Client Update, this is meaningful context informationmaster
parent
409dbe3f5c
commit
19e0517511
|
@ -1004,10 +1004,24 @@ def action_client_update():
|
|||
if db_client['repo_id'] == repo["id"]]
|
||||
form.repo.choices.extend([(repo["id"], repo["name"]) for repo in repositories
|
||||
if db_client['repo_id'] != repo["id"]])
|
||||
ip = list(ips)[0]
|
||||
setup = get_client_setup(ip)
|
||||
if setup and setup[0].get('code') == 'MSDOS':
|
||||
setup[0]['code'] = 'MBR'
|
||||
|
||||
for entry in setup:
|
||||
if images and entry['image'] != 0:
|
||||
image = next((img for img in images if img['id'] == entry['image']), None)
|
||||
if image:
|
||||
entry['image'] = image['name']
|
||||
else:
|
||||
entry['image'] = ""
|
||||
else:
|
||||
entry['image'] = ""
|
||||
|
||||
form.submit.render_kw = {"formaction": url_for('action_client_update')}
|
||||
return render_template('actions/client_details.html', form=form,
|
||||
parent="scopes.html", scopes=scopes)
|
||||
parent="scopes.html", scopes=scopes, setup=setup)
|
||||
|
||||
def find_folder(folder_id, scopes):
|
||||
scopes = deque([scopes['scope']])
|
||||
|
|
Loading…
Reference in New Issue