Commit 0354507e authored by Ryan Herbert's avatar Ryan Herbert

sample_set.py 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():
group_ids=group_ids)
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,7 +697,8 @@ def getStatData(results_file_ids):
d = {}
set_type = res.sample_type
headers = getStatHeaders()
for head in headers:
for head, htype in headers:
if htype == 'db':
d[head] = res[head]
d = getResultsFileStats(res.results_file, d)
data.append(d)
......@@ -705,7 +706,7 @@ def getStatData(results_file_ids):
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