29516 Commits

Author SHA1 Message Date
Alex Corey
8fe437380d converts inventory groups related groups and related hosts to tables 2021-05-06 16:32:12 -04:00
softwarefactory-project-zuul[bot]
2d81143c98
Merge pull request #10066 from tiagodread/ouia-ids
Add testability for e2e tests

Resolves #9511
Resolves #9503
Resolves #9512

Reviewed-by: Kersom <None>
2021-05-06 20:15:49 +00:00
softwarefactory-project-zuul[bot]
a219e27e0b
Merge pull request #10116 from nixocio/ui_issue_9126
Update Login page

Update Login page.

See: #9126

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-05-06 20:15:45 +00:00
Tiago
d428a540a0 ouiaId to AddDropDownButton ToolbarAddButton TemplateList InventoryList
add testability to DataListToolbar.jsx

add testability to AssociateModal.jsx HostGroupsList.jsx

fix lint

add ouiaId to InventoryGroupHostList.jsx

add ouiaId to ExecutionEnvironmentList.jsx

add ouiaId to InstanceGroupList.jsx

add ouiaId to InstanceGroupDetails.jsx

add ouiaId to ScheduleList.jsx and ContainerGroupDetails.jsx
2021-05-06 16:29:52 -03:00
softwarefactory-project-zuul[bot]
1d6579e110
Merge pull request #10106 from rooftopcellist/compose-opts-order
Docker-compose requires the options to be passed before up

SUMMARY
The $(COMPOSE_UP_OPTS) in the docker-compose make target need to come before the up command or else they are not parsed correctly.
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME


API

AWX VERSION

19.0.0

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
2021-05-05 19:20:34 +00:00
nixocio
c50bd8d6e6 Update Login page
Update Login page.

See: https://github.com/ansible/awx/issues/9126
2021-05-05 14:10:28 -04:00
softwarefactory-project-zuul[bot]
13e1fc9839
Merge pull request #10100 from Spredzy/rename-job
Rename awx to automation for pod names

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-05-05 12:28:50 +00:00
Christian M. Adams
a205ddeed6
Docker-compose requires the options to be passed before up 2021-05-04 16:54:16 -04:00
softwarefactory-project-zuul[bot]
d7742d7340
Merge pull request #10044 from AlexSCorey/9977-ScheduleSurvey
Properly adds survey default values on Schedules

SUMMARY
This addresses #9977. This also fixes a bug where the extra_data was not rendering properly in schedule details
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

Reviewed-by: Kersom <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-05-04 19:43:18 +00:00
softwarefactory-project-zuul[bot]
ce675319b7
Merge pull request #10105 from nixocio/ui_update_date_tooltip
Make date consistent on tooltip display

Make date consistent on tooltip to display info about job.
There are 3 places that define similar function on the code basis. Make
them consistent in how to display date.
Search for generateLastJobTooltip on code basis.

Reviewed-by: Keith Grant <keithjgrant@gmail.com>
2021-05-04 19:19:21 +00:00
Alex Corey
610138caeb Properly adds survey default values on Schedules 2021-05-04 14:56:19 -04:00
softwarefactory-project-zuul[bot]
25137b40d3
Merge pull request #10040 from keithjgrant/6189-misc-tables
Convert Inventory sub-lists to tables

SUMMARY
Converts Inventory Access, Hosts, Groups, and Sources lists to tables
Addresses #6189
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

UI

Reviewed-by: Kersom <None>
Reviewed-by: Marliana Lara <marliana.lara@gmail.com>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-05-04 18:40:53 +00:00
nixocio
5b92c9e8f3 Make date consistent on tooltip display
Make date consistent on tooltip to display info about job.
There are 3 places that define similar function on the code basis. Make
them consistent in how to display date.
2021-05-04 13:51:08 -04:00
Tiago
7951c2f014 change testability locator 2021-05-04 14:26:55 -03:00
Tiago
2cfdf08500 add testability 2021-05-04 14:00:24 -03:00
softwarefactory-project-zuul[bot]
10474cd64c
Merge pull request #10077 from sean-m-sullivan/job_launch_tags
Fix tower_job_launch tags being passed to API

