mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Merge pull request #10590 from shanemcd/downstream-fixes
Downstream fixes Reviewed-by: Bianca Henderson <beeankha@gmail.com> Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
This commit is contained in:
commit
45a6d03dcd
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
||||
import logging
|
||||
|
||||
from django.utils.encoding import smart_text
|
||||
from django.utils.timezone import now
|
||||
|
||||
from awx.main.utils.common import set_current_apps
|
||||
from awx.main.utils.common import parse_yaml_or_json
|
||||
@ -96,6 +97,21 @@ def delete_custom_inv_source(apps, schema_editor):
|
||||
set_current_apps(apps)
|
||||
InventorySource = apps.get_model('main', 'InventorySource')
|
||||
InventoryUpdate = apps.get_model('main', 'InventoryUpdate')
|
||||
Schedule = apps.get_model('main', 'Schedule')
|
||||
|
||||
saved_time = now()
|
||||
|
||||
# We cannot allow polymorphic.SET_NULL relationships to exist before we delete any InventorySources or InventoryUpdates or Schedules
|
||||
# so we do this hack of updating modified time so we can keep track of which schedules to delete (b/c we nulled the relationships)
|
||||
Schedule.objects.filter(unified_job_template__inventorysource__source='custom').update(modified=saved_time)
|
||||
InventoryUpdate.objects.filter(source='custom', schedule__isnull=False).update(schedule=None)
|
||||
InventorySource.objects.filter(source='custom', next_schedule__isnull=False).update(next_schedule=None)
|
||||
|
||||
# safe to delete Schedule objects with no schedule or next_schedule pointers from UJ or UJT tables
|
||||
ct, deletions = Schedule.objects.filter(modified=saved_time).delete()
|
||||
if ct:
|
||||
logger.info('deleted {} custom inventory source schedules: {}'.format(ct, deletions))
|
||||
|
||||
ct, deletions = InventoryUpdate.objects.filter(source='custom').delete()
|
||||
if ct:
|
||||
logger.info('deleted {}'.format((ct, deletions)))
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"BRAND_NAME": "AWX",
|
||||
"BRAND_NAME": "Ansible AWX",
|
||||
"PENDO_API_KEY": ""
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ function About({ version, isOpen, onClose }) {
|
||||
<AboutModal
|
||||
isOpen={isOpen}
|
||||
onClose={onClose}
|
||||
productName={`Ansible ${brandName.current}`}
|
||||
productName={brandName.current}
|
||||
trademark={`${copyright} ${new Date().getFullYear()} ${redHatInc}`}
|
||||
brandImageSrc="/static/media/logo-header.svg"
|
||||
brandImageAlt={t`Brand Image`}
|
||||
|
||||
@ -39,6 +39,9 @@ function PaginatedTable({
|
||||
const { search, pathname } = useLocation();
|
||||
const history = useHistory();
|
||||
const location = useLocation();
|
||||
if (!pluralizedItemName) {
|
||||
pluralizedItemName = t`Items`;
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
clearSelected();
|
||||
@ -198,7 +201,7 @@ PaginatedTable.defaultProps = {
|
||||
toolbarSearchColumns: [],
|
||||
toolbarSearchableKeys: [],
|
||||
toolbarRelatedSearchableKeys: [],
|
||||
pluralizedItemName: 'Items',
|
||||
pluralizedItemName: null,
|
||||
showPageSizeOptions: true,
|
||||
renderToolbar: props => <DataListToolbar {...props} />,
|
||||
ouiaId: null,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -87,6 +87,9 @@ function CredentialInput({
|
||||
id={`credential-${fieldOptions.id}`}
|
||||
type="text"
|
||||
filename={fileName}
|
||||
filenamePlaceholder={t`Drag a file here or browse to upload`}
|
||||
browseButtonText={t`Browse…`}
|
||||
clearButtonText={t`Clear`}
|
||||
onChange={handleFileChange}
|
||||
onReadStarted={() => setFileIsUploading(true)}
|
||||
onReadFinished={() => setFileIsUploading(false)}
|
||||
@ -105,6 +108,9 @@ function CredentialInput({
|
||||
id={`credential-${fieldOptions.id}`}
|
||||
type="text"
|
||||
filename={fileName}
|
||||
filenamePlaceholder={t`Drag a file here or browse to upload`}
|
||||
browseButtonText={t`Browse…`}
|
||||
clearButtonText={t`Clear`}
|
||||
onChange={handleFileChange}
|
||||
onReadStarted={() => setFileIsUploading(true)}
|
||||
onReadFinished={() => setFileIsUploading(false)}
|
||||
|
||||
@ -50,7 +50,7 @@ export default typeFieldNames;
|
||||
const initialConfigValues = {};
|
||||
Object.keys(typeFieldNames).forEach(key => {
|
||||
typeFieldNames[key].forEach(fieldName => {
|
||||
const isBoolean = fieldName.includes('_ssl');
|
||||
const isBoolean = fieldName.includes('_ssl') || fieldName === 'use_tls';
|
||||
initialConfigValues[fieldName] = isBoolean ? false : '';
|
||||
});
|
||||
});
|
||||
|
||||
@ -4,5 +4,5 @@ export default function getDocsBaseUrl(config) {
|
||||
if (licenseType && licenseType !== 'open') {
|
||||
version = config?.version ? config.version.split('-')[0] : 'latest';
|
||||
}
|
||||
return `https://docs.ansible.com/ansible-tower/${version}`;
|
||||
return `https://docs.ansible.com/automation-controller/${version}`;
|
||||
}
|
||||
|
||||
@ -9,7 +9,9 @@ describe('getDocsBaseUrl', () => {
|
||||
version: '18.0.0',
|
||||
});
|
||||
|
||||
expect(result).toEqual('https://docs.ansible.com/ansible-tower/latest');
|
||||
expect(result).toEqual(
|
||||
'https://docs.ansible.com/automation-controller/latest'
|
||||
);
|
||||
});
|
||||
|
||||
it('should return current version for enterprise license', () => {
|
||||
@ -20,7 +22,9 @@ describe('getDocsBaseUrl', () => {
|
||||
version: '4.0.0',
|
||||
});
|
||||
|
||||
expect(result).toEqual('https://docs.ansible.com/ansible-tower/4.0.0');
|
||||
expect(result).toEqual(
|
||||
'https://docs.ansible.com/automation-controller/4.0.0'
|
||||
);
|
||||
});
|
||||
|
||||
it('should strip version info after hyphen', () => {
|
||||
@ -31,7 +35,9 @@ describe('getDocsBaseUrl', () => {
|
||||
version: '4.0.0-beta',
|
||||
});
|
||||
|
||||
expect(result).toEqual('https://docs.ansible.com/ansible-tower/4.0.0');
|
||||
expect(result).toEqual(
|
||||
'https://docs.ansible.com/automation-controller/4.0.0'
|
||||
);
|
||||
});
|
||||
|
||||
it('should return latest version if license info missing', () => {
|
||||
@ -39,6 +45,8 @@ describe('getDocsBaseUrl', () => {
|
||||
version: '18.0.0',
|
||||
});
|
||||
|
||||
expect(result).toEqual('https://docs.ansible.com/ansible-tower/latest');
|
||||
expect(result).toEqual(
|
||||
'https://docs.ansible.com/automation-controller/latest'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
aiohttp
|
||||
ansible-runner==2.0.0
|
||||
ansible-runner==2.0.1
|
||||
ansiconv==1.0.0 # UPGRADE BLOCKER: from 2013, consider replacing instead of upgrading
|
||||
asciichartpy
|
||||
autobahn>=20.12.3 # CVE-2020-35678
|
||||
@ -45,7 +45,7 @@ python3-saml
|
||||
python-dsv-sdk
|
||||
python-ldap>=3.3.1 # https://github.com/python-ldap/python-ldap/issues/270
|
||||
pyyaml>=5.4.1 # minimum to fix https://github.com/yaml/pyyaml/issues/478
|
||||
receptorctl==1.0.0.0rc1
|
||||
receptorctl==1.0.0
|
||||
schedule==0.6.0
|
||||
social-auth-core==3.3.1 # see UPGRADE BLOCKERs
|
||||
social-auth-app-django==3.1.0 # see UPGRADE BLOCKERs
|
||||
|
||||
@ -4,7 +4,7 @@ aiohttp==3.6.2
|
||||
# via -r /awx_devel/requirements/requirements.in
|
||||
aioredis==1.3.1
|
||||
# via channels-redis
|
||||
ansible-runner==2.0.0
|
||||
ansible-runner==2.0.1
|
||||
# via -r /awx_devel/requirements/requirements.in
|
||||
ansiconv==1.0.0
|
||||
# via -r /awx_devel/requirements/requirements.in
|
||||
@ -299,7 +299,7 @@ pyyaml==5.4.1
|
||||
# djangorestframework-yaml
|
||||
# kubernetes
|
||||
# receptorctl
|
||||
receptorctl==1.0.0.0rc1
|
||||
receptorctl==1.0.0
|
||||
# via -r /awx_devel/requirements/requirements.in
|
||||
redis==3.4.1
|
||||
# via
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user