Skip to content

Commit cf71a2c

Browse files
committed
fix(web): load all devices in table
1 parent 512471d commit cf71a2c

10 files changed

Lines changed: 128 additions & 110 deletions

File tree

services/dashboard/static/htmx.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/dashboard/static/hyperscript.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/dashboard/views/deviceListPage.qtpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@
9696
<tr
9797
class="hover:bg-slate-50 group"
9898
{% if nextPage != "" && ix == len(devices)-1 %}
99-
hx-trigger="revealed"
100-
hx-target="this"
99+
hx-trigger="intersect once"
100+
hx-target="closest tr"
101101
hx-swap="afterend"
102102
hx-get="{%s nextPage %}"
103103
{% endif %}

services/dashboard/views/deviceListPage.qtpl.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/dashboard/views/layout.qtpl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ type BasePage struct {
6161
<script type="text/javascript" src="https://unpkg.com/leaflet.markercluster@1.5.3/dist/leaflet.markercluster.js"></script>
6262
<link rel="stylesheet" href="https://unpkg.com/uplot@1.6.25/dist/uPlot.min.css" />
6363
<script type="text/javascript" src="https://unpkg.com/uplot@1.6.25/dist/uPlot.iife.min.js"></script>
64+
<script type="text/javascript" src="{%s U("static/htmx.js") %}"></script>
65+
<script type="text/javascript" src="{%s U("static/hyperscript.js") %}"></script>
6466
<script type="text/javascript" src="{%s U("static/uplot.htmx.js") %}"></script>
6567
<script type="text/javascript" src="{%s U("static/leaflet.htmx.js") %}"></script>
6668
<script type="text/javascript">
@@ -222,9 +224,6 @@ type BasePage struct {
222224

223225
// These are for debugging only. In production the tailwind and icons should be bundled with the dashboard
224226
{% func debugHeaders() %}
225-
<script type="text/javascript" src="https://unpkg.com/htmx.org@1.9.4"></script>
226-
<script type="text/javascript" src="https://unpkg.com/htmx.org@1.9.4/dist/ext/ws.js"></script>
227-
<script type="text/javascript" src="https://unpkg.com/hyperscript.org@0.9.11"></script>
228227
<script type="text/javascript" src="https://code.iconify.design/iconify-icon/1.0.8/iconify-icon.min.js"></script>
229228
{% endfunc %}
230229

0 commit comments

Comments
 (0)