def __init__(self): UnveillanceFrontend.__init__(self) self.reserved_routes.extend(["auth", "commit"]) self.routes.extend([ (r"/commit/", self.DriveOpenHandler) ]) self.default_on_loads.extend([ '/web/js/lib/visualsearch.js', '/web/js/lib/jquery.ui.core.js', '/web/js/lib/jquery.ui.position.js', '/web/js/lib/jquery.ui.widget.js', '/web/js/lib/jquery.ui.menu.js', '/web/js/lib/jquery.ui.autocomplete.js', '/web/js/lib/sammy.js', '/web/js/lib/oboe-browser.min.js', '/web/js/lib/crossfilter.min.js', '/web/js/lib/d3.min.js', '/web/js/lib/md5.js', '/web/js/viz/uv_viz.js', '/web/js/models/unveillance_task_pipe.js', '/web/js/models/cp_document.js', '/web/js/models/cp_batch.js', '/web/js/models/cp_notifier.js', '/web/js/compass.js' ]) self.on_loads_by_status[1].extend([ '/web/js/modules/cp_login.js', '/web/js/models/unveillance_user.js' ]) self.on_loads_by_status[2].extend([ '/web/js/models/unveillance_user.js', '/web/js/modules/cp_logout.js', '/web/js/models/cp_user.js' ]) self.on_loads_by_status[3].extend([ '/web/js/lib/skulpt.min.js', '/web/js/lib/skulpt-stdlib.js', '/web/js/models/unveillance_user.js', '/web/js/modules/cp_logout.js', '/web/js/models/cp_user.js', '/web/js/models/cp_user_admin.js', '/web/js/models/cp_console.js' ]) self.on_loads.update({ 'main' : [ '/web/js/models/cp_keyword_search.js', '/web/js/models/cp_result_browser.js', '/web/js/modules/main.js' ], 'document' : [ '/web/js/models/cp_in_document_search.js', '/web/js/models/cp_document_header.js', '/web/js/models/cp_document_viewer.js', '/web/js/models/cp_page_window.js', '/web/js/modules/uv_unveil.js', '/web/js/modules/cp_document_viewer.js' ], 'documents' : [ '/web/js/models/cp_keyword_search.js', '/web/js/models/cp_batch.js', '/web/js/modules/cp_batch.js' ], 'unveil' : [ '/web/js/lib/jquery.csv.js', '/web/js/viz/uv_csv.js', '/web/js/models/cp_keyword_search.js', '/web/js/models/cp_document_header.js', '/web/js/modules/uv_unveil.js', '/web/js/modules/cp_unveil.js' ] }) self.restricted_routes_by_status[0].extend(['reindex']) with open(os.path.join(COMPASS_CONF_ROOT, "compass.init.json"), 'rb') as IV: init_vars = json.loads(IV.read())['web'] init_vars['MIME_TYPE_TASK_REQUIREMENTS'] = MIME_TYPE_TASK_REQUIREMENTS init_vars['AVAILABLE_CLUSTERS'] = AVAILABLE_CLUSTERS self.init_vars.update(init_vars) tmpl_root = os.path.join(COMPASS_BASE_DIR, "web", "layout", "tmpl") self.INDEX_HEADER = os.path.join(tmpl_root, "header.html") self.INDEX_FOOTER = os.path.join(tmpl_root, "footer.html") self.MODULE_HEADER = self.INDEX_HEADER self.MODULE_FOOTER = self.INDEX_FOOTER
def __init__(self): UnveillanceFrontend.__init__(self) self.reserved_routes.extend( ["ictd", "commit", "leaflet", "submissions", "v2j3mview"]) self.routes.extend([ (r"/ictd/", self.ICTDHandler), (r"/commit/", self.DriveHandler), (r"/submissions/", self.SubmissionShortcutHandler), (r"/leaflet/(.*)", self.LeafletHandler), (r"/j3mheader/(.*)", J3MHeaderHandler), (r"/lightMeter/(.*)", LightMeterHandler), (r"/pressureHPAOrMBAR/(.*)", pressureHPAOrMBARHandler), (r"/pressureAltitude/(.*)", pressureAltitudeHandler), (r"/GPSBearing/(.*)", GPSBearingHandler), (r"/GPSCoords/(.*)", GPSCoordsHandler), (r"/GPSAccuracy/(.*)", GPSAccuracyHandler), (r"/GPSData/(.*)", GPSDataHandler), (r"/Accelerometer/(.*)", AccelerometerHandler), (r"/DocumentWrapper/(.*)", DocumentWrapperHandler), (r"/PitchRollAzimuth/(.*)", PitchRollAzimuthHandler), (r"/VisibleWifiNetworks/(.*)", VisibleWifiNetworksHandler), (r"/AppendedUserData/(.*)", AppendedUserDataHandler), (r"/SubmitViaURL/(.*)", SubmitViaURLHandler), (r"/j3mretrieve/(.*)", J3MRetrieveHandler) ]) self.default_on_loads.extend([ '/web/js/lib/md5.js', '/web/js/lib/crossfilter.min.js', '/web/js/lib/d3.min.js', '/web/js/lib/visualsearch.js', '/web/js/lib/jquery.ui.js', '/web/js/lib/jquery.ui.core.js', '/web/js/lib/jquery.ui.position.js', '/web/js/lib/jquery.ui.widget.js', '/web/js/lib/jquery.ui.menu.js', '/web/js/lib/jquery.ui.autocomplete.js', '/web/js/viz/uv_viz.js', '/web/js/models/ic_notifier.js', '/web/js/informacam.js' ]) self.on_loads.update({ 'submission': [ '/leaflet/leaflet.js', # '/web/js/viz/uv_indented_tree.js', '/web/js/viz/ic_main.js', '/web/js/viz/ic_progress_notifer.js', '/web/js/viz/ic_document_source.js', '/web/js/viz/ic_document_wrapper.js', '/web/js/viz/ic_appended_userdata.js', '/web/js/viz/ic_j3m_header.js', # '/web/js/viz/ic_timeseries_graph.js', # '/web/js/viz/ic_timeseries_chart.js', '/web/js/viz/ic_timeseries_map.js', '/web/js/viz/ic_linechart_multiview.js', '/web/js/models/unveillance_document.js', '/web/js/models/ic_j3m.js', # '/web/js/models/ic_image.js', # '/web/js/models/ic_submission.js', '/web/js/controllers/ic_submission.js', '/web/js/ic_tsv_export.js', '/web/css/ic_viz.css' ], 'source': [ '/web/js/models/unveillance_document.js', '/web/js/models/ic_source.js', '/web/js/controllers/ic_source.js' ], 'main': [ '/web/css/tabs.css', '/web/css/cv_viz.css', '/leaflet/leaflet.js', '/web/js/lib/dropzone.js', '/web/js/viz/ic_progress_notifer.js', '/web/js/viz/ic_document_source.js', '/web/js/viz/ic_document_wrapper.js', '/web/js/viz/ic_appended_userdata.js', '/web/js/viz/ic_j3m_header.js', '/web/js/viz/ic_timeseries_map.js', '/web/js/viz/ic_linechart_multiview.js', '/web/js/viz/ic_image.js', '/web/js/viz/ic_document_browser.js', '/web/js/viz/ic_asset_browser.js', '/web/js/viz/cv_documents.js', '/web/js/viz/cv_file.js', '/web/js/viz/cv_metadata.js', '/web/js/viz/cv_notes.js', '/web/js/viz/cv_export.js', '/web/js/models/unveillance_document.js', '/web/js/models/ic_search.js', '/web/js/models/unveillance_dropzone.js', '/web/js/models/ic_dropzone.js', '/web/js/models/ic_document_browser.js', '/web/js/models/ic_j3m.js', '/web/js/ic_tsv_export.js', '/web/js/controllers/ic_search.js', '/web/js/controllers/main.js' ], 'search': [ '/web/js/models/ic_search.js', '/web/js/models/ic_document_browser.js', '/web/js/models/ic_j3m.js', '/web/js/ic_tsv_export.js', '/web/js/controllers/ic_search.js', '/web/css/ic_viz.css' ], 'unveil': [ '/web/js/controllers/uv_unveil.js', '/web/js/models/unveillance_task_pipe.js', '/web/js/controllers/ic_unveil.js' ], 'landing': [ '/web/css/tabs.css', '/web/js/lib/dropzone.js', '/web/js/models/ic2_search.js', '/web/js/models/unveillance_dropzone.js', '/web/js/models/ic_dropzone.js', '/web/js/models/ic_document_browser.js', '/web/js/controllers/ic2_search.js', '/web/js/controllers/ic_landing.js' ], 'simple': [ '/web/js/lib/dropzone.js', '/web/js/models/unveillance_dropzone.js' ] }) self.on_loads_by_status[1].extend([ '/web/js/controllers/ic_login.js', '/web/js/models/unveillance_user.js' ]) self.on_loads_by_status[2].extend([ '/web/js/models/unveillance_user.js', '/web/js/controllers/ic_logout.js', '/web/js/models/ic_user.js' ]) self.on_loads_by_status[3].extend([ '/web/js/models/unveillance_user.js', '/web/js/controllers/ic_logout.js', '/web/js/models/ic_user.js', '/web/js/models/ic_user_admin.js' ]) self.restricted_routes_by_status[0].extend( ['unveil', 'reindex', 'cluster']) self.get_page_load_extras.update( {'body_classes': self.get_browser_from_user_agent}) with open(os.path.join(INFORMA_CONF_ROOT, "informacam.init.json"), 'rb') as IV: init_vars = json.loads(IV.read())['web'] self.init_vars.update(init_vars) tmpl_root = os.path.join(INFORMA_BASE_DIR, "web", "layout", "tmpl") self.INDEX_HEADER = os.path.join(tmpl_root, "header.html") self.INDEX_FOOTER = os.path.join(tmpl_root, "footer.html") self.MODULE_HEADER = self.INDEX_HEADER self.MODULE_FOOTER = self.INDEX_FOOTER self.WEB_TITLE = WEB_TITLE
def __init__(self): UnveillanceFrontend.__init__(self)
def __init__(self): UnveillanceFrontend.__init__(self) self.reserved_routes.extend(["ictd", "commit", "leaflet", "submissions", "v2j3mview"]) self.routes.extend([ (r"/ictd/", self.ICTDHandler), (r"/commit/", self.DriveHandler), (r"/submissions/", self.SubmissionShortcutHandler), (r"/leaflet/(.*)", self.LeafletHandler), (r"/j3mheader/(.*)", J3MHeaderHandler), (r"/lightMeter/(.*)", LightMeterHandler), (r"/pressureHPAOrMBAR/(.*)", pressureHPAOrMBARHandler), (r"/pressureAltitude/(.*)", pressureAltitudeHandler), (r"/GPSBearing/(.*)", GPSBearingHandler), (r"/GPSCoords/(.*)", GPSCoordsHandler), (r"/GPSAccuracy/(.*)", GPSAccuracyHandler), (r"/GPSData/(.*)", GPSDataHandler), (r"/Accelerometer/(.*)", AccelerometerHandler), (r"/DocumentWrapper/(.*)", DocumentWrapperHandler), (r"/PitchRollAzimuth/(.*)", PitchRollAzimuthHandler), (r"/VisibleWifiNetworks/(.*)", VisibleWifiNetworksHandler), (r"/AppendedUserData/(.*)", AppendedUserDataHandler), (r"/SubmitViaURL/(.*)", SubmitViaURLHandler), (r"/j3mretrieve/(.*)", J3MRetrieveHandler)]) self.default_on_loads.extend([ '/web/js/lib/md5.js', '/web/js/lib/sammy.js', '/web/js/lib/crossfilter.min.js', '/web/js/lib/d3.min.js', '/web/js/lib/visualsearch.js', '/web/js/lib/jquery.ui.js', '/web/js/lib/jquery.ui.core.js', '/web/js/lib/jquery.ui.position.js', '/web/js/lib/jquery.ui.widget.js', '/web/js/lib/jquery.ui.menu.js', '/web/js/lib/jquery.ui.autocomplete.js', '/web/js/viz/uv_viz.js', '/web/js/models/ic_notifier.js', '/web/js/informacam.js' ]) self.on_loads.update({ 'submission' : [ '/leaflet/leaflet.js', # '/web/js/viz/uv_indented_tree.js', '/web/js/viz/ic_main.js', '/web/js/viz/ic_progress_notifer.js', '/web/js/viz/ic_document_source.js', '/web/js/viz/ic_document_wrapper.js', '/web/js/viz/ic_appended_userdata.js', '/web/js/viz/ic_j3m_header.js', # '/web/js/viz/ic_timeseries_graph.js', # '/web/js/viz/ic_timeseries_chart.js', '/web/js/viz/ic_timeseries_map.js', '/web/js/viz/ic_linechart_multiview.js', '/web/js/models/unveillance_document.js', '/web/js/models/ic_j3m.js', # '/web/js/models/ic_image.js', # '/web/js/models/ic_submission.js', '/web/js/modules/ic_submission.js', '/web/js/ic_tsv_export.js', '/web/css/ic_viz.css' ], 'source' : [ '/web/js/models/unveillance_document.js', '/web/js/models/ic_source.js', '/web/js/modules/ic_source.js' ], 'main' : [ '/web/js/lib/dropzone.js', '/web/js/models/ic_search.js', '/web/js/models/unveillance_dropzone.js', '/web/js/models/ic_document_browser.js', '/web/js/modules/main.js'], 'search' :[ '/web/js/models/ic_search.js', '/web/js/models/ic_document_browser.js', '/web/js/models/ic_j3m.js', '/web/js/ic_tsv_export.js', '/web/js/modules/ic_search.js', '/web/css/ic_viz.css' ], 'unveil' : [ '/web/js/modules/uv_unveil.js', '/web/js/models/unveillance_task_pipe.js', '/web/js/modules/ic_unveil.js' ], 'landing' : [ '/web/css/tabs.css', '/web/js/lib/dropzone.js', '/web/js/models/ic2_search.js', '/web/js/models/unveillance_dropzone.js', '/web/js/models/ic_dropzone.js', '/web/js/models/ic_document_browser.js', '/web/js/modules/ic2_search.js', '/web/js/modules/ic_landing.js' ], 'simple' : [ '/web/js/lib/dropzone.js', '/web/js/models/unveillance_dropzone.js' ] }) self.on_loads_by_status[1].extend([ '/web/js/modules/ic_login.js', '/web/js/models/unveillance_user.js' ]) self.on_loads_by_status[2].extend([ '/web/js/models/unveillance_user.js', '/web/js/modules/ic_logout.js', '/web/js/models/ic_user.js' ]) self.on_loads_by_status[3].extend([ '/web/js/models/unveillance_user.js', '/web/js/modules/ic_logout.js', '/web/js/models/ic_user.js', '/web/js/models/ic_user_admin.js' ]) self.restricted_routes_by_status[0].extend([ 'unveil', 'reindex', 'cluster']) self.get_page_load_extras.update({ 'body_classes' : self.get_browser_from_user_agent }) with open(os.path.join(INFORMA_CONF_ROOT, "informacam.init.json"), 'rb') as IV: init_vars = json.loads(IV.read())['web'] self.init_vars.update(init_vars) tmpl_root = os.path.join(INFORMA_BASE_DIR, "web", "layout", "tmpl") self.INDEX_HEADER = os.path.join(tmpl_root, "header.html") self.INDEX_FOOTER = os.path.join(tmpl_root, "footer.html") self.MODULE_HEADER = self.INDEX_HEADER self.MODULE_FOOTER = self.INDEX_FOOTER self.WEB_TITLE = WEB_TITLE