diff --git a/tasks/flightradar24/frontend/main.py b/tasks/flightradar24/frontend/main.py
index 6c0487e..0789b07 100644
--- a/tasks/flightradar24/frontend/main.py
+++ b/tasks/flightradar24/frontend/main.py
@@ -551,7 +551,8 @@ def schedule_data():
"track_points": r.get("track_points"),
"sched_source": r.get("sched_source"),
# Эффективная длительность: FA > schedule
- "duration_eff": r.get("fa_flight_time") or r.get("duration_min"),
+ # fa_flight_time — секунды (FR24), duration_min — минуты (Яндекс)
+ "duration_eff": (lambda fa_ft: (int(fa_ft) // 60 if fa_ft else None) or r.get("duration_min"))(r.get("fa_flight_time")),
# Маршрут из FR24 (IATA коды → города)
"fa_origin_iata": r.get("fa_orig_iata"),
"fa_dest_iata": r.get("fa_dest_iata"),
diff --git a/tasks/flightradar24/frontend/static/schedule.html b/tasks/flightradar24/frontend/static/schedule.html
index ea93973..5d5b4de 100644
--- a/tasks/flightradar24/frontend/static/schedule.html
+++ b/tasks/flightradar24/frontend/static/schedule.html
@@ -330,8 +330,7 @@
Маршрут |
Аэропорт |
По расп. |
- Взлёт факт |
- Посадка факт |
+ Фактическое |
Длит. |
ВПП |
ВС |
@@ -339,7 +338,7 @@
- | Загрузка… |
+ | Загрузка… |
diff --git a/tasks/flightradar24/frontend/static/schedule.js b/tasks/flightradar24/frontend/static/schedule.js
index c146b21..6cbfdfe 100644
--- a/tasks/flightradar24/frontend/static/schedule.js
+++ b/tasks/flightradar24/frontend/static/schedule.js
@@ -107,7 +107,7 @@ async function loadData() {
function renderTable(flights) {
const tbody = document.getElementById("table-body");
if (!flights.length) {
- tbody.innerHTML = `| Нет данных по выбранным фильтрам |
`;
+ tbody.innerHTML = `| Нет данных по выбранным фильтрам |
`;
return;
}
@@ -140,23 +140,20 @@ function renderTable(flights) {
// 7. По расписанию (MSK)
const sched = fmtTime(f.scheduled_at);
- // 8. Взлёт факт + задержка
- const actTakeoffCell = f.actual_takeoff
- ? `${fmtTime(f.actual_takeoff)} ${delayCell(f.delay_takeoff_min)}`
+ // 8. Фактическое время: вылет → actual_takeoff, прилёт → actual_landed
+ const actTime = f.direction === "departure" ? f.actual_takeoff : f.actual_landed;
+ const actDelay = f.direction === "departure" ? f.delay_takeoff_min : f.delay_landed_min;
+ const actCell = actTime
+ ? `${fmtTime(actTime)} ${delayCell(actDelay)}`
: "—";
- // 9. Посадка факт
- const actLandedCell = f.actual_landed
- ? `${fmtTime(f.actual_landed)} ${delayCell(f.delay_landed_min)}`
- : "—";
-
- // 10. Длительность (FA flight_time > schedule duration_min)
+ // 9. Длительность (FA flight_time > schedule duration_min)
const durationCell = fmtDuration(f.duration_eff);
- // 11. ВПП
- const runway = (f.runway_takeoff || f.runway_landed)
- ? `${f.runway_takeoff || "?"}→${f.runway_landed || "?"}`
- : "—";
+ // 11. ВПП (по направлению рейса)
+ const runway = f.direction === "departure"
+ ? (f.runway_takeoff || "—")
+ : (f.runway_landed || "—");
// 12. Тип ВС
const acType = f.aircraft_type ? esc(f.aircraft_type) : "—";
@@ -182,8 +179,7 @@ function renderTable(flights) {
${esc(route)} |
${airport} |
${sched} |
- ${actTakeoffCell} |
- ${actLandedCell} |
+ ${actCell} |
${durationCell} |
${runway} |
${acType} |
@@ -229,9 +225,9 @@ function renderCards(flights) {
f.registration ? `${esc(f.registration)}` : "",
].filter(Boolean).join(" / ");
- const runway = (f.runway_takeoff || f.runway_landed)
- ? `${f.runway_takeoff || "?"}→${f.runway_landed || "?"}`
- : "—";
+ const runway = f.direction === "departure"
+ ? (f.runway_takeoff || "—")
+ : (f.runway_landed || "—");
return `