Skip to content

Commit e40ab47

Browse files
Triangulation Part 2 – Event Grouping and Marker Display (#243)
* compute overlap * fix compare * highlight overlap * style * ightlight * fix event list update * fix typo * draw cones * update info panel * save pyrpoject * upgrade dash * clean * fix status time * fix ' * fix storage * compare transform date * create sub_api_sequences * clean comments * fix empty * hide overlap * style * ruff * style conflict * fix not available * put back triangulation * fix merge * no overlap with fp * display cam complete name * fix style and time * fix output * put back old name * fix compare * regroup events * update selection * only display overlap * display all sites * add fire markers * style * hide localisation * style * fix outdated * update ruff
1 parent 50fbc1b commit e40ab47

File tree

13 files changed

+801
-702
lines changed

13 files changed

+801
-702
lines changed

app/assets/images/fire_icon.png

19.6 KB
Loading

app/callbacks/data_callbacks.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import config as cfg
2020
from pages.cameras_status import display_cam_cards
2121
from services import get_client, get_token
22-
from utils.data import convert_dt_to_local_tz, process_bbox, sequences_have_changed
22+
from utils.data import compute_overlap, convert_dt_to_local_tz, process_bbox, sequences_have_changed
2323

2424
logger = logging_config.configure_logging(cfg.DEBUG, cfg.SENTRY_DSN)
2525

@@ -202,7 +202,7 @@ def api_cameras_watcher(n_intervals, api_cameras, user_token):
202202

203203

204204
@app.callback(
205-
Output("api_sequences", "data"),
205+
[Output("api_sequences", "data"), Output("event_id_table", "data")],
206206
[
207207
Input("main_api_fetch_interval", "n_intervals"),
208208
Input("api_cameras", "data"),
@@ -272,8 +272,7 @@ def api_watcher(n_intervals, api_cameras, selected_date, to_acknowledge, local_s
272272
axis=1,
273273
)
274274

275-
# api_sequences = compute_overlap(api_sequences)
276-
api_sequences["overlap"] = [None] * len(api_sequences)
275+
api_sequences, event_id_table = compute_overlap(api_sequences)
277276

278277
# Load local sequences safely
279278
if local_sequences:
@@ -287,11 +286,11 @@ def api_watcher(n_intervals, api_cameras, selected_date, to_acknowledge, local_s
287286
logger.info("Skipping update: no significant change detected")
288287
return dash.no_update
289288

290-
return api_sequences.to_json(orient="split")
289+
return api_sequences.to_json(orient="split"), event_id_table.to_json(orient="split")
291290

292291
except Exception as e:
293292
logger.error(f"Failed to fetch sequences: {e}")
294-
return pd.DataFrame().to_json(orient="split")
293+
return pd.DataFrame().to_json(orient="split"), pd.DataFrame().to_json(orient="split")
295294

296295

297296
@app.callback(

0 commit comments

Comments
 (0)