diff --git a/.gitignore b/.gitignore index 6231ea4071..d2766fcca1 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,5 @@ use_dev_supervisor.txt /_build/ /_build_kube_dev/ /Dockerfile.kube-dev + +awx/ui-next/ansible-ui diff --git a/Makefile b/Makefile index 896dcf2c6c..e1ff8f0e70 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +include awx/ui-next/Makefile + PYTHON ?= python3.9 OFFICIAL ?= no NODE ?= node @@ -540,7 +542,7 @@ docker-compose-container-group-clean: rm -rf tools/docker-compose-minikube/_sources/ ## Base development image build -docker-compose-build: +docker-compose-build: ansible-playbook tools/ansible/dockerfile.yml -e build_dev=True -e receptor_image=$(RECEPTOR_IMAGE) DOCKER_BUILDKIT=1 docker build -t $(DEVEL_IMAGE_NAME) \ --build-arg BUILDKIT_INLINE_CACHE=1 \ diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 4d18540bcd..968a2e39bf 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -83,7 +83,11 @@ USE_L10N = True USE_TZ = True -STATICFILES_DIRS = [os.path.join(BASE_DIR, 'ui', 'build', 'static'), os.path.join(BASE_DIR, 'static')] +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, 'ui', 'build', 'static'), + os.path.join(BASE_DIR, 'ui-next', 'ansible-ui', 'build'), + os.path.join(BASE_DIR, 'static'), +] # Absolute filesystem path to the directory where static file are collected via # the collectstatic command. @@ -290,7 +294,12 @@ 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'), + os.path.join(BASE_DIR, 'ui', 'build'), + os.path.join(BASE_DIR, 'ui', 'public'), + os.path.join(BASE_DIR, 'ui-next', 'ansible-ui', 'build', 'controller'), + ], }, ] diff --git a/awx/ui-next/README.md b/awx/ui-next/README.md new file mode 100644 index 0000000000..a238700135 --- /dev/null +++ b/awx/ui-next/README.md @@ -0,0 +1,12 @@ + + +``` +git clone git@github.com:ansible/ansible-ui.git +``` + +``` +pushd ansible-ui +npm run build:controller +popd +``` + diff --git a/awx/ui-next/urls.py b/awx/ui-next/urls.py new file mode 100644 index 0000000000..1d5a93b8ec --- /dev/null +++ b/awx/ui-next/urls.py @@ -0,0 +1,28 @@ +from django.urls import re_path +from django.utils.translation import gettext_lazy as _ +from django.views.generic.base import TemplateView + +from awx.main.utils.licensing import server_product_name + + +class IndexView(TemplateView): + template_name = 'index_controller.html' + + +class MigrationsNotran(TemplateView): + template_name = 'installing.html' + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + product_name = server_product_name() + context['title'] = _('%s Upgrading' % product_name) + context['image_alt'] = _('Logo') + context['aria_spinner'] = _('Loading') + context['message_upgrade'] = _('%s is currently upgrading.' % product_name) + context['message_refresh'] = _('This page will refresh when complete.') + return context + + +app_name = 'ui-next' + +urlpatterns = [re_path(r'^$', IndexView.as_view(), name='index'), re_path(r'^migrations_notran/$', MigrationsNotran.as_view(), name='migrations_notran')] diff --git a/awx/urls.py b/awx/urls.py index c99eda011c..339a7e9641 100644 --- a/awx/urls.py +++ b/awx/urls.py @@ -9,6 +9,8 @@ from awx.main.views import handle_400, handle_403, handle_404, handle_500, handl urlpatterns = [ re_path(r'', include('awx.ui.urls', namespace='ui')), + re_path(r'^controller/', include('awx.ui-next.urls', namespace='controller')), + # re_path(r'^ui-next/', include('awx.ui-next.urls', namespace='ui-next')), re_path(r'^api/', include('awx.api.urls', namespace='api')), re_path(r'^sso/', include('awx.sso.urls', namespace='sso')), re_path(r'^sso/', include('social_django.urls', namespace='social')),