# How do I add a settings toggle option to AWX UI?

**URL:** <https://forum.ansible.com/t/how-do-i-add-a-settings-toggle-option-to-awx-ui/5025>\
**Category:** Get Help\
**Tags:** awx\
**Created:** [April 18, 2024, 5:13pm UTC](https://forum.ansible.com/t/how-do-i-add-a-settings-toggle-option-to-awx-ui/5025 "2024-04-18T17:13:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [April 18, 2024, 5:13pm UTC](https://forum.ansible.com/t/how-do-i-add-a-settings-toggle-option-to-awx-ui/5025/1 "2024-04-18T17:13:42Z")

</div>

**How do I add customization settings to AWX UI?**

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/2/2f97ff4ae12e1307b8a226845c2aea0ab47115f3.png)

I want to add a toggleable boolean option to the MiscSystem page. I’ve added everything I _think_ I need to my own awx fork and have deployed it with the custom setting configured in the operator and _functionally_ my code works, but the setting doesn’t appear in the UI.

Using `ACTIVITY_STREAM_ENABLED` as a reference, I’ve added the custom setting to the following files:

- ./awx/main/conf.py
- ./awx/settings/defaults.py
- ./awx/ui/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.js
- ./awx/ui/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.test.js
- ./awx/ui/src/screens/Setting/MiscSystem/MiscSystemEdit/MiscSystemEdit.js
- ./awx/ui/src/screens/Setting/MiscSystem/MiscSystemEdit/MiscSystemEdit.test.js
- ./awx/ui/src/screens/Setting/shared/data.allSettingOptions.json
- ./awx/ui/src/screens/Setting/shared/data.allSettings.json

But the setting doesn’t appear in the UI. I _do_ know that a new UI setting would need to be added to the awx frontend in ansible-ui, but that should only affect UI-Next right? As seen in the screenshot, I don’t have the preview enabled right now.

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [April 19, 2024, 8:01am UTC](https://forum.ansible.com/t/how-do-i-add-a-settings-toggle-option-to-awx-ui/5025/2 "2024-04-19T08:01:15Z")

</div>

How did you build customized image to include modified ui?  
The file `awx/ui/.ui-built` have to be removed (by hand or `make clean-ui`) before any build command with `make` to trigger rebuilding ui.

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [April 19, 2024, 1:20pm UTC](https://forum.ansible.com/t/how-do-i-add-a-settings-toggle-option-to-awx-ui/5025/3 "2024-04-19T13:20:36Z")

</div>

I’m building [https://github.com/Denney-tech/awx/tree/custom](https://github.com/Denney-tech/awx/tree/custom) from source in a dockerfile on OpenShift using the [Dockerfile.j2](https://github.com/ansible/awx/blob/devel/tools/ansible/roles/dockerfile/templates/Dockerfile.j2) as a reference, and there is no `./awx/ui/.ui-built` file in the source prior to starting the build.

Does `make requirements_awx` and `make sdist` not make both UI and UI-Next? UI is the old UI that we normally see, and UI-Next is the optional preview of the new [ansible-ui](https://github.com/ansible/ansible-ui/tree/main/frontend/awx)? For now, I just wanted to modify UI and worry about UI-Next later.

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [April 19, 2024, 5:53pm UTC](https://forum.ansible.com/t/how-do-i-add-a-settings-toggle-option-to-awx-ui/5025/4 "2024-04-19T17:53:10Z")

</div>

@kurokobo Well now it shows up. Maybe it needed to do something on the backend or I needed to clear browser cache?

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/5/51e038e1c33ca0f8c294c4c554576a5e08d6f1d4.png)

It resolved itself somehow because I definitely was using the latest image I had built. 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [May 19, 2024, 5:53pm UTC](https://forum.ansible.com/t/how-do-i-add-a-settings-toggle-option-to-awx-ui/5025/5 "2024-05-19T17:53:36Z")

</div>

Closed on May 19, 2024, 5:53pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
