diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 08503db45e..8842f7b98d 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -2236,7 +2236,6 @@ class InventoryUpdateSerializer(UnifiedJobSerializer, InventorySourceOptionsSeri 'source_project_update', 'custom_virtualenv', 'instance_group', - '-controller_node', ) def get_related(self, obj): @@ -2311,7 +2310,6 @@ class InventoryUpdateDetailSerializer(InventoryUpdateSerializer): class InventoryUpdateListSerializer(InventoryUpdateSerializer, UnifiedJobListSerializer): class Meta: model = InventoryUpdate - fields = ('*', '-controller_node') # field removal undone by UJ serializer class InventoryUpdateCancelSerializer(InventoryUpdateSerializer): diff --git a/awx/main/tests/functional/api/test_job.py b/awx/main/tests/functional/api/test_job.py index f7fa087372..8c405c4e0e 100644 --- a/awx/main/tests/functional/api/test_job.py +++ b/awx/main/tests/functional/api/test_job.py @@ -220,7 +220,7 @@ class TestControllerNode: assert 'controller_node' not in r.data r = get(reverse('api:inventory_update_detail', kwargs={'pk': inventory_update.pk}), admin_user, expect=200) - assert 'controller_node' not in r.data + assert 'controller_node' in r.data r = get(reverse('api:system_job_detail', kwargs={'pk': system_job.pk}), admin_user, expect=200) assert 'controller_node' not in r.data diff --git a/awx/ui/src/screens/Job/JobDetail/JobDetail.js b/awx/ui/src/screens/Job/JobDetail/JobDetail.js index 620b276111..6e97554a6e 100644 --- a/awx/ui/src/screens/Job/JobDetail/JobDetail.js +++ b/awx/ui/src/screens/Job/JobDetail/JobDetail.js @@ -186,7 +186,6 @@ function JobDetail({ job, inventorySourceLabels }) { } return null; }; - return ( @@ -349,6 +348,13 @@ function JobDetail({ job, inventorySourceLabels }) { label={t`Execution Node`} value={job.execution_node} /> + {job?.controller_node ? ( + + ) : null} {instanceGroup && !instanceGroup?.is_container_group && ( )} - {credential && (