Skip to content

Commit

Permalink
stage2: add summary line to the list of micro feeders on homepage
Browse files Browse the repository at this point in the history
Thanks @eddieb for the suggestion

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
  • Loading branch information
dirkhh committed May 12, 2024
1 parent 67e16dc commit e3e9cf9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Changes since v2.0.2 include:
- stage2: add summary line to the micro feeder table on the home page to consistently get to map and stats for not just the micro feeders but also the full stage2 (thanks @eddieb for the suggestion)
- stage2: fix UAT978 forwading and UAT978 statistics
- add an installer .iso for native x86_64 PC

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -889,12 +889,13 @@ def base_info(self):
def stage2_stats(self):
ret = []
if self._d.is_enabled("stage2"):
for i in self.micro_indices():
for i in [0] + self.micro_indices():
ip = self._d.env_by_tags("mf_ip").list_get(i)
ip, triplet = mf_get_ip_and_triplet(ip)
suffix = f"_{i}" if i != 0 else ""
try:
with open(
f"/run/adsb-feeder-ultrafeeder_{i}/readsb/stats.prom"
f"/run/adsb-feeder-ultrafeeder{suffix}/readsb/stats.prom"
) as f:
pct = 0
secs = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@
color_class = "text-warning";
tooltip = "receiving unusually little data"
}
$("#mf_status_" + (i + 1)).attr('class', color_class);
$("#mf_status_" + (i + 1)).attr('title', tooltip);
$("#mf_status_" + (i + 1)).text(d["pct"] + " pos/min");
$("#mf_status_" + i).attr('class', color_class);
$("#mf_status_" + i).attr('title', tooltip);
$("#mf_status_" + i).text(d["pct"] + " pos/min");
})
})
.finally(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ <h5>You are running as stage 2 feeder</h5>
<th class="text-center" scope="col">Status (pos/min)</th>
</thead>
<tbody>
<tr>
<td class="text-center" scope="row">*</td>
<td class="text-left"><a href="/map/">{{ list_value_by_tag("site_name", 0) }}</a></td>
<td class="text-center"><a id="mf_status_0" href="/stats/"></a></td>
</tr>
{% for site in env_value_by_tag('site_name') if not site == list_value_by_tag('site_name', 0) %}
<tr>
<td class="text-center" scope="row">{{loop.index}}</td>
Expand Down

0 comments on commit e3e9cf9

Please sign in to comment.