Skip to content

Commit 36163c1

Browse files
committed
add running notes, homogenize js with illumina, remove undefined classes
1 parent e42ae3d commit 36163c1

File tree

2 files changed

+34
-11
lines changed

2 files changed

+34
-11
lines changed

run_dir/design/ont_flowcells.html

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ <h1>
3434
<th class="sort text-center" data-sort="basecalled_pass_bases_Gbp">Yield Passed (Gbp)</th>
3535
<th class="sort text-center" data-sort="basecalled_pass_read_count_M">Read Count Passed (M)</th>
3636
<th class="sort text-center" data-sort="n50_Kbp">N50 Passed (Kbp)</th>
37+
<th class="sort" data-sort="latest_running_note">Latest running note</th>
3738
</tr>
3839
</thead>
3940
<tfoot>
@@ -48,13 +49,14 @@ <h1>
4849
<th class="sort" data-sort="basecalled_pass_bases_Gbp"></th>
4950
<th class="sort" data-sort="basecalled_pass_read_count_M"></th>
5051
<th class="sort" data-sort="n50_Kbp"></th>
52+
<th class="sort" data-sort="latest_running_note"></th>
5153
</tr>
5254
</tfoot>
5355

5456
<tbody class="list">
5557
{% for onefc in ont_flowcells %}
5658
<tr>
57-
<td class = run_name>
59+
<td>
5860
<a class="text-decoration-none" href="/flowcells_ont/{{ onefc }}" target="_blank">{{ onefc }}</a>
5961
{% if ont_flowcells.get(onefc).get('TACA_run_status') == 'finished' %}
6062
<abbr title="Run completed"><span class="fa fa-check-circle"></span></abbr>
@@ -64,7 +66,7 @@ <h1>
6466
<abbr title="Run interrupted"><span class="fa fa-file-dashed-line"></span></abbr>
6567
{% end %}
6668
</td>
67-
<td class="library">
69+
<td>
6870
{% if ont_flowcells[onefc].get('library_id') %}
6971
<a class="text-decoration-none" href="
7072
https://ngi-lims-
@@ -82,7 +84,7 @@ <h1>
8284
{{ ont_flowcells[onefc].get("library_name","") }}
8385
{% end %}
8486
</td>
85-
<td class="lims_step">
87+
<td>
8688
{% if ont_flowcells[onefc].get('step_id') %}
8789
<a class="text-decoration-none" href="
8890
https://ngi-lims-
@@ -100,7 +102,7 @@ <h1>
100102
{{ ont_flowcells[onefc].get("step_id","") }}
101103
{% end %}
102104
</td>
103-
<td class="project">
105+
<td>
104106
{% if ont_flowcells[onefc].get('projects') %}
105107
{% for project_id, project_name in ont_flowcells[onefc]['projects'].items() %}
106108
<samp style="max-width:50px;">
@@ -109,26 +111,41 @@ <h1>
109111
{% end %}
110112
{% end %}
111113
</td>
112-
<td class="prep_kit">{{ ont_flowcells[onefc].get("prep_kit","") }}</td>
113-
<td class="flow_cell_qc text-center">
114+
<td>{{ ont_flowcells[onefc].get("prep_kit","") }}</td>
115+
<td class="text-center">
114116
{{ ont_flowcells[onefc].get("qc","") }}
115117
</td>
116118

117-
<td class="load_fmol text-center">
119+
<td class="text-center">
118120
{% try %}
119121
{{ ont_flowcells[onefc]["lims"]["loading"][-1]["load_fmol"] }}
120122
{% except %}
121123
{{ "" }}
122124
{% end %}
123125
</td>
124126

125-
<td class="basecalled_pass_bases_Gbp text-center">
127+
<td class="text-center">
126128
{{ ont_flowcells[onefc].get("basecalled_pass_bases_Gbp", "") }}
127129
</td>
128-
<td class="basecalled_pass_read_count_M text-center">{{ ont_flowcells[onefc].get("basecalled_pass_read_count_M", "") }}</td>
129-
<td class="n50_Kbp text-center">
130+
<td class="text-center">{{ ont_flowcells[onefc].get("basecalled_pass_read_count_M", "") }}</td>
131+
<td class="text-center">
130132
{{ ont_flowcells[onefc].get("n50_Kbp", "") }}
131133
</td>
134+
<td class="latest_running_note">
135+
{% if ont_flowcells[onefc].get('latest_running_note') %}
136+
{% set running_notes = ont_flowcells[onefc].get('latest_running_note') %}
137+
{% set latest_running_note_key = list(running_notes.keys())[0] %}
138+
<div class="card running-note-card">
139+
<div class='card-header'>
140+
<a class="text-decoration-none" href='mailto:{{ running_notes[latest_running_note_key]["email"].encode("ascii","ignore")}}'>{{ running_notes[latest_running_note_key]["user"]}}</a> - {{form_date(latest_running_note_key)}}
141+
{% if running_notes[latest_running_note_key]['categories'] %} - <span class="fillbadgecolour"> {{ running_notes[latest_running_note_key]['categories'] }} </span> {% end %}
142+
</div>
143+
<div class='card-body trunc-note-latest' style='white-space: pre-line'>
144+
{{running_notes[latest_running_note_key]['note']}}
145+
</div>
146+
</div>
147+
{% end %}
148+
</td>
132149
</tr>
133150
{% end %}
134151
</tbody>
@@ -152,7 +169,6 @@ <h1>
152169
"paging":false,
153170
"info":false,
154171
"order": [[ 0, "desc" ]],
155-
"autoWidth":true,
156172
dom: 'Bfrti',
157173
colReorder: true,
158174
buttons: [
@@ -173,6 +189,7 @@ <h1>
173189

174190
//Add the bootstrap classes to the search thingy
175191

192+
$('div.dataTables_filter input').addClass('form-control search search-query');
176193
$('#ont_fc_table_filter').addClass('form-inline float-right pt-1');
177194
$("#ont_fc_table_filter").appendTo($('#ont_page_title'));
178195
$('#ont_fc_table_filter label input').appendTo($('#ont_fc_table_filter'));

status/flowcells.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ def list_ont_flowcells(self, unfetched_runs):
178178
# Get step ID
179179
all_stats["step_id"] = all_stats["lims"]["loading"][-1]["step_id"]
180180

181+
all_stats["latest_running_note"] = (
182+
LatestRunningNoteHandler.get_latest_running_note(
183+
self.application, "flowcell", run_name
184+
)
185+
)
186+
181187
except Exception as e:
182188
application_log.warning(f"Error parsing {run_name}: {e}", exc_info=True)
183189
unfetched_runs.append(run_name)

0 commit comments

Comments
 (0)