diff --git a/build/portal/html/admin/index.php b/build/portal/html/admin/index.php index 831e644..53d9c57 100644 --- a/build/portal/html/admin/index.php +++ b/build/portal/html/admin/index.php @@ -192,6 +192,7 @@ $common->updateSetting("twitterConsumerSecret", $_POST['twitterConsumerSecret']); $common->updateSetting("twitterAccessToken", $_POST['twitterAccessToken']); $common->updateSetting("twitterAccessTokenSecret", $_POST['twitterAccessTokenSecret']); + $common->updateSetting("googleMapsApiKey", $_POST['googleMapsApiKey']); // Purge older flight positions. if (isset($_POST['purgepositions'])) { @@ -245,6 +246,7 @@ $defaultPage = $common->getSetting("defaultPage"); $dateFormat = $common->getSetting("dateFormat"); $timeZone = $common->getSetting("timeZone"); + $googleMapsApiKey = $common->getSetting("googleMapsApiKey"); // Get navigation settings from settings.xml. $enableFlights = $common->getSetting("enableFlights"); @@ -381,6 +383,10 @@ ?> +
+ + +
diff --git a/build/portal/html/flights.php b/build/portal/html/flights.php index fafbf3c..4ebf3b8 100644 --- a/build/portal/html/flights.php +++ b/build/portal/html/flights.php @@ -81,4 +81,3 @@ $template->display($pageData); ?> - diff --git a/build/portal/html/install/index.php b/build/portal/html/install/index.php index 594d92e..cbd7584 100644 --- a/build/portal/html/install/index.php +++ b/build/portal/html/install/index.php @@ -408,6 +408,7 @@ EOF; $common->addSetting('twitterConsumerSecret', ''); $common->addSetting('twitterAccessToken', ''); $common->addSetting('twitterAccessTokenSecret', ''); + $common->addSetting('googleMapsApiKey', ''); if ($_POST['driver'] == "xml") $common->addSetting('enableFlights', FALSE); diff --git a/build/portal/html/install/upgrade-v2.5.0.php b/build/portal/html/install/upgrade-v2.5.0.php index 5a90955..fe50bc4 100644 --- a/build/portal/html/install/upgrade-v2.5.0.php +++ b/build/portal/html/install/upgrade-v2.5.0.php @@ -169,6 +169,9 @@ EOF; $common->addSetting('twitterAccessToken', ''); $common->addSetting('twitterAccessTokenSecret', '') + // Add Google Maps API Key setting. + $common->addSetting('googleMapsApiKey', ''); + // Update the version and patch settings.. $common->updateSetting("version", "2.5.0"); $common->updateSetting("patch", ""); diff --git a/build/portal/html/plot.php b/build/portal/html/plot.php index 4ee9961..1ef4ba8 100644 --- a/build/portal/html/plot.php +++ b/build/portal/html/plot.php @@ -146,4 +146,3 @@ $template->display($pageData); ?> - diff --git a/build/portal/html/templates/default/plot.tpl b/build/portal/html/templates/default/plot.tpl index 1b61f31..ca8d713 100644 --- a/build/portal/html/templates/default/plot.tpl +++ b/build/portal/html/templates/default/plot.tpl @@ -315,5 +315,5 @@ } - + {/area} diff --git a/build/portal/python/notifications.py b/build/portal/python/notifications.py index 064d8ba..c645e04 100755 --- a/build/portal/python/notifications.py +++ b/build/portal/python/notifications.py @@ -52,7 +52,7 @@ from xml.dom import minidom import xml.etree.ElementTree as ET # Temporary variables for testing. -portal_url = "http://172.17.2.148" +portal_url = "http://localhost" debug_script = "true" send_email = "false" send_tweet = "false" @@ -100,10 +100,6 @@ doc = minidom.parse("/var/www/html/data/notifications.xml") flights = doc.getElementsByTagName("flight") -############################################### -## SEND NOTIFICATION(S) IF FLIGHTS ARE FOUND - - # Get notification JSON from the portal. response = urllib2.urlopen(portal_url,"/api/notifications.php?type=flights") flights_seen = json.load(response) @@ -152,11 +148,6 @@ Subject: ADS-B Receiver Flight Notification except UnicodeDecodeError: print "Error: unable to send tweet" - -############################################### -## UPDATE THE FLIGHTS LASTMESSAGECOUNT - - if name.firstChild.data.strip() == i['flight']: update_data = [('flight',i['flight']),('messages','0')] update_data = urllib.urlencode(update_data)