1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
{%extends "phenotypes/base.html"%}
{%from "cli-output.html" import cli_output%}
{%from "flash_messages.html" import flash_all_messages%}
{%from "macro-table-pagination.html" import table_pagination%}
{%from "phenotypes/macro-display-pheno-dataset-card.html" import display_pheno_dataset_card%}
{%block extrameta%}
{%if job and job.status not in ("success", "completed:success", "error", "completed:error")%}
<meta http-equiv="refresh" content="5" />
{%endif%}
{%endblock%}
{%block title%}Phenotypes{%endblock%}
{%block pagetitle%}Phenotypes{%endblock%}
{%block lvl4_breadcrumbs%}
<li {%if activelink=="add-phenotypes"%}
class="breadcrumb-item active"
{%else%}
class="breadcrumb-item"
{%endif%}>
<a href="{{url_for('species.populations.phenotypes.add_phenotypes',
species_id=species.SpeciesId,
population_id=population.Id,
dataset_id=dataset.Id)}}">View Datasets</a>
</li>
{%endblock%}
{%block contents%}
{%if job%}
<h4 class="subheading">Progress</h4>
<div class="row">
<p><strong>Process Status:</strong> {{job.status}}</p>
{%if metadata%}
<table class="table">
<thead>
<tr>
<th>File</th>
<th>Status</th>
<th>Lines Processed</th>
<th>Total Errors</th>
</tr>
</thead>
<tbody>
{%for file,meta in metadata.items()%}
<tr>
<td>{{file}}</td>
<td>{{meta.status}}</td>
<td>{{meta.linecount}}</td>
<td>{{meta["total-errors"]}}</td>
</tr>
{%endfor%}
</tbody>
</table>
{%endif%}
{%if job.status in ("completed:success", "success")%}
<p><a href="#"
class="not-implemented btn btn-primary"
title="Continue to process data">Continue</a>
</p>
{%endif%}
</div>
<h4 class="subheading">Errors</h4>
<div class="row" style="max-height: 20em; overflow: auto;">
{%if errors | length == 0 %}
<p class="text-info">
<span class="glyphicon glyphicon-info-sign"></span>
No errors found so far
</p>
{%else%}
<table class="table">
<thead>
<tr>
<th>File</th>
<th>Row</th>
<th>Column</th>
<th>Value</th>
<th>Message</th>
</thead>
<tbody style="font-size: 0.9em;">
{%for error in errors%}
<tr>
<td>{{error.filename}}</td>
<td>{{error.rowtitle}}</td>
<td>{{error.coltitle}}</td>
<td>{%if error.cellvalue | length > 25%}
{{error.cellvalue[0:24]}}…
{%else%}
{{error.cellvalue}}
{%endif%}
</td>
<td>
{%if error.message | length > 250 %}
{{error.message[0:249]}}…
{%else%}
{{error.message}}
{%endif%}
</td>
</tr>
{%endfor%}
</tbody>
</table>
{%endif%}
</div>
<div class="row">
{{cli_output(job, "stdout")}}
</div>
<div class="row">
{{cli_output(job, "stderr")}}
</div>
{%else%}
<div class="row">
<h3 class="text-danger">No Such Job</h3>
<p>Could not find a job with the ID: {{job_id}}</p>
<p>
Please go back to
<a href="{{url_for('species.populations.phenotypes.view_dataset',
species_id=species.SpeciesId,
population_id=population.Id,
dataset_id=dataset.Id)}}"
title="'{{dataset.Name}}' dataset page">
the '{{dataset.Name}}' dataset page</a>
to upload new phenotypes or edit existing ones.</p>
</div>
{%endif%}
{%endblock%}
{%block sidebarcontents%}
{{display_pheno_dataset_card(species, population, dataset)}}
{%endblock%}
|