diff --git a/awx/ui/src/util/getDocsBaseUrl.js b/awx/ui/src/util/getDocsBaseUrl.js index d88996a75171..6b408ca8d378 100644 --- a/awx/ui/src/util/getDocsBaseUrl.js +++ b/awx/ui/src/util/getDocsBaseUrl.js @@ -1,8 +1,17 @@ export default function getDocsBaseUrl(config) { let version = 'latest'; const licenseType = config?.license_info?.license_type; + if (licenseType && licenseType !== 'open') { - version = config?.version ? config.version.split('-')[0] : 'latest'; + if (config?.version) { + if (parseFloat(config?.version.split('-')[0]) >= 4.3) { + version = parseFloat(config?.version.split('-')[0]); + } else { + version = config?.version.split('-')[0]; + } + } + } else { + version = 'latest'; } return `https://docs.ansible.com/automation-controller/${version}`; }