Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

EO-NET proxy

Mike McGann858123c219ab
diff --git a/web/index.html b/web/index.html
index 18563988e..b933fea6e 100644
--- a/web/index.html
+++ b/web/index.html
@@ -197,6 +197,7 @@
<!-- link.dev --> <script type="text/javascript" src="js/wv.feedback.js"></script>
<!-- link.dev --> <script type="text/javascript" src="js/wv.tour.js"></script>
+ <!-- link.dev --> <script type="text/javascript" src="js/wv.events.js"></script>
<!-- link.dev --> <script type="text/javascript" src="js/wv.debug.js"></script>
<!-- link.dev --> <script type="text/javascript" src="js/wv.main.js"></script>
diff --git a/web/js/wv.events.js b/web/js/wv.events.js
new file mode 100644
index 000000000..86b8a4488
--- /dev/null
+++ b/web/js/wv.events.js
@@ -0,0 +1,30 @@
+/*
+ * NASA Worldview
+ *
+ * This code was originally developed at NASA/Goddard Space Flight Center for
+ * the Earth Science Data and Information System (ESDIS) project.
+ *
+ * Copyright (C) 2013 - 2014 United States Government as represented by the
+ * Administrator of the National Aeronautics and Space Administration.
+ * All Rights Reserved.
+ */
+
+var wv = wv || {}
+wv.events = wv.events || (function() {
+
+ var self = {};
+
+ self.query = function() {
+ console.log("DOING IT");
+ $.getJSON("http://eonet.sci.gsfc.nasa.gov/events", function(data) {
+ console.log("GOT IT");
+ console.log(data);
+ });
+ };
+
+ return self;
+})();
+
+$(function() {
+ wv.events.query();
+});
diff --git a/web/service/events/.htaccess b/web/service/events/.htaccess
new file mode 100644
index 000000000..ceb239fe0
--- /dev/null
+++ b/web/service/events/.htaccess
@@ -0,0 +1,7 @@
+Options +ExecCGI
+AddHandler cgi-script .cgi
+
+ExpiresDefault A0
+Header set Cache-Control "no-cache, no-store, must-revalidate"
+Header set Pragma "no-cache"
+
diff --git a/web/service/events/eo-net.cgi b/web/service/events/eo-net.cgi
new file mode 100755
index 000000000..c9bf9d367
--- /dev/null
+++ b/web/service/events/eo-net.cgi
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+import cgi
+import shutil
+import sys
+from urllib2 import urlopen
+
+root = "http://eonet.sci.gsfc.nasa.gov"
+fields = cgi.FieldStorage()
+path = fields["path"].value
+url = root + path
+
+fp = None
+try:
+ fp = urlopen(url)
+ print "Content-type: application/json"
+ print ""
+ shutil.copyfileobj(fp, sys.stdout)
+ fp.close()
+ fp = None
+finally:
+ if fp:
+ fp.close()
+