From 68f56570aee8abdaa6d39e119bc05f3c69e82202 Mon Sep 17 00:00:00 2001 From: Kia Lam Date: Thu, 2 Feb 2023 11:14:39 -0800 Subject: [PATCH] Django changes to serve ansible-ui. --- awx/settings/defaults.py | 2 +- awx/ui/urls.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index e0d95adb5d..686142297f 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -290,7 +290,7 @@ TEMPLATES = [ ], 'builtins': ['awx.main.templatetags.swagger'], }, - 'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'ui', 'build'), os.path.join(BASE_DIR, 'ui', 'public')], + 'DIRS': [os.path.join(BASE_DIR, 'templates'), '/var/lib/awx/public/static/controller/', os.path.join(BASE_DIR, 'ui', 'build'), os.path.join(BASE_DIR, 'ui', 'public')], }, ] diff --git a/awx/ui/urls.py b/awx/ui/urls.py index 6661fee280..12c2bf8439 100644 --- a/awx/ui/urls.py +++ b/awx/ui/urls.py @@ -9,6 +9,10 @@ class IndexView(TemplateView): template_name = 'index.html' +class ControllerView(TemplateView): + + template_name = 'index_controller.html' + class MigrationsNotran(TemplateView): @@ -27,4 +31,4 @@ class MigrationsNotran(TemplateView): app_name = 'ui' -urlpatterns = [re_path(r'^$', IndexView.as_view(), name='index'), re_path(r'^migrations_notran/$', MigrationsNotran.as_view(), name='migrations_notran')] +urlpatterns = [re_path(r'^$', IndexView.as_view(), name='index'), re_path(r'^controller/.*$', ControllerView.as_view(), name='index'), re_path(r'^migrations_notran/$', MigrationsNotran.as_view(), name='migrations_notran')]