29777 Commits

Author SHA1 Message Date
softwarefactory-project-zuul[bot]
d360fb212e
Merge pull request #10258 from kdelee/ee_singular_awx_cli
allow singular execution_environment for cli

this makes "execution_environments" or "execution_environment" work
which is helpful
Now these both work:
awx execution_environments create --name foobar --image quay.io/ansible/awx-ee:latest

awx execution_environment create --name foobar1 --image quay.io/ansible/awx-ee:latest

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Jeff Bradberry <None>
2021-06-03 14:11:27 +00:00
softwarefactory-project-zuul[bot]
a0b14b994d
Merge pull request #8763 from wenottingham/licenses-to-kill
Restore UI license checker

27219d3 removed the license checker for UI dependencies as part of removing the UI. We actually still need it, just pointed at the new UI.
This brings it back, and updates it to do so. It also removes no longer needed license files.
It doesn't pass yet, as I haven't added licenses for the new UI dependencies in this PR. Hi @jakemcdermott.

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-06-02 23:48:52 +00:00
softwarefactory-project-zuul[bot]
168c022d3e
Merge pull request #10329 from keithjgrant/6853-select-all-quirks
Clear list selections on pagination/search/sort

SUMMARY
Updates nearly every list* so that URL param changes (pagination, search, or sort) clear the selection. This prevents the list of selected items in state from including items that may no longer appear on screen — preventing the user from accidentally deleting or otherwise altering an item they may not realize they still have selected.
This also updates the useSelected hook to provide selectAll and clearSelected functions. Any lists that weren't yet already using this hook have been updated to do so.
Addresses #6853 and #7509
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

ADDITIONAL INFORMATION
*Lists that do not include this change are modals where the user is expected to paginate through screens and make several selections along the way (e.g. Multi Credential select modal), and lists that still use PaginatedDataList and are yet to be converted to PaginatedTable
Note: I originally wanted to make the clearSelected prop on PaginatedTable required, so any lists that don't have this fix applied would fail loudly. Unfortunately that wasn't possible, as there were a few lists that should not have this behavior, so I had to leave it as an optional prop.

Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-06-02 23:11:41 +00:00
Shane McDonald
5adfacba64
Merge pull request #10321 from kdelee/management_cmd_ee_creds
Create default EE in seperate awx-managment cmd
2021-06-02 18:37:52 -04:00
Shane McDonald
52eeace20f
Register default EEs when booting dev env 2021-06-02 18:19:41 -04:00
Keith J. Grant
21ff1d714d add useSelected tests for new functions 2021-06-02 14:48:53 -07:00
Keith J. Grant
eeca5512be update remaining lists to clear selection on pagination/search/sort 2021-06-02 14:41:20 -07:00
Keith J. Grant
143a4a61b3 clear list selection on navigate (first batch) 2021-06-02 14:41:20 -07:00
softwarefactory-project-zuul[bot]
fef24355ab
Merge pull request #9908 from marshmalien/session-work
Add Session context and redirects

SUMMARY
Issues:
#8272 #9197 #8155 #9311

When user is logged out due to inactivity, redirect to the Login Page with a warning alert stating that their session expired.
When a user logs in on one tab, redirect from login page to home on the other tabs.
Clear session state when it expires and/or when a user logs out.
Redirect users to direct link destination after authentication

@AlexSCorey is looking at possibly rolling #9915 (SSO login redirect override URL is not working) into this PR
ISSUE TYPE


Feature Pull Request

COMPONENT NAME


UI

Reviewed-by: Kersom <None>
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Keith Grant <keithjgrant@gmail.com>
Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Marliana Lara <marliana.lara@gmail.com>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-06-02 21:17:47 +00:00
softwarefactory-project-zuul[bot]
d70dfec6b6
Merge pull request #10215 from keithjgrant/9218-sort-in-modal
fix namespaced url params

SUMMARY
Fixes issues when multiple lists are on the page (generally only occurs now when on a list page with an open modal that contains a second list) — Navigating within the modal list currently wipes out URL parameters for the main list, causing the page to reload, which closes the modal. The fix prevents changes to one set of namespaced URL parameters from wiping out URL parameters from another namespace

