Skip to content

Commit

Permalink
set tar1090 query parameters on the expert page
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
  • Loading branch information
dirkhh committed May 2, 2024
1 parent da9b597 commit 6df7351
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 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.0 include:
- add option to set default tar1090 query arguments to the expert page
- minor updates to the image name, DietPi WiFi config issues, and unnecessary work being done (the latter to reduce load that causes some of the remaining RPi3 MLAT issues)
- more UI reshuffling: create system mgmt page and move things that should be under system to that page from the Expert page
- more UI reshuffling: move backup/restore into the menu under System
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<!-- Live Map -->
<li class="nav-item {% if not is_enabled('base_config') %}d-none{% endif %}"><a class="nav-link"
href="/map">Live Map</a></li>
href="/map{{ env_value_by_tag('tar1090_query_params') }}">Live Map</a></li>
<!-- Additional Maps -->
<li class="nav-item dropdown {% if not is_enabled('base_config') %}d-none{% endif %}">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMaps" role="button"
Expand All @@ -47,7 +47,8 @@
<a class="dropdown-item" href="#">{{site}} &raquo;</a>
<ul class="dropdown-menu dropdown-submenu">
{% set url = no_port_url ~ ":" ~ (loop.index0 + 8090) %}
<li><a class="dropdown-item" href="{{ url }}">Main Map</a></li>
<li><a class="dropdown-item" href="{{ url }}/{{env_value_by_tag('tar1090_query_params') }}">Main
Map</a></li>
<li><a class="dropdown-item" href="{{ url }}/?heatmap">Heatmap</a></li>
<li><a class="dropdown-item" href="{{ url }}/?pTracks">Tracks</a></li>
<li><a class="dropdown-item" href="{{ url }}/?replay">Replay</a></li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,28 @@ <h5 class="mt-3">Add environment variables to containers</h5>
</div>
</form>
</div>
<div class="col-12 col-lg-6">
<h5 class="mt-3">Add arguments to map URLs</h5>
<form method="POST">
<div class="row align-items-center">
<div class="col-12 mb-2">
<label for="tar1090_query_params">
tar1090, the software used to create the map display used here, contains a plethora of URL <a
href="https://github.com/wiedehopf/tar1090/blob/master/README-query.md">query parameters</a>. If you have
preferred query parameters that you always want to use, you can add them here.
</label>
</div>
<div class="col-8">
<input class="mx-auto w-100" id="tar1090_query_params" name="tar1090_query_params" type="text"
placeholder="?autoselect&centerReceiver" value="{{ env_value_by_tag('tar1090_query_params') }}">
</div>
<div class="col-4">
<button type="submit" class="btn btn-primary mx-auto w-100" name="tar1090_query_params--submit"
value="go">Submit</button>
</div>
</div>
</form>
</div>
{% if env_value_by_tag('tar1090_image_config_link') != '' %}
<div class="col-12 col-lg-6">
<h5 class="mt-3">Don't show config link on map page</h5>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ <h5>{% if env_value_by_tag('aggregators') == 'micro' %}Local {%endif%}TAR1090 Ma
<div class="col col-md-4 col-lg-3">
<ul>
<li>
<a href="/map">map</a>
<a href="/map{{ env_value_by_tag('tar1090_query_params') }}">map</a>
</li>
<li>
<a href="/stats">statistics and graphs</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def proxy_routes(self):
default="[2,3]",
tags=["range_outline_dash"],
),
Env("_ASDBIM_TAR1090_QUERY_PARAMS", default="", tags=["tar1090_query_params"]),
# 978
# start the container (integrated / micro) or the replay
Env("FEEDER_ENABLE_UAT978", default=[False], tags=["uat978", "is_enabled"]),
Expand Down

0 comments on commit 6df7351

Please sign in to comment.