Commit 0354507e authored by Ryan Herbert's avatar Ryan Herbert multi sample stat two types of headers

so that the view can remain agnostic of the provenence of the data
(whether from the db or extracted from a results or fused file).
parent e8cd2110
......@@ -654,7 +654,7 @@ def custom():
def getStatHeaders():
return ['set_id', 'set_name', 'set_info']
return [('set_id', 'db'), ('set_name', 'db'), ('set_info', 'db'), ('main_clone', 'parser')]
def getResultsFileStats(file_name, dest):
file_path = "%s%s" % (defs.DIR_RESULTS, file_name)
......@@ -697,15 +697,16 @@ def getStatData(results_file_ids):
d = {}
set_type = res.sample_type
headers = getStatHeaders()
for head in headers:
d[head] = res[head]
for head, htype in headers:
if htype == 'db':
d[head] = res[head]
d = getResultsFileStats(res.results_file, d)
return data
def multi_sample_stats():
data = {}
data['headers'] = getStatHeaders()
data['headers'] = [h for h, t in getStatHeaders()]
results = []
#if not auth.can_view_sample_set():
# return "permission denied %s" % res
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