UI2.0 Main Page Additions

This commit is contained in:
2022-01-17 13:40:28 -06:00
parent 0de49aaf90
commit 2e7cfac5d4
9 changed files with 587 additions and 46 deletions
+2 -1
View File
@@ -3,4 +3,5 @@ json/keys.json
/scripts/node_modules
/tiles/keys.json
/tiles/
/data/aircraft1.json
/data/aircraft1.json
/data/battery.json
+26 -9
View File
@@ -17,6 +17,9 @@ body {
text-align: center;
line-height: 45px;
font-size: 18px;
background-color: rgba(255, 255, 255, 0.9);
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 8px;
}
#power_table {
@@ -64,14 +67,12 @@ div.atc_state {
div#nav_bar {
position: fixed;
top: 0px;
top: 5px;
left: 10%;
width: 80%;
height: 40px;
padding: 5px;
border-bottom: 2px solid black;
border-left: 2px solid black;
border-right: 2px solid black;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 5px;
z-index: 1;
background: rgba(255, 255, 255, 0.8);
@@ -206,7 +207,7 @@ div#sidebar_container {
width: 390px;
height: 85%;
z-index: 1;
border: 2px black solid;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 8px;
display: none;
background-color: rgba(255,255,255,.9);
@@ -295,13 +296,13 @@ div#sidebar_container::-webkit-scrollbar {
#vol_down_button {
position: absolute;
top: 5px;
right: 220px;
right: 250px;
}
#vol_up_button {
position: absolute;
top: 5px;
right: 60px;
right: 90px;
}
#info_button {
@@ -318,7 +319,7 @@ div#sidebar_container::-webkit-scrollbar {
#volume_text {
position: absolute;
right: 110px;
right: 140px;
top: 17px;
}
@@ -328,6 +329,21 @@ div#sidebar_container::-webkit-scrollbar {
bottom: 5px
}
#percentage {
position: absolute;
right: 50px;
bottom: 0px;
font-size: 12px;
}
#battery {
position: absolute;
right: 50px;
top: 5px;
font-size: 28px;
text-align: center;
}
div#SpecialSquawkWarning {
position: absolute;
bottom: 25px;
@@ -402,6 +418,7 @@ div#loader {
right: 5px;
cursor: pointer;
z-index: inherit;
color:rgba(255, 255, 255, 0.7)
}
.vPosition {
@@ -571,7 +588,7 @@ td#seen {
/* Enable scroll if needed */
background-color: rgb(0, 0, 0);
/* Fallback color */
background-color: rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.75);
/* Black w/ opacity */
}
+515 -1
View File
@@ -1 +1,515 @@
{"now":1642388697411.588,"messages":0,"aircraft":[{"hex":"ab649a","flight":"DAL1","lat":43.781,"lon":-64.843,"altitude":35000,"track":68,"speed":597,"squawk":"2762","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"JFK","arr":"LHR","airline":"DAL"},{"hex":"c02254","flight":"CFMZZ","lat":45.936,"lon":-64.36,"altitude":3600,"track":296,"speed":90,"squawk":"4344","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"YQM","arr":"","airline":"MFC"},{"hex":"c01a51","flight":"CFJZC","lat":46.155,"lon":-64.055,"altitude":2500,"track":89,"speed":120,"squawk":"0000","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"YQM","arr":"","airline":"MFC"},{"hex":"a899a2","flight":"UAL14","lat":44.012,"lon":-64.003,"altitude":35000,"track":69,"speed":593,"squawk":"3311","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"EWR","arr":"LHR","airline":"UAL"},{"hex":"a2a2e6","flight":"UAL106","lat":46.709,"lon":-63.816,"altitude":35000,"track":53,"speed":559,"squawk":"2167","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"IAD","arr":"MUC","airline":"UAL"},{"hex":"c064df","flight":"CGMFE","lat":46.443,"lon":-63.741,"altitude":7600,"track":115,"speed":140,"squawk":"0000","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"YQM","arr":"","airline":"MFC"},{"hex":"76cdc2","flight":"SIA25","lat":44.957,"lon":-63.558,"altitude":35000,"track":61,"speed":576,"squawk":"1632","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"JFK","arr":"FRA","airline":"SIA"},{"hex":"c022a5","flight":"CFNDC","lat":44.844,"lon":-63.5,"altitude":1500,"track":180,"speed":60,"squawk":"0000","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"YQM","arr":"","airline":"MFC"},{"hex":"abd018","flight":"DAL172","lat":45.913,"lon":-63.396,"altitude":35000,"track":60,"speed":552,"squawk":"2603","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"JFK","arr":"MXP","airline":"DAL"},{"hex":"a8e4e9","flight":"UAL918","lat":46.192,"lon":-62.721,"altitude":36075,"track":61,"speed":547,"squawk":"3676","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"IAD","arr":"LHR","airline":"UAL"},{"hex":"a7a08a","flight":"UAL70","lat":47.12,"lon":-62.136,"altitude":35000,"track":59,"speed":535,"squawk":"2707","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"EWR","arr":"AMS","airline":"UAL"},{"hex":"4005b9","flight":"BAW176A","lat":45.592,"lon":-61.836,"altitude":37000,"track":63,"speed":550,"squawk":"7132","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"JFK","arr":"LHR","airline":"BAW"},{"hex":"a8c88f","flight":"UAL134","lat":44.287,"lon":-61.476,"altitude":35000,"track":81,"speed":590,"squawk":"1607","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"EWR","arr":"ZRH","airline":"UAL"},{"hex":"406f72","flight":"BAW66V","lat":43.918,"lon":-60.231,"altitude":41000,"track":78,"speed":551,"squawk":"7116","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"PHL","arr":"LHR","airline":"BAW"},{"hex":"a05629","flight":"UAL57","lat":44.233,"lon":-58.717,"altitude":35000,"track":60,"speed":585,"squawk":"3065","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"EWR","arr":"CDG","airline":"UAL"},{"hex":"4067f8","flight":"TOM023","lat":47.159,"lon":-57.027,"altitude":37000,"track":66,"speed":533,"squawk":"6140","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"CUN","arr":"LGW","airline":"TUI"},{"hex":"151d48","flight":"AZV556","lat":44.144,"lon":-57.01,"altitude":33000,"track":42,"speed":500,"squawk":"0000","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"VRA","arr":"VKO","airline":"AZV"},{"hex":"4075b4","flight":"VIR138M","lat":47.21,"lon":-56.855,"altitude":38000,"track":66,"speed":528,"squawk":"7137","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"JFK","arr":"LHR","airline":"VIR"},{"hex":"394a14","flight":"AFR007","lat":44.493,"lon":-55.885,"altitude":35000,"track":83,"speed":560,"squawk":"7103","seen":9,"seen_pos":9,"rssi":0,"messages":1,"internet":true,"dep":"JFK","arr":"CDG","airline":"AFR"}]}
{
"now": 1642445345684.315,
"messages": 0,
"aircraft": [{
"hex": "06a1bf",
"flight": "QTR78U",
"lat": 45.847,
"lon": -72.131,
"altitude": 27550,
"track": 250,
"speed": 406,
"squawk": "2456",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "DOH",
"arr": "YUL",
"airline": "QTR"
}, {
"hex": "acacfb",
"flight": "CNS1025",
"lat": 43.26,
"lon": -70.749,
"altitude": 3150,
"track": 300,
"speed": 161,
"squawk": "3506",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "PSM",
"arr": "QQA",
"airline": "CNS"
}, {
"hex": "a05940",
"flight": "AAL2681",
"lat": 43.647,
"lon": -70.312,
"altitude": 0,
"track": 64,
"speed": 0,
"squawk": "1521",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "PWM",
"arr": "CLT",
"airline": "AAL"
}, {
"hex": "",
"flight": "PC12",
"lat": 43.648,
"lon": -70.308,
"altitude": 0,
"track": 188,
"speed": 0,
"squawk": "1234",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "",
"arr": "",
"airline": ""
}, {
"hex": "406f74",
"flight": "BAW7W",
"lat": 44.01,
"lon": -69.93,
"altitude": 39975,
"track": 228,
"speed": 418,
"squawk": "0716",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "LHR",
"arr": "IAD",
"airline": "BAW"
}, {
"hex": "c0582b",
"flight": "ACA7239",
"lat": 46.336,
"lon": -69.887,
"altitude": 36000,
"track": 238,
"speed": 420,
"squawk": "2477",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "IST",
"arr": "YUL",
"airline": "ACA"
}, {
"hex": "a2ca5f",
"flight": "UAL107",
"lat": 43.796,
"lon": -69.492,
"altitude": 39975,
"track": 197,
"speed": 403,
"squawk": "2463",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "MUC",
"arr": "IAD",
"airline": "UAL"
}, {
"hex": "a0f428",
"flight": "UAL988",
"lat": 43.9,
"lon": -68.95,
"altitude": 34000,
"track": 248,
"speed": 442,
"squawk": "2473",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "FRA",
"arr": "IAD",
"airline": "UAL"
}, {
"hex": "c053f6",
"flight": "ACA885",
"lat": 46.434,
"lon": -68.888,
"altitude": 36000,
"track": 250,
"speed": 410,
"squawk": "2466",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "GVA",
"arr": "YUL",
"airline": "ACA"
}, {
"hex": "a6b840",
"flight": "JIA5107",
"lat": 44.809,
"lon": -68.82,
"altitude": 0,
"track": 317,
"speed": 0,
"squawk": "3515",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "BGR",
"arr": "DCA",
"airline": "AAL"
}, {
"hex": "a9ab07",
"flight": "AAL292",
"lat": 45.147,
"lon": -67.998,
"altitude": 31000,
"track": 50,
"speed": 533,
"squawk": "2660",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "JFK",
"arr": "DEL",
"airline": "AAL"
}, {
"hex": "a8c4d8",
"flight": "UAL17",
"lat": 45.297,
"lon": -67.906,
"altitude": 39000,
"track": 249,
"speed": 391,
"squawk": "2471",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "LHR",
"arr": "EWR",
"airline": "UAL"
}, {
"hex": "06a2c4",
"flight": "QTR16J",
"lat": 46.455,
"lon": -67.522,
"altitude": 34000,
"track": 261,
"speed": 425,
"squawk": "2505",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "DOH",
"arr": "ORD",
"airline": "QTR"
}, {
"hex": "4cabd2",
"flight": "EIN11T",
"lat": 44.78,
"lon": -67.357,
"altitude": 36050,
"track": 241,
"speed": 380,
"squawk": "2465",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "DUB",
"arr": "IAD",
"airline": "EIN"
}, {
"hex": "4006c1",
"flight": "BAW25C",
"lat": 44.225,
"lon": -67.264,
"altitude": 39975,
"track": 224,
"speed": 401,
"squawk": "2467",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "LHR",
"arr": "MCO",
"airline": "BAW"
}, {
"hex": "4006c3",
"flight": "BAW60T",
"lat": 45.592,
"lon": -67.154,
"altitude": 40000,
"track": 238,
"speed": 403,
"squawk": "2475",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "LGW",
"arr": "TPA",
"airline": "BAW"
}, {
"hex": "aa86cc",
"flight": "AAL199",
"lat": 45.7,
"lon": -67.036,
"altitude": 34000,
"track": 234,
"speed": 412,
"squawk": "2504",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "MXP",
"arr": "JFK",
"airline": "AAL"
}, {
"hex": "06a2c6",
"flight": "QTR37G",
"lat": 43.236,
"lon": -66.745,
"altitude": 36000,
"track": 247,
"speed": 400,
"squawk": "2502",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "DOH",
"arr": "JFK",
"airline": "QTR"
}, {
"hex": "40655d",
"flight": "VIR91",
"lat": 45.167,
"lon": -66.603,
"altitude": 38000,
"track": 236,
"speed": 388,
"squawk": "2472",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "LHR",
"arr": "MCO",
"airline": "VIR"
}, {
"hex": "71c076",
"flight": "KAL288",
"lat": 44.365,
"lon": -66.292,
"altitude": 27800,
"track": 68,
"speed": 469,
"squawk": "3164",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "ORD",
"arr": "YHZ",
"airline": "KAL"
}, {
"hex": "3c6564",
"flight": "DLH418",
"lat": 45.649,
"lon": -66.092,
"altitude": 38000,
"track": 236,
"speed": 388,
"squawk": "2476",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "FRA",
"arr": "IAD",
"airline": "DLH"
}, {
"hex": "a658a1",
"flight": "GTI4701",
"lat": 46.341,
"lon": -66.069,
"altitude": 36000,
"track": 229,
"speed": 403,
"squawk": "2515",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "HHN",
"arr": "GSP",
"airline": "GTI"
}, {
"hex": "a8e4e9",
"flight": "UAL919",
"lat": 45.398,
"lon": -65.641,
"altitude": 38000,
"track": 240,
"speed": 379,
"squawk": "2503",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "LHR",
"arr": "IAD",
"airline": "UAL"
}, {
"hex": "aaaa92",
"flight": "AAL729",
"lat": 44.17,
"lon": -65.566,
"altitude": 34000,
"track": 240,
"speed": 398,
"squawk": "0761",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "LHR",
"arr": "PHL",
"airline": "AAL"
}, {
"hex": "",
"flight": "GA6C",
"lat": 46.648,
"lon": -65.537,
"altitude": 41000,
"track": 50,
"speed": 603,
"squawk": "3116",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "",
"arr": "",
"airline": ""
}, {
"hex": "01012b",
"flight": "MSR985",
"lat": 45.919,
"lon": -64.967,
"altitude": 36000,
"track": 237,
"speed": 378,
"squawk": "2513",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "CAI",
"arr": "JFK",
"airline": "MSR"
}, {
"hex": "4bb152",
"flight": "THY6363",
"lat": 44.627,
"lon": -64.868,
"altitude": 38000,
"track": 239,
"speed": 404,
"squawk": "2506",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "ISL",
"arr": "",
"airline": "THY"
}, {
"hex": "c2b535",
"flight": "CFC2525",
"lat": 45.992,
"lon": -64.462,
"altitude": 9175,
"track": 251,
"speed": 188,
"squawk": "7226",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "YYT",
"arr": "",
"airline": "CFC"
}, {
"hex": "39cf08",
"flight": "AFR334",
"lat": 45.825,
"lon": -63.659,
"altitude": 40000,
"track": 240,
"speed": 397,
"squawk": "2524",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "CDG",
"arr": "BOS",
"airline": "AFR"
}, {
"hex": "c07b05",
"flight": "",
"lat": 44.888,
"lon": -63.514,
"altitude": 0,
"track": 286,
"speed": 0,
"squawk": "0000",
"seen": 3,
"seen_pos": 3,
"rssi": 0,
"messages": 1,
"internet": true,
"dep": "YHZ",
"arr": "",
"airline": "ACA"
}]
}
+3 -3
View File
@@ -225,11 +225,11 @@
<span style="float: right;">
<span class="space-nopad center">
<span class="">
<span id="percentage"></span>
</span>
<span class="space-nopad center">
<span id="battery" class="material-icons" style="font-size: 36px;text-align: center;"></span>
<span class="">
<span id="battery" class="material-icons"></span>
</span>
<!-- FAB button with ripple -->
<button id="vol_down_button" class="mdl-button mdl-js-button mdl-button--icon"
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

