1#!/usr/bin/env python3
2
3"""Standard Django file to map URLs to view functions."""
4
5from django.urls import path
6from django.conf.urls import include
7from django.conf.urls import handler404
8from django.conf.urls import handler500
9from django.views.generic import TemplateView
10
11import chart.eventviewer2.views
12
13app_name = 'eventviewer2'
14
15urlpatterns = [
16 # Index page
17 path('',
18 chart.eventviewer2.views.event_views,
19 name='index'),
20
21 # Return a single event as json object
22 path('ajax/events/getid',
23 chart.eventviewer2.views.json_event,
24 name='json_event'),
25
26 # Request a list of events to populate the main table
27 path('ajax/events',
28 chart.eventviewer2.views.retrieve_events,
29 name='retrieve_events'),
30
31 # Get instance properties for the displayed event classes
32 path('events/properties',
33 chart.eventviewer2.views.get_available_instance_properties,
34 name='get_available_instance_properties'),
35
36 # Processing of timeline display
37 path('events/timeline_events',
38 chart.eventviewer2.views.timeline_events,
39 name='timeline_events'),
40
41 # Convert the test the user entered in the start/stop input boxes into absolute times
42 path('events/interpret_times',
43 chart.eventviewer2.views.interpret_times,
44 name='interpret_times'),
45
46 # Retrieve geolocated event image
47 path('events/geo_image',
48 chart.eventviewer2.views.location,
49 name='location'),
50
51 # Open event geolocation popup
52 path('event_geo',
53 TemplateView.as_view(template_name='eventviewer2/event_geo.html',
54 content_type='text/html'),
55 name='event_geo'),
56
57 # Download selected events as an XML file
58 path('xml_export',
59 chart.eventviewer2.views.xml_export,
60 name='xml_export'),
61
62 # Download selected events as a CSV file
63 path('csv_export',
64 chart.eventviewer2.views.csv_export,
65 name='csv_export'),
66
67 # Show the event upload dialog or allow a local XML file to be uploaded to the session
68 path('directupload',
69 chart.eventviewer2.views.directupload,
70 name='directupload'),
71
72 # Ingest an uploaded local XML file
73 path('ingest_events',
74 chart.eventviewer2.views.ingest_uploaded,
75 name='ingest_uploaded'),
76
77 # Retrieve the things to show on the 3d globe
78 path('globe_content',
79 chart.eventviewer2.views.globe_content,
80 name='globe_content'),
81]