diff options
author | Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> | 2024-08-22 19:48:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-22 19:48:56 +0200 |
commit | 78f345c48694628d36b62728512898f326b6c9f4 (patch) | |
tree | 9def676edb9468ae3250fe34e255352e3a769c23 /tools | |
parent | fix: avoid calling undefined method for anonymous users (#15440) (diff) | |
download | awx-78f345c48694628d36b62728512898f326b6c9f4.tar.xz awx-78f345c48694628d36b62728512898f326b6c9f4.zip |
Remove old UI (#15414)
* Remove source code for old UI
* Rename ui-next to ui
* Remove license scan for javascript dependencies
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ansible/roles/dockerfile/templates/Dockerfile.j2 | 6 | ||||
-rw-r--r-- | tools/docker-compose/README.md | 6 | ||||
-rwxr-xr-x | tools/docker-compose/bootstrap_development.sh | 8 | ||||
-rw-r--r-- | tools/docker-compose/docs/data_migration.md | 12 | ||||
-rw-r--r-- | tools/scripts/l18n/post_translation.sh | 7 | ||||
-rw-r--r-- | tools/scripts/l18n/pre_translation.sh | 2 |
6 files changed, 18 insertions, 23 deletions
diff --git a/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 b/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 index b8a626be0e..237082db73 100644 --- a/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 +++ b/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 @@ -6,14 +6,14 @@ {% if not headless|bool %} # UI_next build contaienr -FROM quay.io/centos/centos:stream9 AS ui-next-builder +FROM quay.io/centos/centos:stream9 AS ui-builder USER root RUN dnf -y update && dnf install -y nodejs make git RUN npm install -g n && n 18 COPY . /tmp/src/ WORKDIR /tmp/src/ -RUN make ui-next +RUN make ui {% endif %} # Build container @@ -94,7 +94,7 @@ COPY . /tmp/src/ WORKDIR /tmp/src/ {% if not headless|bool %} -COPY --from=ui-next-builder /tmp/src/awx/ui_next/build /tmp/src/awx/ui_next/build +COPY --from=ui-builder /tmp/src/awx/ui/build /tmp/src/awx/ui/build {% endif %} RUN make sdist && /var/lib/awx/venv/awx/bin/pip install dist/awx.tar.gz diff --git a/tools/docker-compose/README.md b/tools/docker-compose/README.md index 1d3e5f410e..34db342021 100644 --- a/tools/docker-compose/README.md +++ b/tools/docker-compose/README.md @@ -217,12 +217,12 @@ Required versions listed here https://github.com/ansible/ansible-ui/blob/main/RE On your local machine (not in awx container) ```bash -make clean/ui-next ui-next +make clean/ui ui ``` -This will clone the ansible-ui into the `awx/ui_next/src` directory and build the static files. Then when the containers come up, awx-manage collectstatic will copy those files into the proper place. +This will clone the ansible-ui into the `awx/ui/src` directory and build the static files. Then when the containers come up, awx-manage collectstatic will copy those files into the proper place. -You can also use `UI_NEXT_LOCAL` to build from a locally cloned ansible-ui repo. +You can also use `UI_LOCAL` to build from a locally cloned ansible-ui repo. See [the ui development documentation](https://github.com/ansible/ansible-ui/blob/main/CONTRIBUTING.md) for more information on using the frontend development, build, and test tooling. diff --git a/tools/docker-compose/bootstrap_development.sh b/tools/docker-compose/bootstrap_development.sh index eff6b3a590..aa9016b4dc 100755 --- a/tools/docker-compose/bootstrap_development.sh +++ b/tools/docker-compose/bootstrap_development.sh @@ -24,10 +24,10 @@ else fi -# Make sure that the UI_NEXT statifc file directory exists, if UI_NEXT is not built yet put a placeholder file in it. -if [ ! -d "/awx_devel/awx/ui_next/build/awx" ]; then - mkdir -p /awx_devel/awx/ui_next/build/awx - cp /awx_devel/awx/ui_next/placeholder_index_awx.html /awx_devel/awx/ui_next/build/awx/index_awx.html +# Make sure that the UI statifc file directory exists, if UI is not built yet put a placeholder file in it. +if [ ! -d "/awx_devel/awx/ui/build/awx" ]; then + mkdir -p /awx_devel/awx/ui/build/awx + cp /awx_devel/awx/ui/placeholder_index_awx.html /awx_devel/awx/ui/build/awx/index_awx.html fi if output=$(awx-manage createsuperuser --noinput --username=admin --email=admin@localhost 2> /dev/null); then diff --git a/tools/docker-compose/docs/data_migration.md b/tools/docker-compose/docs/data_migration.md index 67fc7070b4..f65adfdb68 100644 --- a/tools/docker-compose/docs/data_migration.md +++ b/tools/docker-compose/docs/data_migration.md @@ -1,15 +1,15 @@ # Migrating Data from Local Docker -If you are migrating data from a Local Docker installation (17.0.1 and prior) to AWX 18.0 or higher, you can -migrate your data to the development environment via the migrate.yml playbook. +If you are migrating data from a Local Docker installation (17.0.1 and prior) to AWX 18.0 or higher, you can +migrate your data to the development environment via the migrate.yml playbook. > Note: This will also convert your postgresql bind-mount into a docker volume. ### Migrate data with migrate.yml -First, in the [`inventory` file](../inventory), set your `pg_password`, `broadcast_websocket_secret`, `secret_key`, and any other settings you need for your deployment. **Make sure you use the same values from the `inventory` file in your existing pre-18.0.0 Docker deployment.** +First, in the [`inventory` file](../inventory), set your `pg_password`, `broadcast_websocket_secret`, `secret_key`, and any other settings you need for your deployment. **Make sure you use the same values from the `inventory` file in your existing pre-18.0.0 Docker deployment.** -If you used a custom pgdocker or awxcompose location, you will need to set the `postgres_data_dir` and `old_docker_compose_dir` variables. +If you used a custom pgdocker or awxcompose location, you will need to set the `postgres_data_dir` and `old_docker_compose_dir` variables. 1. Run the [migrate playbook](../ansible/migrate.yml) to migrate your data to the new postgresql container and convert the data directory to a volume mount. ```bash @@ -20,9 +20,9 @@ $ ansible-playbook -i tools/docker-compose/inventory tools/docker-compose/ansib ```bash $ make docker-compose-build $ make docker-compose -$ docker exec tools_awx_1 make clean-ui ui-devel +$ make ui ``` -3. After ensuring your data has been successfully migrated, you may delete your old data directory (typically stored at `~/.awx/pgdocker`). +3. After ensuring your data has been successfully migrated, you may delete your old data directory (typically stored at `~/.awx/pgdocker`). 4. Note that after migration, the development environment will be available at https://localhost:8043/ (not http://localhost). diff --git a/tools/scripts/l18n/post_translation.sh b/tools/scripts/l18n/post_translation.sh index 3a0af9c8bf..1173f7f264 100644 --- a/tools/scripts/l18n/post_translation.sh +++ b/tools/scripts/l18n/post_translation.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Rename the zh_cn folder +# Rename the zh_cn folder mv translations/zh_cn translations/zh # Create a directory for api (locale) @@ -34,15 +34,12 @@ for d in */ ; do rm $dir/django.po done -cd .. +cd .. awx_api_path="awx/locale" # locale will be dropped here -awx_ui_path="awx/ui/src/locales" # locales will be dropped here rsync -av locale/ $awx_api_path -rsync -av locales/ $awx_ui_path rm -rf translations/ rm -rf locale/ rm -rf locales/ - diff --git a/tools/scripts/l18n/pre_translation.sh b/tools/scripts/l18n/pre_translation.sh index 706f24401d..1c300d9948 100644 --- a/tools/scripts/l18n/pre_translation.sh +++ b/tools/scripts/l18n/pre_translation.sh @@ -6,5 +6,3 @@ docker-compose -f tools/docker-compose/_sources/docker-compose.yml run awx_1 mak # Move extracted Strings to Translation Directory mv awx/locale/en-us/LC_MESSAGES/django.po translations/ -mv awx/ui/src/locales/en/messages.po translations/ - |