SUMMARY
#10008
Fix tower_job_launch tags being passed to API
Previously the wrong field was being used on the api to pass tags, also while the module accepts lists, the API does not, so it would error. Take a users list, and converts to comma separated string, in order to maintain status quo.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

awx_collection

AWX VERSION
19.1.0

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Rebeccah Hunter <rhunter@redhat.com>
Reviewed-by: Alan Rominger <arominge@redhat.com>
2021-05-04 16:13:16 +00:00
softwarefactory-project-zuul[bot]
da9a075000
Merge pull request #10047 from sean-m-sullivan/org_label
add org search to labels

SUMMARY
After having an issue with labels I saw that orgs were referenced, Remembering #7567 implemented the code to do the search for orgs so you can search for labels within an org, Tests include creating the same named label in two orgs, and the search not erroring out that it found two labels of that name.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

awx_collection

AWX VERSION
19.0.0

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Rebeccah Hunter <rhunter@redhat.com>
2021-05-04 15:55:51 +00:00
Tiago
510a546d8c add testability 2021-05-04 11:00:48 -03:00
Yanis Guenane
562f78e53d Rename awx to automation for pod names 2021-05-04 14:17:45 +02:00
softwarefactory-project-zuul[bot]
e08590290c
Merge pull request #10094 from jladdjr/awx_8853_add_notification_error_to_nt_listview
add notification error to notification template list view

In support of #8853
Updates /api/v2/notification_templates to include the error field for summary_fields -> recent_notifications

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
2021-05-04 04:21:52 +00:00
Keith J. Grant
e2c8519b77 convert InventoryHostGroups list to table 2021-05-03 16:00:09 -07:00
softwarefactory-project-zuul[bot]
86b683a8f1
Merge pull request #10096 from shanemcd/devel
Fix CSP error on Safari

This was causing:
[Error] Refused to execute a script because its hash, its nonce, or
'unsafe-inline' does not appear in the script-src directive of the Content
Security Policy. (migrations_notran, line 16)

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-05-03 21:46:04 +00:00
Shane McDonald
1ad561c307
Fix CSP error on Safari
This was causing:

```
[Error] Refused to execute a script because its hash, its nonce, or
'unsafe-inline' does not appear in the script-src directive of the Content
Security Policy. (migrations_notran, line 16)
```
2021-05-03 17:12:30 -04:00
Keith Grant
7b60733da0 delete comment
Co-authored-by: Marliana Lara <marliana.lara@gmail.com>
2021-05-03 13:53:57 -07:00
Keith Grant
d7ce328046 fix id string
Co-authored-by: Marliana Lara <marliana.lara@gmail.com>
2021-05-03 13:53:57 -07:00
Keith J. Grant
25a4a112b3 remove unecessary i18n wrappers; fix HostToggle tooltip 2021-05-03 13:53:57 -07:00
Keith J. Grant
cbe2a78287 convert inventory source list to tables 2021-05-03 13:53:57 -07:00
Keith J. Grant
83ceacf588 convert inventory groups list to tables 2021-05-03 13:53:57 -07:00
Keith J. Grant
fe0ad30245 fix inventory access/hosts lists tests 2021-05-03 13:53:57 -07:00
Keith J. Grant
0ac6ba9c99 convert inventory access/hosts lists to tables 2021-05-03 13:53:57 -07:00
softwarefactory-project-zuul[bot]
f8ecdbf287
Merge pull request #10056 from keithjgrant/6189-user-sublist-tables
Convert user sub-lists to tables

SUMMARY
Converts User Organizations, Teams, and Roles lists to tables
Addresses #6189
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

UI

Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-05-03 20:20:11 +00:00
Jim Ladd
a6f3817488 verify notification errors included in NT list view 2021-05-03 13:17:34 -07:00
Jim Ladd
e4eb03259b include error field in notification template's list of recent notifs 2021-05-03 13:17:34 -07:00
softwarefactory-project-zuul[bot]
0ccc93a166
Merge pull request #10089 from jbradberry/fix-get-default-ee
Fix projects to use the utility function get_default_execution_environment

