Commit 48d2570a authored by Marc Duez's avatar Marc Duez

server : debug total size for patient files

parent aa6d5b12
......@@ -110,7 +110,6 @@ def index():
log.debug('patient list')
count = db.sequence_file.id.count()
size = db.sequence_file.size_file
isAdmin = auth.has_membership("admin")
##retrieve patient list
......@@ -119,7 +118,6 @@ def index():
).select(
db.patient.ALL,
count,
size,
left=db.sequence_file.on(db.patient.id == db.sequence_file.patient_id),
groupby=db.patient.id
)
......@@ -148,8 +146,11 @@ def index():
if db.auth_permission[row3.id].group_id > 2:
row.groups += " " + str(db.auth_permission[row3.id].group_id)
if row[size] is None :
row[size] = 0
row.size = 0
query_size = db( db.sequence_file.patient_id == row.patient.id ).select()
for row4 in query_size:
row.size += row4.size_file
##sort result
if request.vars["sort"] == "configs" :
......@@ -171,7 +172,6 @@ def index():
return dict(query = query,
count = count,
size = size,
isAdmin = isAdmin)
......
......@@ -38,7 +38,7 @@
<td> {{=row.patient.info }} </td>
<td> {{=row.confs}}</td>
{{if isAdmin:}} <td> {{=row.groups}}</td>{{pass}}
<td> {{=row[count]}} {{if row[size] is not None :}} ({{=vidjil_utils.format_size(row[size])}}) {{pass}}</td>
<td> {{=row[count]}} ({{=vidjil_utils.format_size(row.size)}}) </td>
{{if isAdmin:}} <td onclick="db.call('patient/permission', {'id' :'{{=row.patient.id}}'} )" > p </td> {{else:}} <td></td> {{pass}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment