mirror of
https://github.com/uw935/vatsimfox.git
synced 2026-09-17 04:48:58 +00:00
first version
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = "utf-8"
|
||||||
|
|
||||||
|
[**.py]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<br>
|
||||||
|
<p align="center">
|
||||||
|
<img align="center" src="media/cover.png">
|
||||||
|
<h3 align="center">VATSIM Fox</h3>
|
||||||
|
<p align="center">Website to find out your detailed VATSIM stastic</p>
|
||||||
|
</p>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
## About
|
||||||
|
**VATSIM Fox** — helps you to view profile stastic easily. Here you can see your last 50 flightplans / 100 ATC shifts.
|
||||||
|
|
||||||
|
Project based on [Virtual Air Traffic Simulation Network (VATSIM) API](https://vatsim.dev/).
|
||||||
|
|
||||||
|
Written in Python 3.7.10 + JS (JQuery framework) + Boostrap
|
||||||
|
|
||||||
|
## Contibution
|
||||||
|
Any help with this project would be greatly appreciated. Fixes or some features are welcome.
|
||||||
|
|
||||||
|
More information about the contributing to this project will appear there a little later.
|
||||||
|
|
||||||
|
## Feature
|
||||||
|
There is small TODO list I would like to make in this project:
|
||||||
|
|
||||||
|
+ Deploy to webserver with domain
|
||||||
|
+ More ATC information — add map with control area
|
||||||
|
+ More profile information — add some more info, not only date of registration. Maybe rating or something
|
||||||
|
+ Website redesign
|
||||||
|
+ Challenges, like: "fly to this country N times", or "fly to all countries around the world", etc
|
||||||
|
|
||||||
|
## Author
|
||||||
|
Telegram: https://uw935.t.me/<br>
|
||||||
|
Instagram: https://instagram.com/uw_935/<br>
|
||||||
|
Discord: uw935
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
from flask import Flask, render_template, abort
|
||||||
|
import requests
|
||||||
|
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/")
|
||||||
|
def index_page():
|
||||||
|
return render_template("index.html")
|
||||||
|
|
||||||
|
|
||||||
|
@app.errorhandler(404)
|
||||||
|
def errorhandler_page(_):
|
||||||
|
return render_template("4O4.html"), 404
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/<int:cid>/")
|
||||||
|
def viewer_page(cid):
|
||||||
|
user = requests.get(f"https://api.vatsim.net/v2/members/{cid}").json()
|
||||||
|
|
||||||
|
if "detail" in user and user["detail"] == "Not Found":
|
||||||
|
return abort(404)
|
||||||
|
|
||||||
|
return render_template("viewer.html", data=(user, ))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app.run(debug=True)
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1 @@
|
|||||||
|
Flask==2.2.5
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[flake8]
|
||||||
|
exclude = .git, pycache, .env, .venv
|
||||||
|
max-line-length = 120
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
@@ -0,0 +1,8 @@
|
|||||||
|
.fox_button {
|
||||||
|
transition: all .3s ease;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fox_active, .fox_atc_active {
|
||||||
|
background-color: #dee2e6 !important;
|
||||||
|
}
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
// Fetching user's ATC session informations from API
|
||||||
|
let userSession = {};
|
||||||
|
|
||||||
|
fetch(ATC_API_URL, {}).then(response => response.json).then(result => {
|
||||||
|
for (let session of result["items"]) {
|
||||||
|
// Separate each session by it's connection ID
|
||||||
|
let session_id = session["connection_id"]["id"];
|
||||||
|
userSession[session_id] = session;
|
||||||
|
|
||||||
|
// Long line. Not in the whole file, but still bad
|
||||||
|
// Open to any suggestions about fix it
|
||||||
|
let sessionElement = "<div id='" + session_id + "' class='fox_button fox_atc mb-2 p-2 text-center text-bg-white border border-1 rounded-3'>" + session["connection_id"]["callsign"] + "</div>";
|
||||||
|
$("#fox_atc").append(sessionElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
showSession(userSession[result["items"][0]["callsign"]]);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Fetching user's flightplans from VATSIM API
|
||||||
|
let userFlightplans = {};
|
||||||
|
|
||||||
|
fetch(FLIGHTPLANS_API_URL, {}).then(response => response.json).then(result => {
|
||||||
|
for (let flightplan of result) {
|
||||||
|
// Separate each flight by it's connection ID
|
||||||
|
// Like it was with ATC session's
|
||||||
|
let flightplan_id = flightplan["connection_id"]
|
||||||
|
userFlightplans[flightplan_id] = flightplan;
|
||||||
|
|
||||||
|
// Long line again
|
||||||
|
let flightplanElement = "<div id="+ flightplan_id +" class='fox_button mb-2 p-2 text-center text-bg-white border border-1 rounded-3'>" + flightplan["callsign"] + "</div>";
|
||||||
|
$("#fox_flightplans").append(flightplanElement);
|
||||||
|
}
|
||||||
|
showFlight(userFlightplans[result[0]["callsign"]]);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Fetching airports information
|
||||||
|
// Get it from localhost
|
||||||
|
// Becase I think it would be much faster than getting it from VATSIM API
|
||||||
|
let airports = {};
|
||||||
|
|
||||||
|
$.getJSON("/static/data/airports.json", function(json) {
|
||||||
|
airports = json;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Map creation
|
||||||
|
const MAP_ELEMENT = L.map("fox_map");
|
||||||
|
const MAP_DEFAULT_TARGET = L.latLng("47.50737", "19.04611");
|
||||||
|
const MAP_DEFAULT_ZOOM_VIEW = 14;
|
||||||
|
let line = null;
|
||||||
|
|
||||||
|
MAP_ELEMENT.setView(MAP_DEFAULT_TARGET, MAP_DEFAULT_ZOOM_VIEW);
|
||||||
|
|
||||||
|
L.tileLayer("http://{s}.tile.osm.org/{z}/{x}/{y}.png", {
|
||||||
|
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
||||||
|
subdomains: "abcd",
|
||||||
|
maxZoom: 20,
|
||||||
|
minZoom: 2
|
||||||
|
}).addTo(MAP_ELEMENT);
|
||||||
|
|
||||||
|
// Function to delete route line from map
|
||||||
|
function mapDeleteDraws() {
|
||||||
|
if (!line) return;
|
||||||
|
MAP_ELEMENT.removeLayer(line);
|
||||||
|
line = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to draw flight path on map
|
||||||
|
function mapDrawFlight(flight) {
|
||||||
|
if (!flight) return;
|
||||||
|
mapDeleteDraws();
|
||||||
|
|
||||||
|
let departureAirport = flight["dep"];
|
||||||
|
let arrivalAirport = flight["arr"];
|
||||||
|
|
||||||
|
line = L.polyline([
|
||||||
|
[
|
||||||
|
airports[departureAirport]["lat"],
|
||||||
|
airports[departureAirport]["lon"]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
airports[arrivalAirport]["lat"],
|
||||||
|
airports[arrivalAirport]["lon"]
|
||||||
|
]
|
||||||
|
], {color: "red"}).addTo(MAP_ELEMENT);
|
||||||
|
|
||||||
|
MAP_ELEMENT.fitBounds(line.getBounds());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to show data in right flight bar
|
||||||
|
function showFlight(flight) {
|
||||||
|
if (!flight) return;
|
||||||
|
|
||||||
|
// Changing text in each class
|
||||||
|
// FP before _ - means flightplan
|
||||||
|
$(".fp_callsign").text(flight["callsign"]);
|
||||||
|
$(".fp_depa_city").text(airports[flight["dep"]]["city"]);
|
||||||
|
$(".fp_arra_city").text(airports[flight["arr"]]["city"]);
|
||||||
|
$(".fp_aicraft").text(flight["aircraft"]);
|
||||||
|
$(".fp_entime").text(flight["hrsenroute"] + ":" + flight["minenroute"]);
|
||||||
|
$(".fp_depa").text(flight["dep"]);
|
||||||
|
$(".fp_arra").text(flight["arr"]);
|
||||||
|
$(".fp_altna").text(flight["alt"]);
|
||||||
|
$(".fp_type").text(flight["flight_type"]);
|
||||||
|
$(".fp_speed").text(flight["cruisespeed"]);
|
||||||
|
$(".fp_alt").text(flight["altitude"]);
|
||||||
|
$(".fp_route").text(flight["route"]);
|
||||||
|
$(".fp_remarks").text(flight["rmks"]);
|
||||||
|
$(".fp_squawk").text(flight["assignedsquawk"]);
|
||||||
|
$(".fp_filed").text(flight["filed"].replace("T", " "));
|
||||||
|
|
||||||
|
mapDrawFlight(flight);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function to show ATC session
|
||||||
|
function showSession(session) {
|
||||||
|
if (!session) return;
|
||||||
|
|
||||||
|
$(".atc_callsign").text(session["connection_id"]["callsign"]);
|
||||||
|
$(".atc_start_time").text(session["connection_id"]["start"]);
|
||||||
|
$(".atc_end_time").text(session["connection_id"]["end"]);
|
||||||
|
$(".atc_trackedair").text(session["aircrafttracked"]);
|
||||||
|
$(".atc_seenair").text(session["aircraftseen"]);
|
||||||
|
$(".atc_squawks").text(session["squawksassigned"]);
|
||||||
|
$(".atc_transfers").text(session["handoffsinitiated"]);
|
||||||
|
$(".atc_received").text(session["handoffsreceived"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Click event handler to left menu button
|
||||||
|
$(".fox_atc").click(function() {
|
||||||
|
if ($(this).hasClass("fox_atc_active")) return;
|
||||||
|
|
||||||
|
$(".fox_atc_active").removeClass("fox_atc_active");
|
||||||
|
$(this).addClass("fox_atc_active");
|
||||||
|
|
||||||
|
showSession(userSession[$(this).attr("id")]);
|
||||||
|
})
|
||||||
|
|
||||||
|
$(".fox_button").click(function() {
|
||||||
|
if ($(this).hasClass("fox_active")) return;
|
||||||
|
|
||||||
|
$(".fox_active").removeClass("fox_active");
|
||||||
|
$(this).addClass("fox_active");
|
||||||
|
|
||||||
|
showFlight(userFlightplans[$(this).attr("id")]);
|
||||||
|
});
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{% extends "/include/template.html" %}
|
||||||
|
{% block title %}404 - Not Found / VATSIM Fox{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
<div class="p-5 mb-4 bg-light rounded-3">
|
||||||
|
<div class="container-fluid py-5">
|
||||||
|
<h1 class="mb-4 display-5 fw-bold">4O4 - Page Not Found</h1>
|
||||||
|
<a href="/">
|
||||||
|
<button class="btn btn-outline-primary" type="submit">Back to index page</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="description" content="VATSIM Fox — see your detailed profile statistic">
|
||||||
|
<meta name="keywords" content="VATSIM FOX, fox, vatsim, vatsim statistic, statistic, vatsim fox, flight simulator">
|
||||||
|
<meta name="author" content="uw935">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta content="yes" name="apple-touch-fullscreen" />
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="#FA8232">
|
||||||
|
<meta name="format-detection" content="telephone=no">
|
||||||
|
<meta name="viewport" content="width = 320, initial-scale = 2.3, user-scalable = no">
|
||||||
|
<link rel="icon" href="{{ url_for('static', filename='icon.ico') }}" type="image/x-icon">
|
||||||
|
<title>{% block title %}{% endblock %}</title>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
|
||||||
|
{% block header_css %}{% endblock %}
|
||||||
|
</head>
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--bs-primary-rgb: 250, 130, 50
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
<div class="container py-4">
|
||||||
|
<header class="pb-3 mb-4 border-bottom">
|
||||||
|
<a href="/" class="d-flex align-items-center text-dark text-decoration-none">
|
||||||
|
<!-- <svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" class="me-2" viewBox="0 0 118 94" role="img"><title>Bootstrap</title><path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z" fill="currentColor"></path></svg> -->
|
||||||
|
<span class="fs-4">🦊 VATSIM <span class="text-primary">Fox</span></span>
|
||||||
|
</a>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- <div class="mb-4 alert alert-primary" role="alert">
|
||||||
|
Notification
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
|
{% block content %}{% endblock %}
|
||||||
|
|
||||||
|
<footer class="pt-3 mt-4 text-muted border-top">
|
||||||
|
created by <a href="https://uw935.t.me/" style="text-decoration: underline; cursor: pointer;">uw935</a> (1606255)
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||||
|
{% block javascript_code %}{% endblock %}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
{% extends "/include/template.html" %}
|
||||||
|
{% block title %}VATSIM Fox — view detailed profile statistic{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
<div class="p-5 mb-4 bg-light rounded-3">
|
||||||
|
<div class="container-fluid py-5">
|
||||||
|
<h1 class="display-5 fw-bold">Enter your VATSIM CID</h1>
|
||||||
|
<p class="col-md-8 fs-4">See your detailed profile statistic</p>
|
||||||
|
<div class="d-flex" role="search">
|
||||||
|
<input class="fox_input form-control me-2" type="number" placeholder="100000" aria-label="CID">
|
||||||
|
<button class="fox_submit btn btn-outline-success" type="submit">Search</button>
|
||||||
|
</div>
|
||||||
|
<p class="fox_message col-md-8 fs-4"></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-4 row align-items-md-stretch">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="h-100 p-5 text-bg-dark rounded-3">
|
||||||
|
<h2>About</h2>
|
||||||
|
<p>VATSIM Fox is an open-source project to make it easier for users to see their detailed profile statistic</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="h-100 p-5 bg-light border rounded-3">
|
||||||
|
<h2>Open source project</h2>
|
||||||
|
<p>This project is fully opened, so you can contribute in it if you want</p>
|
||||||
|
<a href="https://github.com/uw935/vatsim-fox">
|
||||||
|
<button class="btn btn-outline-secondary" type="button">GitHub</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
{% block javascript_code %}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(".fox_submit").click(function() {
|
||||||
|
const INPUT_CID = $(".fox_input").val();
|
||||||
|
|
||||||
|
fetch("https://api.vatsim.net/v2/members/" + INPUT_CID, {})
|
||||||
|
.then(response => response.json()).then(result => {
|
||||||
|
// Checking if user existt
|
||||||
|
if (!result.ok || result.status == 404) {
|
||||||
|
$(".fox_message").text("User not found!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Redirecting user to view page
|
||||||
|
window.location.replace("/" + INPUT_CID);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
{% extends "/include/template.html" %}
|
||||||
|
{% block title %}User {{user_cid}} statistic — VATSIM Fox{% endblock %}
|
||||||
|
{% block header_css %}
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='viewer.css') }}">
|
||||||
|
<link href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" rel="stylesheet"/>
|
||||||
|
{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
<div class="mb-5">
|
||||||
|
<h2 class="text-center text-primary mb-4">{{data[0]["id"]}}</h2>
|
||||||
|
<p class="fs-4 text-secondary">Date of registration: <span class="date_registration"></span></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-4 row align-items-md-stretch">
|
||||||
|
<h3 class="mb-3">Last 50 flightplans</h3>
|
||||||
|
<div id="fox_flightplans" class="mb-4 col-md-3"></div>
|
||||||
|
|
||||||
|
<div class="col-md" style="height: 500px; overflow-y: scroll;">
|
||||||
|
<div id="fox_map" class="mb-4 h-50 bg-dark rounded-3">
|
||||||
|
</div>
|
||||||
|
<div class="h-auto p-5 bg-light border rounded-3">
|
||||||
|
<h2><span class="fp_callsign">Flight</span> — from <span class="fp_depa_city"></span> to <span class="fp_arra_city"></span></h2>
|
||||||
|
<span>
|
||||||
|
<b>Aircraft type:</b>
|
||||||
|
<span class="fp_aicraft"></span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Enroute time:</b>
|
||||||
|
<span class="fp_entime"></span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Departure airport:</b>
|
||||||
|
<span class="fp_depa"></span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Arrival airport:</b>
|
||||||
|
<span class="fp_arra"></span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Alternative airport:</b>
|
||||||
|
<span class="fp_altna"></span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Flight type:</b>
|
||||||
|
<span class="fp_type"></span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Cruise speed:</b>
|
||||||
|
<span class="fp_speed"></span> knots
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Flight altitude:</b>
|
||||||
|
<span class="fp_alt"></span> feet
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Route:</b>
|
||||||
|
<span class="fp_route"></span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Remarks:</b>
|
||||||
|
<span class="fp_remarks"></span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Squawk:</b>
|
||||||
|
<span class="fp_squawk"></span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Fligthplan filed at:</b>
|
||||||
|
<span class="fp_filed"></span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-4 row align-items-md-stretch">
|
||||||
|
<h3 class="mb-3">Last 100 ATC shifts</h3>
|
||||||
|
<div id="fox_atc" class="mb-4 col-md-3"></div>
|
||||||
|
|
||||||
|
<div class="col-md" style="height: 321px;">
|
||||||
|
<div class="h-auto p-5 bg-light border rounded-3">
|
||||||
|
<h2 class="atc_callsign">UUEE_DEL</h2>
|
||||||
|
<span>
|
||||||
|
<b>Start time:</b>
|
||||||
|
<span class="atc_start_time">2024-01-05T16:11:22Z</span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>End time:</b>
|
||||||
|
<span class="atc_end_time">2024-01-05T16:32:46Z</span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Aircraft tracked:</b>
|
||||||
|
<span class="atc_trackedair">7</span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Aircraft seen:</b>
|
||||||
|
<span class="atc_seenair">35</span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Squawk assigned:</b>
|
||||||
|
<span class="atc_squawks">12</span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Aircraft's transferred:</b>
|
||||||
|
<span class="atc_transfers">3</span>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span>
|
||||||
|
<b>Aircraft's received:</b>
|
||||||
|
<span class="atc_received">0</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
{% block javascript_code %}
|
||||||
|
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
const USER_CID = '{{data[0]["id"]}}';
|
||||||
|
const FLIGHTPLANS_API_URL = "https://api.vatsim.net/v2/members/" + USER_CID + "/flightplans";
|
||||||
|
const ATC_API_URL = "https://api.vatsim.net/v2/members/" + USER_CID + "/atc";
|
||||||
|
|
||||||
|
$(".date_registration").text("{{data[0]['reg_date']}}".replace("T", " "));
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="{{ url_for('static', filename='viewer.js') }}"></script>
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user