diff --git a/awx/ui/src/components/PromptDetail/PromptInventorySourceDetail.js b/awx/ui/src/components/PromptDetail/PromptInventorySourceDetail.js index 7c3443895e..97a1f79843 100644 --- a/awx/ui/src/components/PromptDetail/PromptInventorySourceDetail.js +++ b/awx/ui/src/components/PromptDetail/PromptInventorySourceDetail.js @@ -29,17 +29,11 @@ function PromptInventorySourceDetail({ resource }) { summary_fields, update_cache_timeout, update_on_launch, - update_on_project_update, verbosity, } = resource; let optionsList = ''; - if ( - overwrite || - overwrite_vars || - update_on_launch || - update_on_project_update - ) { + if (overwrite || overwrite_vars || update_on_launch) { optionsList = ( {overwrite && ( @@ -57,11 +51,6 @@ function PromptInventorySourceDetail({ resource }) { {t`Update on launch`} )} - {update_on_project_update && ( - - {t`Update on project update`} - - )} ); } diff --git a/awx/ui/src/components/PromptDetail/PromptInventorySourceDetail.test.js b/awx/ui/src/components/PromptDetail/PromptInventorySourceDetail.test.js index a14a499fd5..5af509b295 100644 --- a/awx/ui/src/components/PromptDetail/PromptInventorySourceDetail.test.js +++ b/awx/ui/src/components/PromptDetail/PromptInventorySourceDetail.test.js @@ -67,7 +67,6 @@ describe('PromptInventorySourceDetail', () => { ,
  • Overwrite local variables from remote inventory source
  • ,
  • Update on launch
  • , -
  • Update on project update
  • , ]) ).toEqual(true); }); diff --git a/awx/ui/src/components/PromptDetail/data.inventory_source.json b/awx/ui/src/components/PromptDetail/data.inventory_source.json index 2b70f4b196..57a0d750c6 100644 --- a/awx/ui/src/components/PromptDetail/data.inventory_source.json +++ b/awx/ui/src/components/PromptDetail/data.inventory_source.json @@ -112,7 +112,6 @@ "update_on_launch":true, "update_cache_timeout":2, "source_project":8, - "update_on_project_update":true, "last_update_failed": true, "last_updated":null } \ No newline at end of file diff --git a/awx/ui/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.test.js b/awx/ui/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.test.js index ca33d1a171..bfc572a4e8 100644 --- a/awx/ui/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.test.js +++ b/awx/ui/src/screens/Inventory/InventorySourceAdd/InventorySourceAdd.test.js @@ -31,7 +31,6 @@ describe('', () => { source_vars: '---↵', update_cache_timeout: 0, update_on_launch: false, - update_on_project_update: false, verbosity: 1, }; diff --git a/awx/ui/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.js b/awx/ui/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.js index db5a8008f3..8f6b79b8cf 100644 --- a/awx/ui/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.js +++ b/awx/ui/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.js @@ -49,7 +49,6 @@ function InventorySourceDetail({ inventorySource }) { source_vars, update_cache_timeout, update_on_launch, - update_on_project_update, verbosity, enabled_var, enabled_value, @@ -113,12 +112,7 @@ function InventorySourceDetail({ inventorySource }) { ); let optionsList = ''; - if ( - overwrite || - overwrite_vars || - update_on_launch || - update_on_project_update - ) { + if (overwrite || overwrite_vars || update_on_launch) { optionsList = ( {overwrite && ( @@ -143,16 +137,6 @@ function InventorySourceDetail({ inventorySource }) { /> )} - {update_on_project_update && ( - - {t`Update on project update`} - - - )} ); } diff --git a/awx/ui/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.test.js b/awx/ui/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.test.js index 1bf4518861..f6ec896094 100644 --- a/awx/ui/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.test.js +++ b/awx/ui/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.test.js @@ -113,7 +113,6 @@ describe('InventorySourceDetail', () => { 'Overwrite local groups and hosts from remote inventory source', 'Overwrite local variables from remote inventory source', 'Update on launch', - 'Update on project update', ]).toContain(option.text()); }); }); diff --git a/awx/ui/src/screens/Inventory/InventorySourceEdit/InventorySourceEdit.test.js b/awx/ui/src/screens/Inventory/InventorySourceEdit/InventorySourceEdit.test.js index 023c1b7697..dd3c2de968 100644 --- a/awx/ui/src/screens/Inventory/InventorySourceEdit/InventorySourceEdit.test.js +++ b/awx/ui/src/screens/Inventory/InventorySourceEdit/InventorySourceEdit.test.js @@ -31,7 +31,6 @@ describe('', () => { source_vars: '---↵', update_cache_timeout: 0, update_on_launch: false, - update_on_project_update: false, verbosity: 1, }; const mockInventory = { diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceForm.js b/awx/ui/src/screens/Inventory/shared/InventorySourceForm.js index c786222f7c..7131ed16bf 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceForm.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceForm.js @@ -73,7 +73,6 @@ const InventorySourceFormFields = ({ source_vars: '---\n', update_cache_timeout: 0, update_on_launch: false, - update_on_project_update: false, verbosity: 1, enabled_var: '', enabled_value: '', @@ -251,7 +250,6 @@ const InventorySourceForm = ({ source_vars: source?.source_vars || '---\n', update_cache_timeout: source?.update_cache_timeout || 0, update_on_launch: source?.update_on_launch || false, - update_on_project_update: source?.update_on_project_update || false, verbosity: source?.verbosity || 1, enabled_var: source?.enabled_var || '', enabled_value: source?.enabled_value || '', diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/AzureSubForm.test.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/AzureSubForm.test.js index 7ca359a174..9e120dae7e 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/AzureSubForm.test.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/AzureSubForm.test.js @@ -17,7 +17,6 @@ const initialValues = { source_vars: '---\n', update_cache_timeout: 0, update_on_launch: true, - update_on_project_update: false, verbosity: 1, }; diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/ControllerSubForm.test.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/ControllerSubForm.test.js index 9c7aff20a6..3d52a277b0 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/ControllerSubForm.test.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/ControllerSubForm.test.js @@ -17,7 +17,6 @@ const initialValues = { source_vars: '---\n', update_cache_timeout: 0, update_on_launch: true, - update_on_project_update: false, verbosity: 1, }; diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/EC2SubForm.test.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/EC2SubForm.test.js index 21fc0861af..113f75e022 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/EC2SubForm.test.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/EC2SubForm.test.js @@ -17,7 +17,6 @@ const initialValues = { source_vars: '---\n', update_cache_timeout: 0, update_on_launch: true, - update_on_project_update: false, verbosity: 1, }; diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/GCESubForm.test.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/GCESubForm.test.js index bfbd902313..2427215cf5 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/GCESubForm.test.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/GCESubForm.test.js @@ -17,7 +17,6 @@ const initialValues = { source_vars: '---\n', update_cache_timeout: 0, update_on_launch: true, - update_on_project_update: false, verbosity: 1, }; diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/InsightsSubForm.test.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/InsightsSubForm.test.js index 8cedb7e1da..3b2dd1e741 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/InsightsSubForm.test.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/InsightsSubForm.test.js @@ -17,7 +17,6 @@ const initialValues = { source_vars: '---\n', update_cache_timeout: 0, update_on_launch: true, - update_on_project_update: false, verbosity: 1, }; diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/OpenStackSubForm.test.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/OpenStackSubForm.test.js index 0eaa47d1dd..d5f9675f03 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/OpenStackSubForm.test.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/OpenStackSubForm.test.js @@ -17,7 +17,6 @@ const initialValues = { source_vars: '---\n', update_cache_timeout: 0, update_on_launch: true, - update_on_project_update: false, verbosity: 1, }; diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.test.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.test.js index 8598bf11bf..ab40c9a6f5 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.test.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SCMSubForm.test.js @@ -17,7 +17,6 @@ const initialValues = { source_vars: '---\n', update_cache_timeout: 0, update_on_launch: true, - update_on_project_update: false, verbosity: 1, }; @@ -121,7 +120,6 @@ describe('', () => { source_vars: '---\n', update_cache_timeout: 0, update_on_launch: true, - update_on_project_update: false, verbosity: 1, }; let customWrapper; @@ -139,63 +137,4 @@ describe('', () => { customWrapper.update(); expect(customWrapper.find('Select').prop('selections')).toBe('newPath'); }); - test('Update on project update should be disabled', async () => { - const customInitialValues = { - credential: { id: 1, name: 'Credential' }, - custom_virtualenv: '', - overwrite: false, - overwrite_vars: false, - source_path: '/path', - source_project: { id: 1, name: 'Source project' }, - source_script: null, - source_vars: '---\n', - update_cache_timeout: 0, - update_on_launch: true, - update_on_project_update: false, - verbosity: 1, - }; - let customWrapper; - await act(async () => { - customWrapper = mountWithContexts( - - - - ); - }); - expect( - customWrapper - .find('Checkbox[aria-label="Update on project update"]') - .prop('isDisabled') - ).toBe(true); - }); - - test('Update on launch should be disabled', async () => { - const customInitialValues = { - credential: { id: 1, name: 'Credential' }, - custom_virtualenv: '', - overwrite: false, - overwrite_vars: false, - source_path: '/path', - source_project: { id: 1, name: 'Source project' }, - source_script: null, - source_vars: '---\n', - update_cache_timeout: 0, - update_on_launch: false, - update_on_project_update: true, - verbosity: 1, - }; - let customWrapper; - await act(async () => { - customWrapper = mountWithContexts( - - - - ); - }); - expect( - customWrapper - .find('Checkbox[aria-label="Update on launch"]') - .prop('isDisabled') - ).toBe(true); - }); }); diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SatelliteSubForm.test.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SatelliteSubForm.test.js index e00b981c9e..fe92158028 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SatelliteSubForm.test.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SatelliteSubForm.test.js @@ -17,7 +17,6 @@ const initialValues = { source_vars: '---\n', update_cache_timeout: 0, update_on_launch: true, - update_on_project_update: false, verbosity: 1, }; diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SharedFields.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SharedFields.js index 447349c795..94304cdb8b 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SharedFields.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/SharedFields.js @@ -53,11 +53,10 @@ export const VerbosityField = () => { ); }; -export const OptionsField = ({ showProjectUpdate = false }) => { +export const OptionsField = () => { const [updateOnLaunchField] = useField('update_on_launch'); const [, , updateCacheTimeoutHelper] = useField('update_cache_timeout'); const [projectField] = useField('source_project'); - const [updatedOnProjectUpdateField] = useField('update_on_project_update'); useEffect(() => { if (!updateOnLaunchField.value) { @@ -83,23 +82,11 @@ export const OptionsField = ({ showProjectUpdate = false }) => { tooltip={helpText.subFormOptions.overwriteVariables} /> - {showProjectUpdate && ( - - )} diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VMwareSubForm.test.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VMwareSubForm.test.js index 670d48857c..f9c4bb4cce 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VMwareSubForm.test.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VMwareSubForm.test.js @@ -17,7 +17,6 @@ const initialValues = { source_vars: '---\n', update_cache_timeout: 0, update_on_launch: true, - update_on_project_update: false, verbosity: 1, }; diff --git a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VirtualizationSubForm.test.js b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VirtualizationSubForm.test.js index 693b7aea23..6b289600a9 100644 --- a/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VirtualizationSubForm.test.js +++ b/awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VirtualizationSubForm.test.js @@ -17,7 +17,6 @@ const initialValues = { source_vars: '---\n', update_cache_timeout: 0, update_on_launch: true, - update_on_project_update: false, verbosity: 1, }; diff --git a/awx/ui/src/screens/Inventory/shared/data.inventory_source.json b/awx/ui/src/screens/Inventory/shared/data.inventory_source.json index a1eeaf270c..7c829c56b7 100644 --- a/awx/ui/src/screens/Inventory/shared/data.inventory_source.json +++ b/awx/ui/src/screens/Inventory/shared/data.inventory_source.json @@ -115,7 +115,6 @@ "update_on_launch":true, "update_cache_timeout":2, "source_project":8, - "update_on_project_update":true, "last_update_failed": true, "last_updated":null, "execution_environment": 1