Refactors query string utils to consolidate a lot of repeated logic from components into a new util, updateQueryString. Use this function to modify query string parameters while maintaining params for multiple namespaces at the same time.
QS utils that are no longer needed have been deleted: replaceParams and encodeNonDefaultQueryString

Addresses #10181 and #9218
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

Reviewed-by: Keith Grant <keithjgrant@gmail.com>
Reviewed-by: John Mitchell <None>
Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
2021-06-02 21:01:49 +00:00
softwarefactory-project-zuul[bot]
49eccfb19f
Merge pull request #10335 from mabashian/10129-multi-choice-survey
Properly validate multiple choice survey questions

SUMMARY
link #10129
In action:

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

Reviewed-by: Kersom <None>
2021-06-02 20:41:20 +00:00
Shane McDonald
223c5bdaf6
Tweaks to register_default_execution_environments command
- The credential will always be updated. I dont think we want to decrypt the password here for comparison
- Preserve newlines in help text
2021-06-02 16:26:58 -04:00
Elijah DeLee
e740cfcb52 revert change to serializer and use get_or_create
still need to fix up the handling of the verify-ssl bool, since
it is not being respected
2021-06-02 16:16:36 -04:00
softwarefactory-project-zuul[bot]
65b03174ea
Merge pull request #10304 from akus062381/add-ouia-to-yaml-jason-buttons
Adds ouiaId to YAML and JSON buttons in Variables Detail

small change to add a better locator to these buttons. if we do not do this, our locators for our visual tests are not good and will eventually break tests

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-06-02 19:51:31 +00:00
mabashian
134d84ded9 Adds unique ouiaId to MultiButtonToggle 2021-06-02 14:48:37 -04:00
akus062381
5707d65d0f fix 2021-06-02 14:48:10 -04:00
akus062381
9956538224 yay 2021-06-02 14:48:10 -04:00
Elijah DeLee
7818b2008f Allow modifications of managed_by_tower creds
Sysadmins may need to modify managed_by_tower credentials, the
only known case of which is a default container registry credential
for use by the default execution environments, which are also managed_by_tower
and allow modifications.
2021-06-02 13:05:02 -04:00
Elijah DeLee
043aff6a8c Create default EE in seperate awx-managment cmd
Create EE at a seperate time and also attach a registry credential if
auth information provided

This command can be run multiple times on the same instance and should be
idempotent.
2021-06-02 12:23:01 -04:00
softwarefactory-project-zuul[bot]
7725c6f18f
Merge pull request #10305 from jbradberry/resolve-workflow-ee
Include the EE set on a workflow template in the resolver hierarchy

SUMMARY
This step comes immediately after checking the actual job/template for
an explicitly set EE.
Note that now, because of how jobs are spawned off of workflow nodes,
the call to .resolve_execution_environment() no longer happens in
.create_unified_job().  The job instance within .create_unified_job()
doesn't yet have access to the node that it will be attached to,
making it impossible to use this information in the resolver if called
there.
related #9560
ISSUE TYPE


Feature Pull Request
Bugfix Pull Request

COMPONENT NAME

API

AWX VERSION

Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
2021-06-02 16:22:39 +00:00
mabashian
16a3f7c2df Properly validate multiple choice survey questions 2021-06-02 10:38:11 -04:00
softwarefactory-project-zuul[bot]
896d895934
Merge pull request #10326 from chrismeyersfsu/fix-iso_path_sharing
when sharing paths use little z

AWX_ISOLATION_SHOW_PATHS will be shared between containers. Strange
file not found error can crop up when concurrently accessing shared
directories between multiple containers that are bind mounted with big
Z. So make sure we use little z.

Fixes errors like below:
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/bin/git ls-remote file:///opt/tmpawx/at_DrunkMail525450112299457413919634186288881628802211907645041298254_test/ -h refs/heads/HEAD", "msg": "fatal: '/opt/tmpawx/at_DrunkMail525450112299457413919634186288881628802211907645041298254_test/' does not appear to be a git repository\\nfatal: Could not read from remote repository.\\n\\nPlease make sure you have the correct access rights\\nand the repository exists.", "rc": 128, "stderr": "fatal: '/opt/tmpawx/at_DrunkMail525450112299457413919634186288881628802211907645041298254_test/' does not appear to be a git repository\\nfatal: Could not read from remote repository.\\n\\nPlease make sure you have the correct access rights\\nand the repository exists.\\n", "stderr_lines": ["fatal: '/opt/tmpawx/at_DrunkMail525450112299457413919634186288881628802211907645041298254_test/' does not appear to be a git repository", "fatal: Could not read from remote repository.", "", "Please make sure you have the correct access rights", "and the repository exists."], "stdout": "", "stdout_lines": []}```