+1
View File
@@ -23,6 +23,7 @@ var ol3d
var cesuim_active = false
var internet_mode = 0
var country_names = {}
var xhr1 = new XMLHttpRequest();
xhr1.open("GET", "json/country_names.json", true);
+1
View File
@@ -1023,6 +1023,7 @@ function selectPlaneByHex(hex, autofollow) {
if (hex !== null) {
// Assign the new selected
SelectedPlane = hex;
document.getElementById("aircraft_tab_background").setAttribute('src', "images/black.jpg")
tabBackgroundImage()
expandSidebar()
radarRadarTabSwitch()
+39 -32
View File
@@ -77,7 +77,7 @@ function showDefault() {
function volUp() {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/audio", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/audio", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
@@ -93,7 +93,7 @@ function volUp() {
function volDown() {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/audio", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/audio", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
@@ -108,7 +108,7 @@ function volDown() {
function changeMapBounds(btm_left, top_right) {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":8000/internet", true);
xhr.open("POST", "http://" + window.location.hostname + ":8000/internet", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
@@ -217,7 +217,7 @@ function modal4() {
function getInitialVolume() {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/audio", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/audio", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
@@ -232,7 +232,7 @@ function getInitialVolume() {
function getCPUTemp() {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/cmd", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/cmd", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
@@ -251,7 +251,7 @@ function getCPUTemp() {
function readBrightnessLevel() {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/brightness", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/brightness", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
@@ -271,7 +271,7 @@ function setBrightness(direction) {
if (brightness + 5 <= 255) {
brightness = brightness + 5
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/brightness", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/brightness", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify({
level: brightness
@@ -283,7 +283,7 @@ function setBrightness(direction) {
if (brightness - 5 >= 15) {
brightness = brightness - 5
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/brightness", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/brightness", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify({
level: brightness
@@ -322,7 +322,7 @@ function sendCMD(cmd) {
if (cmd === "update") {
var output = ""
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/cmd", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/cmd", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
@@ -349,7 +349,7 @@ function sendCMD(cmd) {
if (cmd === "getbranch") {
var output = ""
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/cmd", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/cmd", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
@@ -378,7 +378,7 @@ function sendCMD(cmd) {
snackbarContainer.MaterialSnackbar.showSnackbar(data);
var output = ""
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/cmd", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/cmd", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
@@ -398,7 +398,7 @@ function sendCMD(cmd) {
snackbarContainer.MaterialSnackbar.showSnackbar(data);
var output = ""
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/cmd", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/cmd", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
@@ -415,24 +415,31 @@ function sendCMD(cmd) {
}
function tabBackgroundImage() {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://127.0.0.1:5000/cmd", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
var page_nodes = $($.parseHTML(xhr.response));
var img1 = page_nodes.find("#results > div:nth-child(1) > div.result__section.result__section--photo-wrapper > a > img")
if (img1.attr('src') !== undefined) {
document.getElementById("aircraft_tab_background").setAttribute('src', img1.attr('src'))
} else {
document.getElementById("aircraft_tab_background").setAttribute('src', "images/black.jpg")
if (Planes[SelectedPlane].registration !== null) {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://127.0.0.1:5000/cmd", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
var page_nodes = $($.parseHTML(xhr.response));
var img1 = page_nodes.find("#results > div:nth-child(1) > div.result__section.result__section--photo-wrapper > a > img")
if (img1.attr('src') !== undefined) {
document.getElementById("aircraft_tab_background").setAttribute('src', img1.attr('src'))
document.getElementById("sidebar_close").style.color = "rgba(0,0,0,.7)"
} else {
document.getElementById("aircraft_tab_background").setAttribute('src', "images/black.jpg")
document.getElementById("sidebar_close").style.color = "rgba(255,255,255,.7)"
}
return
}
return
}
xhr.send(JSON.stringify({
command: "curl https://www.jetphotos.com/photo/keyword/" + Planes[SelectedPlane].registration
}));
} else {
document.getElementById("aircraft_tab_background").setAttribute('src', "images/black.jpg")
document.getElementById("sidebar_close").style.color = "rgba(255,255,255,.7)"
}
xhr.send(JSON.stringify({
command: "curl https://www.jetphotos.com/photo/keyword/" + Planes[SelectedPlane].registration
}));
}
function expandSidebar() {
@@ -449,7 +456,7 @@ function changeColorMode() {
const themeStylesheet = document.getElementById('theme')
//const themeToggle = document.getElementById('theme-toggle')
if (themeStylesheet.href.includes('light')) {
document.getElementById("logo").setAttribute("src", "images/dark/logo.png")
document.getElementById("radar_image").setAttribute("src", "images/dark/radar.png")
document.getElementById("itinerary_image").setAttribute("src", "images/dark/itinerary.png")
@@ -473,7 +480,7 @@ function changeColorMode() {
function changeBranch(branch) {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://"+window.location.hostname+":5000/cmd", true);
xhr.open("POST", "http://" + window.location.hostname + ":5000/cmd", true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify({
command: "sudo git checkout " + branch
@@ -542,7 +549,7 @@ function radarAircraftTabSwitch() {
function changeGraphsTime() {
var time = document.getElementById("graphs_time").value
document.getElementById("graphs_holder").setAttribute("src", "http://"+window.location.hostname+"/graphs1090/graphs" + graph_types[starting_graph] + time + ".png")
document.getElementById("graphs_holder").setAttribute("src", "http://" + window.location.hostname + "/graphs1090/graphs" + graph_types[starting_graph] + time + ".png")
}
function changeGraph(direction) {
@@ -550,11 +557,11 @@ function changeGraph(direction) {
var time = document.getElementById("graphs_time").value
if (direction && starting_graph != graph_types.length - 1) {
starting_graph++
document.getElementById("graphs_holder").setAttribute("src", "http://"+window.location.hostname+"/graphs1090/graphs" + graph_types[starting_graph] + time + ".png")
document.getElementById("graphs_holder").setAttribute("src", "http://" + window.location.hostname + "/graphs1090/graphs" + graph_types[starting_graph] + time + ".png")
console.log(starting_graph)
} else if (starting_graph != 0) {
starting_graph = starting_graph - 1
document.getElementById("graphs_holder").setAttribute("src", "http://"+window.location.hostname+"/graphs1090/graphs" + graph_types[starting_graph] + time + ".png")
document.getElementById("graphs_holder").setAttribute("src", "http://" + window.location.hostname + "/graphs1090/graphs" + graph_types[starting_graph] + time + ".png")
console.log(starting_graph)
}