1#!/usr/bin/env python3
2
3"""Standard Django file mapping url strings to view functions."""
4
5from django.urls import path
6from django.urls import re_path
7from django.views.generic import TemplateView
8
9import chart.jobviewer.views
10
11app_name = 'jobviewer'
12
13urlpatterns = [
14 # Single page application
15 path('',
16 chart.jobviewer.views.index,
17 name='index'),
18
19 # Summary result
20 path('ajax/summary',
21 chart.jobviewer.views.summary,
22 name='summary'),
23
24 # List result
25 path('ajax/list',
26 chart.jobviewer.views.joblist,
27 name='list'),
28
29 # Single job result
30 path('ajax/job',
31 chart.jobviewer.views.job,
32 name='single'),
33
34 # View file
35 re_path(r'ajax/file(?P<filename>.*)$',
36 chart.jobviewer.views.fileviewer,
37 name='fileviewer'),
38
39 # JS support
40 path('jobs.js',
41 TemplateView.as_view(template_name='jobviewer/jobs.js',
42 content_type='text/javascript'),
43 name='js'),
44]