SUMMARY


ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME


API

AWX VERSION



ADDITIONAL INFORMATION

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-05-03 19:47:53 +00:00
Keith J. Grant
2672c2ffe3 add default ouia-id to paginated tables 2021-05-03 12:04:33 -07:00
Jeff Bradberry
204083fcdc Fix projects to use the utility function get_default_execution_environment 2021-05-03 14:00:19 -04:00
Keith J. Grant
b21db2fd31 fix user list sorting issues; clean up comments 2021-05-03 10:57:17 -07:00
Keith J. Grant
d1cb0781ce update tests for new user sub-list tables 2021-05-03 10:57:17 -07:00
Keith J. Grant
7c86edd825 convert user sub-lists to tables 2021-05-03 10:57:17 -07:00
softwarefactory-project-zuul[bot]
3addbeab4c
Merge pull request #10085 from jbradberry/fix-check-migrations
Make the check_migrations command a direct alias of makemigration

SUMMARY
Make the check_migrations command a direct alias of makemigration.
It already more or less was, but it previously did some machinations
around copying and modifying the database settings.  These on-the-fly
changes to the database connection no longer work after the
rearrangement of settings files, so let's just get rid of it.
Example, from running make test:
  py3: commands succeeded
  congratulations :)
awx-manage check_migrations --dry-run --check  -n 'missing_migration_file'
Traceback (most recent call last):
  File "/var/lib/awx/venv/awx/lib64/python3.8/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection
    self.connect()
  File "/var/lib/awx/venv/awx/lib64/python3.8/site-packages/django/db/backends/base/base.py", line 195, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/var/lib/awx/venv/awx/lib64/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 194, in get_new_connection
    conn = Database.connect(**conn_params)
sqlite3.OperationalError: unable to open database file

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

API

AWX VERSION
awx: 19.1.0

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-05-03 15:45:40 +00:00
softwarefactory-project-zuul[bot]
5096f1459d
Merge pull request #10059 from AlexSCorey/RemoveI18nStuff
Removes remaining I18n props, HOCs and misc objects

SUMMARY
This Removes withI18n, the i18n object and all the places that it is passed around as a prop, or argument.
E2E Tests have been triggered.  There should be no functional or visual impact. E2E results
ISSUE TYPE
-Dependency Upgrade
COMPONENT NAME

UI

AWX VERSION



ADDITIONAL INFORMATION

Reviewed-by: Kersom <None>
Reviewed-by: Keith Grant <keithjgrant@gmail.com>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-05-03 15:24:50 +00:00
softwarefactory-project-zuul[bot]
a3de251732
Merge pull request #10084 from jbradberry/revert-managed-by-tower-ee-lock
Revert the code that prevents sysadmins from changing managed EEs

SUMMARY
related #10078
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

API

AWX VERSION
awx: 19.1.0

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-05-03 15:13:09 +00:00
Jeff Bradberry
686d750ad9 Make the check_migrations command a direct alias of makemigration
It already more or less was, but it previously did some machinations
around copying and modifying the database settings.  These on-the-fly
changes to the database connection no longer work after the
rearrangement of settings files, so let's just get rid of it.
2021-05-03 11:01:52 -04:00
Jeff Bradberry
39f26fe576 Revert the code that prevents sysadmins from changing managed EEs
ref #10078
2021-05-03 10:25:18 -04:00
Alex Corey
7a9bcc1e1e Removes remaining I18n props, HOCs and mics objects 2021-05-03 10:10:40 -04:00
softwarefactory-project-zuul[bot]
72a940bef1
Merge pull request #10081 from nixocio/ui_fix_style_warning
Fix unit-test styling warning

Fix unit-test styling warning.
      Warning: Unsupported style property white-space. Did you mean
      whiteSpace?

