Commits

Arthur Endsley committed a4612d9

Got the full service working with the new UI, thanks to Tyler

Comments (0)

Files changed (5)

djangosite/apache/django.wsgi

 # add the path of the Django version
 sys.path.append('/usr/local/django/trunk')
 
-os.environ['DJANGO_SETTINGS_MODULE'] = 'djangosite.settings-production'
-
 # append the django project root directory to the python path
 sys.path.append('/usr/local/project/rtmm')
 sys.path.append('/usr/local/project/rtmm/djangosite')
 sys.path.append('/usr/local/project/python-kml')
 
+os.environ['DJANGO_SETTINGS_MODULE'] = 'djangosite.settings-production'
+
 #os.environ['TEMPORARY_DIRECTORY'] = '/usr/local/project/rtmm/tmp/'
 
 import django.core.handlers.wsgi

djangosite/mainapp/templates/media/css/app.css

 div.left {float:left;}
 div.right {float:right;}
 div.clear {width:100%;height:1px;clear:both;}
-div#wrapper {width:100%;height:280px;background:#999999 url(/satellite-tracking/site_media/img/back.png) top left repeat;border-bottom:1px solid #666666;margin:0 auto;}
-div#tape {width:600px;height:280px;margin:0 auto;}
+div#wrapper {width:100%;height:450px;background:#999999 url(/satellite-tracking/site_media/img/back.png) top left repeat;border-bottom:1px solid #666666;margin:0 auto;}
+div#tape {width:600px;height:450px;margin:0 auto;}
 div#main {width:600px;float:left;padding:15px 0px 15px 0px;}
 div#main {font-family:Univers,"Myriad Pro",Myriad,"DejaVu Sans Condensed","Liberation Sans","Nimbus Sans L","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;text-align:justify;color:black;}
 div#main a {text-decoration:none;color:#990000;}

djangosite/mainapp/templates/media/js/App.src.js

                 config = config || {};
                 config.listeners = config.listeners || {};
                 Ext.applyIf(config.listeners, {
-                    focus: function() {},//this.disappearSiblings(this);},
-                    blur: function() {}//this.reappearSiblings();}
+                    focus: function() {this.disappearSiblings(this);},
+                    blur: function() {this.reappearSiblings();}
                     });
                 App.form.FieldGroup.superclass.constructor.call(this, config);
                 },
                             if (this.formId === 'form-simple') {
                                 window.open('http://localhost/satellite-tracking/nadir/' + offering + '.html');
                                 }
+                            else {
+                                date = form.find('name', 'datetime')[0].getValue();
+                                window.open('http://localhost/satellite-tracking/nadir/track/' + date + 'Z/' + offering + '.html');
+                                }
                             }
                         }
                     });

djangosite/mainapp/templates/media/js/ui.src.js

                 html: '<div id="intro">Ephemeris data for multiple satellites is provided on the web by NASA\'s <a href="http://rtmm.nsstc.nasa.gov/" target="_blank">Real-Time Mission Monitor (RTMM)</a>. Here, you can view that data in a table or view the data in <a href="http://earth.google.com" target="_blank">Google Earth</a>. With Google Earth you\'ll be able to see a 3D model of the satellite and its position in space.</div>'
                 },
             form: {
-                xtype: 'ribbonpanel', height: 150, region: 'south',
+                xtype: 'ribbonpanel', height: 320, region: 'south',
                 items: [
                     {xtype: 'fieldgroup', title: 'View a Satellite in Real Time',
                         id: 'form-simple', 
                         },
 */
                     {xtype: 'fieldgroup', title: 'Or, Specify a Date and Time',
-                        id: 'form-advanced', hidden: true,
+                        id: 'form-advanced',
                         items: [
                             {xtype: 'combobox', fieldLabel: 'Satellite',
                                 emptyText: 'Select...', name: 'offering',
     // This is the whole Web application
     Web.app = Ext.create({
         xtype: 'ribbon', layout: 'border', renderTo: Ext.fly('tape'),
-        width: 600, height: 280,
+        width: 600, height: 450,
         items: [Web.title, Web.text, Web.form]
         });
 

djangosite/mainapp/views.py

 from django.contrib.gis.shortcuts import render_to_kml
 from django.views.decorators.cache import cache_page
 from django.utils import simplejson as json
+from pykml.factory import KML_ElementMaker as KML
 
-from pykml.factory import KML_ElementMaker as KML
+
 
 def exception(request, error):
     '''Display a custom error message depending on the error'''
     return render_to_response('error_' + str(error) + '.html')
 
+
+
 def display_test(request):
     return render_to_response('app.html')
 
+
+
 def display_request_form(request):
     '''Display a list of offerings (satellites) that have nadir tracks'''
     # Get the data
     xml = get_rtmm_capabilities_xml('nadir')
     nadir_offering_list = parse_sos_getcapabilities(xml)
     
-    return render_to_response(
-        'index.html',
-        {'offering_list': nadir_offering_list},
-        )
+    return render_to_response('index.html', {'offering_list': nadir_offering_list})
+
+
 
 @cache_page(1)
 def display_nadir(request, offering_id, format):
             content = {}
         return render_to_response('nadir_observations.html', content)
 
+
+
 def create_nadir_location_kml(
             offering_id,
             nadir_observation_list,
     return kmldoc
 
 
+
 @cache_page(600)
 def display_nadir_link(request, offering_id):
     '''Return a KML NetworkLink for nadir tracks continuously updated in real-time.'''
             {'content': etree.tostring(kmldoc)},
             )
 
+
+
 @cache_page(1)
 def display_nadir_track(request,
     off_year,
             track_time += datetime.timedelta(seconds=10)
             next_time += datetime.timedelta(seconds=10)
 
-            return HttpResponse(json.dumps(etree.tostring(placemark)))
-
             kmldoc.append(placemark)
         
         try:
             },
             )
 
+
+
 @cache_page(1)
 def perform_request(request):
     '''
                 },
             )
 
+
+
 def get_rtmm_capabilities_xml(property):
     """Get the getCapabilities XML response from the RTMM web service
     
         xml = None
     return xml
 
+
+
 def parse_sos_getcapabilities(xml_string):
     '''Parses the capabilities of the nadir trace web service (SOS)'''
     
         id_list.append(offering.attrib['{%s}id' % _namespace_map['gml']])
     return id_list
 
+
+
 def get_rtmm_observations_xml(
         property_type,
         offering,
         xml = None
     return xml
 
+
+
 def parse_sos_getobservation(xml_string):
     '''Parses the nadir locations of Sensor Observation Service (SOS)'''
     
         }
     return observation
 
+
+
 @cache_page(10)
 def return_time(request):
     '''Displays the current time (used for testing page caching)'''