29259 Commits

Author SHA1 Message Date
softwarefactory-project-zuul[bot]
6fef4e1ab7
Merge pull request #9593 from keithjgrant/7506-yaml-json-eval-fix-2
Don't unnecessarily expand YAML expressions

SUMMARY
Prevents variables fields from expanding YAML expressions when possible:

In the detail view, the user may toggle to JSON (seeing the data structure fully expanded), but toggling back to YAML will continue to display the original un-expanded value with expressions intact
In edit mode, this works the same way, UNLESS the user edits the value while in JSON mode.

Addresses #7506
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

ADDITIONAL INFORMATION

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Chris Meyers <None>
2021-04-15 17:34:44 +00:00
softwarefactory-project-zuul[bot]
ad07d31b9a
Merge pull request #9219 from mazhead/devel
Adding the scm_track_submodules option for project

SUMMARY
Adding the scm_track_submodules option which should fix the related #7846
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

API
UI

AWX VERSION
awx: 17.0.1

ADDITIONAL INFORMATION
This option will add the track_submodules option which is described in the ansible git module: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/git_module.html

if yes, submodules will track the latest commit on their master branch (or other branch specified in .gitmodules). If no, submodules will be kept at the revision specified by the main project. This is equivalent to specifying the --remote flag to git submodule update.

Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: None <None>
Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
2021-04-15 17:28:41 +00:00
mazhead
5bb93e1f5d
Update SharedFields.jsx 2021-04-15 15:23:05 +02:00
Keith J. Grant
8f2ef6ce01 VariablesField: don't run Formik validation on mode change 2021-04-14 16:15:18 -07:00
softwarefactory-project-zuul[bot]
c633313152
Merge pull request #9903 from nixocio/ui_remove_not_used_code
Remove not used code

Remove not used code

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-04-14 16:35:08 +00:00
Keith J. Grant
637b540a4d fix button selection in VariablesField tests 2021-04-14 09:25:15 -07:00
Keith J. Grant
8dd4e68385 change CodeEditor onChange back to our debounce implementation 2021-04-14 09:25:15 -07:00
Keith J. Grant
dff3103d96 add more robust handling of JSON/YAML toggle to prevent expanding YAML expressions 2021-04-14 09:25:15 -07:00
Keith J. Grant
1bd71024e3 Don't unecessarily expand YAML expressions
If the user toggles a VariablesField to JSON then back to YAML without
editing the field content, revert to the initial YAML value to maintain
any shorthand expressions
2021-04-14 09:22:57 -07:00
Keith J. Grant
634c9892df VariablesDetail: don't evaluate YAML expressions 2021-04-14 09:13:53 -07:00
nixocio
7435458a7b Remove not used code
Remove not used code
2021-04-14 10:36:18 -04:00
softwarefactory-project-zuul[bot]
2ebd4c72c1
Merge pull request #9862 from jakemcdermott/remove-suppress
Use built-in suppress from contextlib

In python3, we use the built-in suppress from contextlib.

Reviewed-by: Ryan Petrello <None>
2021-04-14 12:35:39 +00:00
softwarefactory-project-zuul[bot]
6dd5fc937b
Merge pull request #9683 from rebeccahhh/devel
Pull with credentials from protected registries

SUMMARY

relates to #7066
if a credential is associated with an EE this will create a JSON authfile that is then passed with the pull request to the host of the registry

ISSUE TYPE


Feature Pull Request

COMPONENT NAME


API

AWX VERSION

awx: 18.0.0


TODOs

 Remove separate token field from the registry credential.
 Rename the existing password field to say "password/token"
 Ensure only registry credentials can be associated with an EE #9628
 Write out the auth.json file to the pdd_wrapper_ directory. #9683 (comment)
 Use secure permissions for auth.json #9683 (comment)

Reviewed-by: Ryan Petrello <None>
Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Rebeccah Hunter <rhunter@redhat.com>
Reviewed-by: Elijah DeLee <kdelee@redhat.com>
Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Nana  <natr@hey.com>
2021-04-13 20:09:52 +00:00
mazhead
83d340ab1f Updated migration + serializers as suggested
Signed-off-by: mazhead <mazhead@gmail.com>
2021-04-13 21:39:24 +02:00
softwarefactory-project-zuul[bot]
b82318161c
Merge pull request #9890 from ryanpetrello/schedule-invalid-ujt
allow schedules to be disabled even if the associated UJT isn't valid

see: #8641

Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
Reviewed-by: Jeff Bradberry <None>
2021-04-13 17:20:51 +00:00
softwarefactory-project-zuul[bot]
cd372e4c74
Merge pull request #9889 from ryanpetrello/cors-allow-list
update django-cors-headers and switch to inclusive settings name