Style still valid after change:

Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
2021-05-03 13:54:14 +00:00
softwarefactory-project-zuul[bot]
cb26087c2a
Merge pull request #9931 from seiwailai/issue-9872-sync-feedback
project: Add last job status as for project sync feedback feature.

SUMMARY
Fixes #9872

Add last job status as for the project sync feedback feature. When users clicked the sync button on the project page, last job status will eventually update the status to Pending, Waiting, Running, and final result (Successful, Cancelled, Failed, Error). The implementation requires the WebSocket connection to ensure synchronous status update.
In particular, the last job status is similar to the functionality of status in the project list (status in ProjectListItem.jsx). More specifically, the last job status accompanied by a job link that allowing the user to navigate to the job output page. Besides, there is also the tooltip that allowing the user to view the information related to the most recent sync, covering information like JOB ID, STATUS, FINISHED.
The rationale of having the last job status instead of redirection or toast notification is that:

User has choices on whether to redirect to the job output. If the user wishes to navigate to job output, he/she can click the link. Besides, the user might have other projects to be synced right after the current project and he/she may want to proceed back to the project list page instead of the job output page. If we implement force redirection, it would take a longer time to navigate to the project list page.
The status update on last job status is fundamentally similar to toast notification where the user can immediately be notified if he/she already clicked the sync button to launch the job.

Nevertheless, this PR requires further discussion. Any comments are welcomed!

ISSUE TYPE


Feature Pull Request

COMPONENT NAME


UI


awx/ui_next/src/screens/Project/Project.jsx
awx/ui_next/src/screens/Project/useWsProject.js - Added websocket implementation
awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.jsx

AWX VERSION

awx: 19.0.0

ADDITIONAL INFORMATION

In case if users spam the sync button, we will need to ensure the fluent UI on the most recent sync tooltip and last job status. Thus, we would not want to update our last job status to Pending if there is a current running job.
For instance, we clicked sync for a particular project twice.

For the first sync, our last job status should immediately change to Pending, then Waiting, then Running, then result (which are Successful, Failed, Error, Cancelled).
For the second sync, if we have a running job, we should not update our UI to Pending, otherwise our most recent sync tooltip UI will lose our current running job and we cannot navigate to the job link through the link provided by last job status tooltip.

Issue of sync button click spam
Ideally, we should prevent any spamming on the sync button using backend logic to reduce overload on the server as we already have a similar running project. Together with backend logic, we can disable the sync button right after we start to sync a project.
However, if we only disable sync through the frontend, this seems insecure as people with bad intentions might able to change the button disable attribute.

After

Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Sei Wai Lai <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-05-03 13:28:40 +00:00
softwarefactory-project-zuul[bot]
7d6a8adb79
Merge pull request #10067 from mabashian/test-warning-cleanup-3
Unit test warning cleanup

SUMMARY
These commits target the warnings that look like:
Can't perform a React state update on an unmounted component
The underlying problem here is that we have network requests that are being made by components that are subsequently being unmounted.  When the network request resolves, we attempt to update some state but the component is no longer mounted and the warning is triggered.  To address this I consolidated a lot of isMounted code into a single hook which can be used across the app to check to see whether the component in question is still mounted before attempting to update state inside of a useEffect.  This primarily applies to network requests.
I think this points to a larger issue which is that we sometimes mount components prematurely.  For example, when the job template edit component is mounted we actually mount:

JobTemplateForm (briefly)
ContentLoading
JobTemplateForm

Network requests triggered by the first mount of JobTemplateForm are suscepitble to attempting to update state on an unmounted component.  I believe this pattern exists in many places across the app but I haven't tried to solve this in this PR.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

Reviewed-by: Marliana Lara <marliana.lara@gmail.com>
Reviewed-by: Kersom <None>
2021-05-03 13:22:35 +00:00
nixocio
c1e0def013 Fix unit-test styling warning
Fix unit-test styling warning.

```console.error
      Warning: Unsupported style property white-space. Did you mean
      whiteSpace?
```
2021-05-03 09:22:18 -04:00
sean-m-ssullivan
5993db76d3 fix job launch inputs 2021-05-01 23:08:44 -05:00