Skip to content

Commit

Permalink
Display the number of visible events.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamshapiro0 committed Jun 25, 2024
1 parent 85a4397 commit c82b4b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/fusion_engine_client/analysis/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2140,6 +2140,7 @@ def plot_events(self):
var invert = document.getElementById("invert").checked;
var table = document.getElementById("event_log");
var tr = table.getElementsByTagName("tr");
var visible_count = 0;
for (var i = 0; i < tr.length; ++i) {
var tds = tr[i].getElementsByTagName("td");
if (tds.length < 6) {
Expand All @@ -2152,11 +2153,13 @@ def plot_events(self):
description_td.innerText.toLowerCase().indexOf(filter) > -1;
if (filter == "" || (matches && !invert) || (!matches && invert)) {
tr[i].style.display = "";
++visible_count;
}
else {
tr[i].style.display = "none";
}
}
document.getElementById("visible_count").innerText = visible_count;
}
</script>
""" + f"""\
Expand All @@ -2165,6 +2168,7 @@ def plot_events(self):
placeholder="Filter by event type or description..." style="width: 100%;"><br>
<input type="checkbox" id="invert" onclick="UpdateFilter()">
<label for="invert"> Invert Selection</label>
<br>Displaying <div id="visible_count" style="display: inline;">{len(rows)}</div>/{len(rows)} event notifications.
<pre>{table_html}</pre>
"""

Expand Down

0 comments on commit c82b4b8

Please sign in to comment.