see: #9177

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
2021-04-13 16:38:15 +00:00
Rebeccah
0d2ab5f61e
add in OR to the UI label for editing a registry credential 2021-04-13 11:54:44 -04:00
Shane McDonald
4a62932ecd
Store auth.json is pdd_wrapper directory 2021-04-13 11:54:43 -04:00
Rebeccah
e61d0c5cb7
credential validation for execution envs to allow only registry credentials to be associated with them, also adding security precautions for authfile and password, also combined token & password into one term to align with Quay, and added handling to account for users not filling in credential data and add a has_inputs function to simplify checking if the host, username, and password are present in the credential 2021-04-13 11:54:33 -04:00
Rebeccah
7c57aebd46
if there is a credential associated with an EE, create a JSON structure and write it to a file, then use that file to pull from protected registries from quay and edit the credential type for registries so that they combine the password and token fields into one field 2021-04-13 11:50:29 -04:00
softwarefactory-project-zuul[bot]
98bb296c6a
Merge pull request #9874 from fosterseth/fix_a9769_ee_rbac_change_org
Prevent execution environment from being assigned to a new organization

SUMMARY

related #9769

ee organization can be changed to null (less restrictive)
if organization is null, cannot be assigned to org (more restrictive)
if org is assigned, it cannot be set to a different org


ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME


API

AWX VERSION

awx: 19.0.0

Reviewed-by: Kersom <None>
Reviewed-by: Chris Meyers <None>
Reviewed-by: Jeff Bradberry <None>
Reviewed-by: Seth Foster <None>
2021-04-13 15:24:44 +00:00
softwarefactory-project-zuul[bot]
e67923382a
Merge pull request #9892 from ryanpetrello/record-unit-id
record the receptor unit ID on the job record for debugging purposes

see: #8641

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-04-12 21:31:35 +00:00
softwarefactory-project-zuul[bot]
4de7cf0296
Merge pull request #9835 from ryanpetrello/saml-galaxy-cred
automatically setup default Galaxy credentials on SAML login

Reviewed-by: Chris Meyers <None>
2021-04-12 21:16:19 +00:00
Ryan Petrello
4db3c36ac3
record the receptor unit ID on the job record for debugging purposes
see: https://github.com/ansible/awx/issues/8641
2021-04-12 16:53:51 -04:00
softwarefactory-project-zuul[bot]
f5c00431bd
Merge pull request #7391 from xstasi/devel
Add tower group for collection modules

SUMMARY
It would be useful to be able to declare module defaults for all tower modules, which is accomplished with module groups.
See: https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html
This very simple PR adds the group definition

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
2021-04-12 20:53:02 +00:00
Ryan Petrello
b5f77bfe4c
allow schedules to be disabled even if the UJT isn't valid
see: https://github.com/ansible/awx/issues/8641
2021-04-12 16:01:52 -04:00
Ryan Petrello
f137ff7d43
update django-cors-headers and switch to inclusive settings name
see: https://github.com/ansible/awx/issues/9177
2021-04-12 15:14:27 -04:00
Jake McDermott
2c61e8f6de
Use built-in suppress from contextlib
In python3, we can use the built-in suppress from contextlib

https://docs.python.org/3/library/contextlib.html#contextlib.suppress
2021-04-12 14:47:50 -04:00
Seth Foster
1e4b44e54f
Prevent ee from being assigned to a new organization
- ee organization can be changed to null (less restrictive)
- if organization is null, cannot be assigned to org (more restrictive)
- if org is assigned, it cannot be set to a different org
2021-04-12 14:15:21 -04:00
softwarefactory-project-zuul[bot]
c72cc6486c
Merge pull request #9537 from AlexSCorey/lingUIUpdate
Updates Ling UI

SUMMARY
This PR updates Ling ui. One of the reasons for updating this dependency was that they were deprecating withI18n().  They changed their minds on that so we didn't need to urgently remove all those HOCs.  Thus, we can now make that conversion a bit slower a couple of files at a time.
One other thing:  When we are changing the string based on a count of an item (ie. Cancel Job vs. Cancel Jobs) we should use ling ui's <Plural> component. However, in order to show the update strings passed to that component the developer will have to run npm run extract-strings each time they are changed to render the updated strings properly. More info here.
ISSUE TYPE
-dependency  upgrade
COMPONENT NAME

UI

AWX VERSION
ADDITIONAL INFORMATION

Reviewed-by: Kersom <None>
Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Sergio Moreno <sergiomorenoalbert@gmail.com>
2021-04-12 17:57:27 +00:00
softwarefactory-project-zuul[bot]
9ee7281b0b
Merge pull request #9886 from ryanpetrello/autoflake
sprinkle back in some flake8 to catch missing imports

Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: Ryan Petrello <None>
2021-04-12 17:35:40 +00:00
mazhead
5f93ba7690
Update awx/ui_next/src/screens/Project/shared/ProjectSubForms/SharedFields.jsx
Accept suggestion

Co-authored-by: Shane McDonald <me@shanemcd.com>
2021-04-12 19:02:51 +02:00
Ryan Petrello
300f5a3a1f
use flake8 to lint for a few things black doesn't catch
black does *not* warn about missing or extraneous imports,
so let's bring back flake8 in our linting to check for them
2021-04-12 12:55:39 -04:00
mazhead
9f68ffc1cc Update default
Signed-off-by: mazhead <mazhead@gmail.com>
2021-04-12 18:27:16 +02:00
softwarefactory-project-zuul[bot]
ae1fd5a814
Merge pull request #9885 from beeankha/remove_old_tower_name_from_docs
Change Reference of 'ansible-tower-service' to 'automation-controller-service' in Docs File

Related to the work done in #9720

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-04-12 15:29:07 +00:00
mazhead
f1a987793c Black fix
Signed-off-by: mazhead <mazhead@gmail.com>
2021-04-12 16:58:28 +02:00
beeankha
7c13d749b1 Change 'ansible-tower-service' to 'automation-controller-service' 2021-04-12 10:56:55 -04:00
mazhead
d479237734 Fix merge issue
Signed-off-by: mazhead <mazhead@gmail.com>
2021-04-12 16:47:44 +02:00
softwarefactory-project-zuul[bot]
bdd41c70af
Merge pull request #9847 from fosterseth/fix_t4922_job_elapsed_time_incorrect
Fix elapsed time on job showing incorrect value

SUMMARY

Elapsed time would always stay at zero

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME


API

AWX VERSION

awx: 18.0.0

Reviewed-by: Seth Foster <None>
Reviewed-by: Ryan Petrello <None>
Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: Jeff Bradberry <None>
2021-04-12 14:35:04 +00:00
mazhead
c6eb7da68d Adding the scm_track_submodules option which should fix the https://github.com/ansible/awx/issues/7846
Signed-off-by: mazhead <mazhead@gmail.com>
2021-04-12 16:22:23 +02:00
softwarefactory-project-zuul[bot]
311c44341e
Merge pull request #9873 from wenottingham/not-any-more-they-arent
Update templates for installer changes

SUMMARY
Some of the options aren't valid any more.

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-04-09 22:20:47 +00:00
Bill Nottingham
d012362ade Update templates for installer changes 2021-04-09 17:42:42 -04:00
softwarefactory-project-zuul[bot]
ce2e41a6fa
Merge pull request #9858 from marshmalien/7662-expanded-template-list-item
Add missing template list expanded section details

SUMMARY
Issue: #7662

Add the following detail items:

Description
Organization and link to organization details
Credentials


Move Credential and Label details to the bottom of the expanded section and make them stretch the entire width of the row.


COMPONENT NAME


UI

Reviewed-by: Kersom <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-04-09 21:10:12 +00:00
Marliana Lara
62c91aea4a
Fix bug where falsy details return 0 2021-04-09 15:54:38 -04:00
softwarefactory-project-zuul[bot]
a0780aa287
Merge pull request #9586 from keithjgrant/8906-code-editor-validation-2
Add VariablesField YAML/JSON validation

SUMMARY
Validates YAML or JSON syntax in the variables field on blur. Prevents formik from submitting the form while this error is present.
addresses #8906, #8907
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

UI

ADDITIONAL INFORMATION

Reviewed-by: Kersom <None>
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-04-09 19:07:50 +00:00
Marliana Lara
0bc4702a26
Add execution environment detail to template expanded row 2021-04-09 14:40:59 -04:00
softwarefactory-project-zuul[bot]
6e46183ba6
Merge pull request #9814 from nixocio/ui_issue_9176
Do not validate optional survey

Do not validate optional survey.
See: #9176

Reviewed-by: Marliana Lara <marliana.lara@gmail.com>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-04-09 17:35:22 +00:00
softwarefactory-project-zuul[bot]
8a86867f69
Merge pull request #9861 from jakemcdermott/fix-9296
Fix non-translatable template string

SUMMARY
The template string for the trademark doesn't seem like it can be used for a valid translation key. This caused the raw variable to be displayed for production builds instead of a readable string.  see: #9296 (comment)
ADDITIONAL INFORMATION
Screenshots, after applying this patch:
development environment


production build

Reviewed-by: Kersom <None>
2021-04-09 16:53:36 +00:00
softwarefactory-project-zuul[bot]
c7a2a1b9f6
Merge pull request #9869 from jakemcdermott/fix-cred-validation-prop
Use validated prop in cred plugin field

SUMMARY
Fxes an initialization bug for cred plugin fields, introduced by this commit
This pr applies the patch described below:
cc @marshmalien @unlikelyzero

before


after

Reviewed-by: John Hill <johill@redhat.com>
2021-04-09 16:20:20 +00:00
Jake McDermott
4e75e9438e
Use validated prop in cred plugin field 2021-04-09 10:50:58 -04:00