@@ -149,6 +149,8 @@ function generate_report(results::Vector{ModelResult}, results_root::String,
149149 a:hover { text-decoration: underline; }
150150 .filter-row th { background: #f5f5f5; }
151151 .filter-row select { font-size: 12px; padding: 1px 4px; }
152+ .filter-row input { font-size: 12px; padding: 1px 4px; width: 16em; box-sizing: border-box; }
153+ .filter-row input.invalid { outline: 2px solid #c00; }
152154 </style>
153155</head>
154156<body>
@@ -180,7 +182,7 @@ Total run time: $(time_str)</p>
180182 <th>Ref Cmp</th>
181183 </tr>
182184 <tr class="filter-row">
183- <th></th>
185+ <th><input id="f-name" type="text" placeholder="regex…" oninput="applyFilters()"/>< /th>
184186 <th><select id="f-exp" onchange="applyFilters()"><option value="all">All</option><option value="pass">Pass</option><option value="fail">Fail</option></select></th>
185187 <th><select id="f-par" onchange="applyFilters()"><option value="all">All</option><option value="pass">Pass</option><option value="fail">Fail</option></select></th>
186188 <th><select id="f-sim" onchange="applyFilters()"><option value="all">All</option><option value="pass">Pass</option><option value="fail">Fail</option></select></th>
@@ -193,12 +195,24 @@ $rows
193195</table>
194196<script>
195197function applyFilters() {
198+ var nameInput = document.getElementById('f-name');
199+ var nameVal = nameInput.value;
200+ var nameRe = null;
201+ try {
202+ nameRe = nameVal ? new RegExp(nameVal, 'i') : null;
203+ nameInput.classList.remove('invalid');
204+ } catch(e) {
205+ nameInput.classList.add('invalid');
206+ return;
207+ }
196208 var exp = document.getElementById('f-exp').value;
197209 var par = document.getElementById('f-par').value;
198210 var sim = document.getElementById('f-sim').value;
199211 var cmp = document.getElementById('f-cmp').value;
200212 document.querySelectorAll('#model-rows tr').forEach(function(row) {
201- var show = (exp === 'all' || row.dataset.exp === exp) &&
213+ var name = row.cells[0] ? row.cells[0].textContent : '';
214+ var show = (!nameRe || nameRe.test(name)) &&
215+ (exp === 'all' || row.dataset.exp === exp) &&
202216 (par === 'all' || row.dataset.par === par) &&
203217 (sim === 'all' || row.dataset.sim === sim) &&
204218 (cmp === 'all' || row.dataset.cmp === cmp);
0 commit comments