Reviewed-by: Shane McDonald <me@shanemcd.com>
19.2.0
2021-06-01 19:55:14 +00:00
Chris Meyers
067e6a5163 when sharing paths use little z
* AWX_ISOLATION_SHOW_PATHS will be shared between containers. Strange
file not found error can crop up when concurrently accessing shared
directories between multiple containers that are bind mounted with big
Z. So make sure we use little z.
2021-06-01 15:11:25 -04:00
Marliana Lara
92f567539f
Update .po strings 2021-06-01 14:43:11 -04:00
Marliana Lara
951f6d4636
Redirect user after authenticating through social auth 2021-06-01 13:28:33 -04:00
Marliana Lara
811fa514d2
Remove useMemo from session context 2021-06-01 13:28:33 -04:00
Marliana Lara
a097602d7f
Add Session context and redirect on auth 2021-06-01 13:28:29 -04:00
softwarefactory-project-zuul[bot]
a286324ab7
Merge pull request #10313 from YoungjuWang/patch-1
Update README.md

SUMMARY
Guide for running docker-compose with detached mode
ISSUE TYPE


Docs Pull Request

AWX VERSION

19.1.0

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-06-01 16:16:08 +00:00
Shane McDonald
64bd49da16
Delete dependabot.yml 2021-06-01 09:19:33 -04:00
softwarefactory-project-zuul[bot]
5622bf1a0a
Merge pull request #10260 from mabashian/8249-resource-name-launch
Adds resource name and description to launch and schedule prompt wizards

SUMMARY
link #8249
link #7254
Launch with description:

Launch without description:

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

UI

Reviewed-by: Keith Grant <keithjgrant@gmail.com>
Reviewed-by: Kersom <None>
Reviewed-by: Michael Abashian <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-06-01 13:14:37 +00:00
softwarefactory-project-zuul[bot]
862f40a643
Merge pull request #10320 from shanemcd/bump-19.2.0
Bump version and update for 19.2.0

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
2021-06-01 12:59:22 +00:00
softwarefactory-project-zuul[bot]
41e3a69001
Merge pull request #10225 from AlanCoding/deletions
Remove code and settings no longer used

Connect #8740

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-06-01 12:42:32 +00:00
Shane McDonald
cabc60792b
Bump version and update for 19.2.0 2021-06-01 08:18:21 -04:00
왕영주 (Youngju Wang)
eb305edafd
Update README.md
How to run docker-compose with '-d' option
2021-05-31 17:49:43 +09:00
Keith J. Grant
e6cfd726c6 don't reload host if query string changes 2021-05-27 13:22:47 -07:00
mabashian
ec78f5a9ec Add name/description to mock resources in tests 2021-05-27 16:18:03 -04:00
mabashian
d711a9aed3 Mark string for translation 2021-05-27 16:11:19 -04:00
mabashian
4836a5b1a9 Extract strings 2021-05-27 15:57:00 -04:00
softwarefactory-project-zuul[bot]
57b093aa2a
Merge pull request #10294 from kdelee/clarify_help_msg
clarify format of date for host_metric

SUMMARY


@amolgautam25 @AlanCoding let me know what you think -- I was taking a second look at the CLI and took me a bit to remember the format it wants is YYYY-MM-DD

Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: Amol Gautam <amol_gautam25@yahoo.co.in>
2021-05-27 19:26:48 +00:00
Jeff Bradberry
d3cc439fa8 Include the EE set on a workflow template in the resolver hierarchy
This step comes immediately after checking the actual job/template for
an explicitly set EE.

Note that now, because of how jobs are spawned off of workflow nodes,
the call to .resolve_execution_environment() no longer happens in
.create_unified_job().  The job instance within .create_unified_job()
doesn't yet have access to the node that it will be attached to,
making it impossible to use this information in the resolver if called
there.
2021-05-27 15:22:44 -04:00
softwarefactory-project-zuul[bot]
fabc67eeb3
Merge pull request #10279 from mabashian/8852-checkbox-list-item
Fixes bug where users were unable to click on text next to checkboxes/radios in modals

SUMMARY
link #8852
This should impact lists in modals where the user can select one or more of the rows.  They should now be able to click on the text/row in order to select.  Examples:

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

Reviewed-by: Kersom <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-05-27 19:06:50 +00:00
softwarefactory-project-zuul[bot]
c29a7ccf8b
Merge pull request #10102 from jbradberry/disable-local-users
Add the ability to disable local authentication

SUMMARY
When an external authentication system is enabled, users would like the ability to disable local authentication for enhanced security.
related #4553
TODO

 create a configure-Tower-in-Tower setting,  DISABLE_LOCAL_AUTH
 expose the setting in the settings UI
 be able to query out all local-only users

User.objects.filter(Q(profile__isnull=True) | Q(profile__ldap_dn=''), enterprise_auth__isnull=True, social_auth__isnull=True)
see: awx/main/utils/common.py, get_external_account


 write a thin wrapper around the Django model-based auth backend
 update the UI tests to include the new setting
 be able to trigger a side-effect when this setting changes
 revoke all OAuth2 tokens for users that do not have a remote
auth backend associated with them
 revoke sessions for local-only users

ultimately I did this by adding a new middleware that checks the value of this new setting and force-logouts any local-only user making a request after it is enabled


 settings API endpoint raises a validation error if there are no external users or auth sources configured

The remote user existence validation has been removed, since ultimately we can't know for sure if a sysadmin-level user will still have access to the UI.  This is being dealt with by using a confirmation modal, see below.


 add a modal asking the user to confirm that they want to turn this setting on

ISSUE TYPE


Feature Pull Request

COMPONENT NAME


API
UI

AWX VERSION

Reviewed-by: Jeff Bradberry <None>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Mat Wilson <mawilson@redhat.com>
Reviewed-by: Michael Abashian <None>
Reviewed-by: Chris Meyers <None>
2021-05-27 18:37:47 +00:00
mabashian
af162b6897 Use expandable section when description is longer than 512 characters to avoid making the wizard unusably long 2021-05-27 14:28:54 -04:00
softwarefactory-project-zuul[bot]
dd269804fd
Merge pull request #10234 from rooftopcellist/rm_eula_acceptance
Remove explicit eula acceptance

SUMMARY
Issue: ansible/tower#4948
This PR changes the entitlement process to no require explicit acceptance of the Eula, but still display it for the user to read.
ISSUE TYPE


Feature Pull Request

COMPONENT NAME


API
UI

AWX VERSION

19.1.0

ADDITIONAL INFO
If the eula_accepted field is passed, it will just be ignored.

Reviewed-by: Bill Nottingham <None>
2021-05-27 17:54:21 +00:00
mabashian
ad5cc3a393 Adds click event to table row to handle selecting/unselecting checkbox/radio 2021-05-27 12:23:03 -04:00
mabashian
4b4e57889e Remove unused disabled prop 2021-05-27 10:50:11 -04:00
mabashian
f4ba87ea4f Fixes bug where users were unable to click on text next to checkboxes in modals 2021-05-27 10:47:31 -04:00
mabashian
dc64da6f72 Adds resource name and description to launch and schedule prompt wizards 2021-05-27 10:45:38 -04:00
softwarefactory-project-zuul[bot]
4e129d3d04
Merge pull request #10295 from wenottingham/nope--not-there-anymore
Move irc references to point to irc.libera.chat

c.f. ansible-community/community-topics#19 (comment)

Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: Matthew Jones <bsdmatburt@gmail.com>
Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-05-27 13:59:06 +00:00
softwarefactory-project-zuul[bot]
7542ebda48
Merge pull request #10293 from tchellomello/awx-doc
Redirect documentation to awx-operator docs

SUMMARY
CC: @shanemcd
Related: ansible/awx-operator#330
The PR ansible/awx-operator#330 enhances the AWX installation process via the awx-operator.
This PR redirects the installation notes to the awx-operator page so we can simplify and easy maintain the docs in one place.
ISSUE TYPE


Docs Pull Request

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-05-27 13:59:01 +00:00