Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing tech preview of the new AWX UI #13660

Merged
merged 20 commits into from
Mar 21, 2023
Merged

Conversation

TheRealHaoLiu
Copy link
Member

@TheRealHaoLiu TheRealHaoLiu commented Mar 8, 2023

SUMMARY
  • Makefile file and make targets for pulling in and build new UI from https://github.com/ansible/ansible-ui
  • Add banner switch between old UI and new UI
  • Add new setting UI_NEXT to enable/disable new UI
  • Add new config to display the setting for UI_NEXT (for non-admin)
  • Add new path /ui_next to access the new UI
ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API
  • UI
  • Other
AWX VERSION
awx: 21.13.1.dev30+ge18a755f6b
TEST SCENARIOS

Test environment: fedora 37 VM setup using https://github.com/TheRealHaoLiu/fedora-setup/tree/main
docker-compose related tests:
🟢 able to start API server without building ui or ui-next in docker-compose development environment (verify via access to /api/v2/ping)
🟢 able to build ui and ui-next on machine directly (verified via make ui-devel && make ui-next)
🟢 able to build ui and ui-next in docker-compose development environment (ui-next src from git)
🟢 after building ui without building ui-next with settings.UI_NEXT enabled verified that the placehold index page show up (telling people that UI_NEXT was not built yet)
🟢 after building ui and ui-next collectstatic is able to collect the static files successfully and ui show up

kube build related tests:
🟢 able to build awx with make awx-kube-build and old and new UI appears successfully (with spud logo)
🟢 CI feature branch built image function as expected with both old and new UI appear successfully (with spud logo)

release build related tests:
🟢 moc stage job was able to successfully build and push the moc release image https://github.com/ansible/awx/actions/runs/4443351332/jobs/7800534464
🟢 deployment using the image generated by stage CI job produced image is successful both old and new ui function (with AWX logo)

Function related tests:
🟢 /ui_next show 404 when settings.UI_NEXT = False
🟢 banner on old UI for switching to new UI does not appear when settings.UI_NEXT = False
🟢 banner on old UI for switching to new UI appear for normal user when settings.UI_NEXT = True

awx/main/conf.py Outdated Show resolved Hide resolved
Copy link
Member

@fosterseth fosterseth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pulled it down and tested out the instructions in the readme. Was able to build new UI successfully, navigate to new UI, and tested out the banner functionality to flip between old and new UI

Co-Authored-By: kialam <2293210+kialam@users.noreply.github.com>
@TheRealHaoLiu TheRealHaoLiu force-pushed the feature_ui-next branch 4 times, most recently from 89c8c60 to a3f4916 Compare March 17, 2023 03:33
TheRealHaoLiu and others added 6 commits March 16, 2023 23:34
- Add new makefile for building ui_next
- Add setting to toggle ui_next
- Add URL path for displaying ui_next
- Update collectstatic and template dir config to serve ui_next
- Add ui_next to /api/v2/config
- enable banner to show up for normal user since /api/v2/settings is only available to admin users
@john-westcott-iv
Copy link
Member

In the blue banner in UI Next it references Ansible Automation Platform should that be changed to AWX for community stuff?

@john-westcott-iv
Copy link
Member

john-westcott-iv commented Mar 17, 2023

I had awx running and then did make ui-next and ended up with a blank screen until I redid make docker-compose-build && make docker-compose. Is that expected? I'm thinking yes because the index file was there to serve the HTML but collectstatic needs to be re-run to pickup all of the additional files. If thats accurate can we add it to whatever build documentation we are going to (hopefully) add?

Makefile Show resolved Hide resolved
awx/ui_next/Makefile Show resolved Hide resolved
awx/ui_next/Makefile Show resolved Hide resolved
awx/ui_next/Makefile Show resolved Hide resolved
- move placeholder index_awx.html out of ui_next build dir
- copy index_awx.html to build dir during development bootstrap if UI_NEXT has not been build
- they were all PHONY to start with and also all target are written to be rerun able
@TheRealHaoLiu TheRealHaoLiu marked this pull request as ready for review March 20, 2023 18:12
@TheRealHaoLiu TheRealHaoLiu changed the title [WIP] Introducing the new AWX UI Introducing the new AWX UI Mar 20, 2023
@kialam
Copy link
Member

kialam commented Mar 20, 2023

In the blue banner in UI Next it references Ansible Automation Platform should that be changed to AWX for community stuff?

Yes, those changes have already been made.

@kialam
Copy link
Member

kialam commented Mar 20, 2023

When you turn on/off the setting in the UI settings page and then go back to the dashboard view the message does not toggle until you do a full reload of the page. Is there a way to have it re-check if the header should be on/off on a dashboard load?

It would require another API call to get /config in order to refresh the banner. The banner doesn't auto update unless a refresh is called for now, but can revisit this.

@cypress
Copy link

cypress bot commented Mar 21, 2023

9 failed tests on run #14699 ↗︎

9 123 13 0 Flakiness 0

Details:

Add note to indicate ui-next is imported target
Project: AWX - Functional Commit: b89dcaeb8d
Status: Failed Duration: 09:51 💡
Started: Mar 21, 2023 4:46 PM Ended: Mar 21, 2023 5:56 PM
Failed  components/ace-editor.cy.js • 1 failed test

View Output Video

Test Artifacts
Visual Testing - AceEditor JSON Formatting > Verify that JSON is formatted properly with whitespace regardless of entry format Output Screenshots Video
Failed  components/modals.cy.js • 1 failed test

View Output Video

Test Artifacts
Visual Testing - Add/Delete Modals > delete modal is displayed correctly with dependency warning Output Screenshots Video
Failed  screens/dashboard/dashboard.cy.js • 1 failed test

View Output Video

Test Artifacts
Dashboard > Recent Dashboard Jobs Output Screenshots Video
Failed  screens/execution-environments/execution-environment.cy.js • 1 failed test

View Output Video

Test Artifacts
Execution Environment - List, details and edit > EE list, details and edit Output Screenshots Video
Failed  screens/inventories/smart-inventory.cy.js • 1 failed test

View Output Video

Test Artifacts
Smart Inventories > Smart Inventory add form Output Screenshots Video

The first 5 failed specs are shown, see all 9 specs in Cypress Cloud.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

.gitignore Outdated
@@ -157,7 +157,11 @@ use_dev_supervisor.txt
*.unison.tmp
*.#
/awx/ui/.ui-built
/awx/ui_next/.ui-built
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line that file is no longer needed

@TheRealHaoLiu TheRealHaoLiu changed the title Introducing the new AWX UI Introducing tech preview of the new AWX UI Mar 21, 2023
@TheRealHaoLiu TheRealHaoLiu merged commit 6908f41 into devel Mar 21, 2023
@TheRealHaoLiu TheRealHaoLiu deleted the feature_ui-next branch March 21, 2023 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants