blob: 7f8489d3aaef6304607cb390426cfcc2811c27e1 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#
2# BitBake Toaster Implementation
3#
Brad Bishopd7bf8c12018-02-25 22:55:05 -05004# Copyright (C) 2013-2017 Intel Corporation
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005#
Brad Bishopc342db32019-05-15 21:57:59 -04006# SPDX-License-Identifier: GPL-2.0-only
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007#
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008
Andrew Geissler5082cc72023-09-11 08:41:39 -04009from django.urls import re_path as url
Andrew Geissler82c905d2020-04-13 13:39:40 -050010from django.views.generic import RedirectView
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012from toastergui import tables
Patrick Williamsc0f7c042017-02-23 20:41:17 -060013from toastergui import buildtables
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014from toastergui import typeaheads
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050015from toastergui import api
Patrick Williamsc0f7c042017-02-23 20:41:17 -060016from toastergui import widgets
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017from toastergui import views
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019urlpatterns = [
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020 # landing page
Brad Bishopd7bf8c12018-02-25 22:55:05 -050021 url(r'^landing/$', views.landing, name='landing'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050023 url(r'^builds/$',
24 tables.AllBuildsTable.as_view(template_name="builds-toastertable.html"),
25 name='all-builds'),
26
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027 # build info navigation
Brad Bishopd7bf8c12018-02-25 22:55:05 -050028 url(r'^build/(?P<build_id>\d+)$', views.builddashboard, name="builddashboard"),
Patrick Williamsc0f7c042017-02-23 20:41:17 -060029 url(r'^build/(?P<build_id>\d+)/tasks/$',
30 buildtables.BuildTasksTable.as_view(
31 template_name="buildinfo-toastertable.html"),
32 name='tasks'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033
Brad Bishopd7bf8c12018-02-25 22:55:05 -050034 url(r'^build/(?P<build_id>\d+)/task/(?P<task_id>\d+)$', views.task, name='task'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
Patrick Williamsc0f7c042017-02-23 20:41:17 -060036 url(r'^build/(?P<build_id>\d+)/recipes/$',
37 buildtables.BuiltRecipesTable.as_view(
38 template_name="buildinfo-toastertable.html"),
39 name='recipes'),
40
Brad Bishopd7bf8c12018-02-25 22:55:05 -050041 url(r'^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)/active_tab/(?P<active_tab>\d{1})$', views.recipe, name='recipe'),
Patrick Williamsc0f7c042017-02-23 20:41:17 -060042
Brad Bishopd7bf8c12018-02-25 22:55:05 -050043 url(r'^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)$', views.recipe, name='recipe'),
44 url(r'^build/(?P<build_id>\d+)/recipe_packages/(?P<recipe_id>\d+)$', views.recipe_packages, name='recipe_packages'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045
Patrick Williamsc0f7c042017-02-23 20:41:17 -060046 url(r'^build/(?P<build_id>\d+)/packages/$',
47 buildtables.BuiltPackagesTable.as_view(
48 template_name="buildinfo-toastertable.html"),
49 name='packages'),
50
Brad Bishopd7bf8c12018-02-25 22:55:05 -050051 url(r'^build/(?P<build_id>\d+)/package/(?P<package_id>\d+)$', views.package_built_detail,
Patrick Williamsc124f4f2015-09-15 14:41:29 -050052 name='package_built_detail'),
53 url(r'^build/(?P<build_id>\d+)/package_built_dependencies/(?P<package_id>\d+)$',
Brad Bishopd7bf8c12018-02-25 22:55:05 -050054 views.package_built_dependencies, name='package_built_dependencies'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050055 url(r'^build/(?P<build_id>\d+)/package_included_detail/(?P<target_id>\d+)/(?P<package_id>\d+)$',
Brad Bishopd7bf8c12018-02-25 22:55:05 -050056 views.package_included_detail, name='package_included_detail'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050057 url(r'^build/(?P<build_id>\d+)/package_included_dependencies/(?P<target_id>\d+)/(?P<package_id>\d+)$',
Brad Bishopd7bf8c12018-02-25 22:55:05 -050058 views.package_included_dependencies, name='package_included_dependencies'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050059 url(r'^build/(?P<build_id>\d+)/package_included_reverse_dependencies/(?P<target_id>\d+)/(?P<package_id>\d+)$',
Brad Bishopd7bf8c12018-02-25 22:55:05 -050060 views.package_included_reverse_dependencies, name='package_included_reverse_dependencies'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050061
Patrick Williamsc0f7c042017-02-23 20:41:17 -060062 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)$',
63 buildtables.InstalledPackagesTable.as_view(
64 template_name="target.html"),
65 name='target'),
66
67
Brad Bishopd7bf8c12018-02-25 22:55:05 -050068 url(r'^dentries/build/(?P<build_id>\d+)/target/(?P<target_id>\d+)$', views.xhr_dirinfo, name='dirinfo_ajax'),
69 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo$', views.dirinfo, name='dirinfo'),
70 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo_filepath/_(?P<file_path>(?:/[^/\n]+)*)$', views.dirinfo, name='dirinfo_filepath'),
71 url(r'^build/(?P<build_id>\d+)/configuration$', views.configuration, name='configuration'),
72 url(r'^build/(?P<build_id>\d+)/configvars$', views.configvars, name='configvars'),
Patrick Williamsc0f7c042017-02-23 20:41:17 -060073 url(r'^build/(?P<build_id>\d+)/buildtime$',
74 buildtables.BuildTimeTable.as_view(
75 template_name="buildinfo-toastertable.html"),
76 name='buildtime'),
77
78 url(r'^build/(?P<build_id>\d+)/cputime$',
79 buildtables.BuildCPUTimeTable.as_view(
80 template_name="buildinfo-toastertable.html"),
81 name='cputime'),
82
83 url(r'^build/(?P<build_id>\d+)/diskio$',
84 buildtables.BuildIOTable.as_view(
85 template_name="buildinfo-toastertable.html"),
86 name='diskio'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050087
88 # image information dir
89 url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/packagefile/(?P<packagefile_id>\d+)$',
Brad Bishopd7bf8c12018-02-25 22:55:05 -050090 views.image_information_dir, name='image_information_dir'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050091
92 # build download artifact
Brad Bishopd7bf8c12018-02-25 22:55:05 -050093 url(r'^build/(?P<build_id>\d+)/artifact/(?P<artifact_type>\w+)/id/(?P<artifact_id>\w+)', views.build_artifact, name="build_artifact"),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050094
95 # project URLs
Brad Bishopd7bf8c12018-02-25 22:55:05 -050096 url(r'^newproject/$', views.newproject, name='newproject'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -050097
Patrick Williams169d7bc2024-01-05 11:33:25 -060098 url(r'^cmdline/$', views.CommandLineBuilds.as_view(), name='cmdlines'),
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050099 url(r'^projects/$',
100 tables.ProjectsTable.as_view(template_name="projects-toastertable.html"),
101 name='all-projects'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500102
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500103 url(r'^project/(?P<pid>\d+)/$', views.project, name='project'),
104 url(r'^project/(?P<pid>\d+)/configuration$', views.projectconf, name='projectconf'),
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500105 url(r'^project/(?P<pid>\d+)/builds/$',
106 tables.ProjectBuildsTable.as_view(template_name="projectbuilds-toastertable.html"),
107 name='projectbuilds'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500108
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800109 url(r'^newproject_specific/(?P<pid>\d+)/$', views.newproject_specific, name='newproject_specific'),
110 url(r'^project_specific/(?P<pid>\d+)/$', views.project_specific, name='project_specific'),
111 url(r'^landing_specific/(?P<pid>\d+)/$', views.landing_specific, name='landing_specific'),
112 url(r'^landing_specific_cancel/(?P<pid>\d+)/$', views.landing_specific_cancel, name='landing_specific_cancel'),
113
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500114 # the import layer is a project-specific functionality;
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500115 url(r'^project/(?P<pid>\d+)/importlayer$', views.importlayer, name='importlayer'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500116
117 # the table pages that have been converted to ToasterTable widget
118 url(r'^project/(?P<pid>\d+)/machines/$',
119 tables.MachinesTable.as_view(template_name="generic-toastertable-page.html"),
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500120 name="projectmachines"),
121
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500122 url(r'^project/(?P<pid>\d+)/softwarerecipes/$',
123 tables.SoftwareRecipesTable.as_view(template_name="generic-toastertable-page.html"),
124 name="projectsoftwarerecipes"),
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500125
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500126 url(r'^project/(?P<pid>\d+)/images/$',
127 tables.ImageRecipesTable.as_view(template_name="generic-toastertable-page.html"), name="projectimagerecipes"),
128
129 url(r'^project/(?P<pid>\d+)/customimages/$',
130 tables.CustomImagesTable.as_view(template_name="generic-toastertable-page.html"), name="projectcustomimages"),
131
132 url(r'^project/(?P<pid>\d+)/newcustomimage/$',
133 tables.NewCustomImagesTable.as_view(template_name="newcustomimage.html"),
134 name="newcustomimage"),
135
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500136 url(r'^project/(?P<pid>\d+)/layers/$',
137 tables.LayersTable.as_view(template_name="generic-toastertable-page.html"),
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500138 name="projectlayers"),
139
140 url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)$',
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500141 views.layerdetails, name='layerdetails'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500142
143 url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)/recipes/$',
144 tables.LayerRecipesTable.as_view(template_name="generic-toastertable-page.html"),
145 { 'table_name': tables.LayerRecipesTable.__name__.lower(),
146 'title' : 'All recipes in layer' },
147 name=tables.LayerRecipesTable.__name__.lower()),
148
149 url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)/machines/$',
150 tables.LayerMachinesTable.as_view(template_name="generic-toastertable-page.html"),
151 { 'table_name': tables.LayerMachinesTable.__name__.lower(),
152 'title' : 'All machines in layer' },
153 name=tables.LayerMachinesTable.__name__.lower()),
154
155
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500156 url(r'^project/(?P<pid>\d+)/distros/$',
157 tables.DistrosTable.as_view(template_name="generic-toastertable-page.html"),
158 name="projectdistros"),
159
160
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500161 url(r'^project/(?P<pid>\d+)/customrecipe/(?P<custrecipeid>\d+)/selectpackages/$',
162 tables.SelectPackagesTable.as_view(), name="recipeselectpackages"),
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500163
164
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500165 url(r'^project/(?P<pid>\d+)/customrecipe/(?P<custrecipeid>\d+)$',
166 tables.SelectPackagesTable.as_view(template_name="customrecipe.html"),
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500167 name="customrecipe"),
168
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500169 url(r'^project/(?P<pid>\d+)/customrecipe/(?P<recipe_id>\d+)/download$',
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500170 views.customrecipe_download,
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500171 name="customrecipedownload"),
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500172
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500173 url(r'^project/(?P<pid>\d+)/recipe/(?P<recipe_id>\d+)$',
174 tables.PackagesTable.as_view(template_name="recipedetails.html"),
175 name="recipedetails"),
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500176
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500177 # typeahead api end points
178 url(r'^xhr_typeahead/(?P<pid>\d+)/layers$',
179 typeaheads.LayersTypeAhead.as_view(), name='xhr_layerstypeahead'),
180 url(r'^xhr_typeahead/(?P<pid>\d+)/machines$',
181 typeaheads.MachinesTypeAhead.as_view(), name='xhr_machinestypeahead'),
182 url(r'^xhr_typeahead/(?P<pid>\d+)/recipes$',
183 typeaheads.RecipesTypeAhead.as_view(), name='xhr_recipestypeahead'),
184 url(r'^xhr_typeahead/projects$',
185 typeaheads.ProjectsTypeAhead.as_view(), name='xhr_projectstypeahead'),
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500186 url(r'^xhr_typeahead/gitrev$',
187 typeaheads.GitRevisionTypeAhead.as_view(),
188 name='xhr_gitrevtypeahead'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500189
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500190 url(r'^xhr_typeahead/(?P<pid>\d+)/distros$',
191 typeaheads.DistrosTypeAhead.as_view(), name='xhr_distrostypeahead'),
192
193 url(r'^xhr_testreleasechange/(?P<pid>\d+)$', views.xhr_testreleasechange,
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500194 name='xhr_testreleasechange'),
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500195 url(r'^xhr_configvaredit/(?P<pid>\d+)$', views.xhr_configvaredit,
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500196 name='xhr_configvaredit'),
197
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600198 url(r'^xhr_layer/(?P<pid>\d+)/(?P<layerversion_id>\d+)$',
199 api.XhrLayer.as_view(),
200 name='xhr_layer'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500201
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500202 url(r'^xhr_layer/(?P<pid>\d+)$',
203 api.XhrLayer.as_view(),
204 name='xhr_layer'),
205
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500206 # JS Unit tests
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500207 url(r'^js-unit-tests/$', views.jsunittests, name='js-unit-tests'),
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500208
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500209 # image customisation functionality
Patrick Williams169d7bc2024-01-05 11:33:25 -0600210 url(r'^xhr_customrecipe/(?P<recipe_id>\d+)/packages/(?P<package_id>\d+|)$',
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600211 api.XhrCustomRecipePackages.as_view(),
212 name='xhr_customrecipe_packages'),
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500213
214 url(r'^xhr_customrecipe/(?P<recipe_id>\d+)/packages/$',
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600215 api.XhrCustomRecipePackages.as_view(),
216 name='xhr_customrecipe_packages'),
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500217
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600218 url(r'^xhr_customrecipe/(?P<recipe_id>\d+)$',
219 api.XhrCustomRecipeId.as_view(),
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500220 name='xhr_customrecipe_id'),
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600221
222 url(r'^xhr_customrecipe/',
223 api.XhrCustomRecipe.as_view(),
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500224 name='xhr_customrecipe'),
225
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500226 url(r'^xhr_buildrequest/project/(?P<pid>\d+)$',
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600227 api.XhrBuildRequest.as_view(),
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500228 name='xhr_buildrequest'),
229
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800230 url(r'^xhr_projectupdate/project/(?P<pid>\d+)$',
231 api.XhrProjectUpdate.as_view(),
232 name='xhr_projectupdate'),
233
234 url(r'^xhr_setdefaultimage/project/(?P<pid>\d+)$',
235 api.XhrSetDefaultImageUrl.as_view(),
236 name='xhr_setdefaultimage'),
237
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600238 url(r'xhr_project/(?P<project_id>\d+)$',
239 api.XhrProject.as_view(),
240 name='xhr_project'),
241
242 url(r'xhr_build/(?P<build_id>\d+)$',
243 api.XhrBuild.as_view(),
244 name='xhr_build'),
245
246 url(r'^mostrecentbuilds$', widgets.MostRecentBuildsView.as_view(),
247 name='most_recent_builds'),
248
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500249 # JSON data for aggregators
250 url(r'^api/builds$', views.json_builds, name='json_builds'),
251 url(r'^api/building$', views.json_building, name='json_building'),
252 url(r'^api/build/(?P<build_id>\d+)$', views.json_build, name='json_build'),
253
254 # default redirection
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500255 url(r'^$', RedirectView.as_view(url='landing', permanent=True)),
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500256]