mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 16:56:33 +00:00
fix(admin): only show Live Events panel for ONVIF cameras
This commit is contained in:
parent
90a8f256d5
commit
e0b9955522
1 changed files with 20 additions and 18 deletions
|
|
@ -1332,25 +1332,27 @@ export function CameraEditPage(props: CameraEditProps) {
|
|||
)}
|
||||
</div>
|
||||
|
||||
<div class="card" style="margin-bottom:1.5rem">
|
||||
<h2 style="margin:0 0 1rem; font-size:1.1rem">Live Events</h2>
|
||||
<p style="color:#666; font-size:0.85rem; margin-bottom:0.75rem">
|
||||
ONVIF events from kiosks subscribed to this camera. Auto-refreshes
|
||||
every 5s. All topics shown — motion, ANPR, line crossing, I/O, analytics, unknown.
|
||||
</p>
|
||||
<div
|
||||
id={`camera-events-${String(cam.id)}`}
|
||||
class="table-wrap"
|
||||
{...{
|
||||
"hx-get": `/admin/cameras/${cam.id}/events`,
|
||||
"hx-trigger": "load, every 5s",
|
||||
"hx-swap": "innerHTML",
|
||||
}}
|
||||
style="max-height:300px; overflow-y:auto"
|
||||
>
|
||||
<div style="color:#999; font-size:0.85rem; padding:1rem 0">Loading...</div>
|
||||
{cam.type === "onvif" && (
|
||||
<div class="card" style="margin-bottom:1.5rem">
|
||||
<h2 style="margin:0 0 1rem; font-size:1.1rem">Live Events</h2>
|
||||
<p style="color:#666; font-size:0.85rem; margin-bottom:0.75rem">
|
||||
ONVIF events from kiosks subscribed to this camera. Auto-refreshes
|
||||
every 5s. All topics shown — motion, ANPR, line crossing, I/O, analytics, unknown.
|
||||
</p>
|
||||
<div
|
||||
id={`camera-events-${String(cam.id)}`}
|
||||
class="table-wrap"
|
||||
{...{
|
||||
"hx-get": `/admin/cameras/${cam.id}/events`,
|
||||
"hx-trigger": "load, every 5s",
|
||||
"hx-swap": "innerHTML",
|
||||
}}
|
||||
style="max-height:300px; overflow-y:auto"
|
||||
>
|
||||
<div style="color:#999; font-size:0.85rem; padding:1rem 0">Loading...</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div class="card" style="margin-bottom:1.5rem">
|
||||
<h2 style="margin:0 0 1rem; font-size:1.1rem">Kiosk Subscriptions</h2>
|
||||
|
|
|
|||
Loading…
Reference in a new issue