From 2474f60e00ac9ae99d1bf615fb849762dc2034fe Mon Sep 17 00:00:00 2001 From: Kia Lam Date: Mon, 2 Aug 2021 12:27:12 -0400 Subject: [PATCH 1/2] Add Node Type to Instances page and modify "Type" to "Policy Type." --- awx/ui/src/screens/InstanceGroup/Instances/InstanceList.js | 3 ++- awx/ui/src/screens/InstanceGroup/Instances/InstanceListItem.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/awx/ui/src/screens/InstanceGroup/Instances/InstanceList.js b/awx/ui/src/screens/InstanceGroup/Instances/InstanceList.js index ea880db304..c8cf075436 100644 --- a/awx/ui/src/screens/InstanceGroup/Instances/InstanceList.js +++ b/awx/ui/src/screens/InstanceGroup/Instances/InstanceList.js @@ -204,7 +204,8 @@ function InstanceList() { headerRow={ {t`Name`} - {t`Type`} + {t`Node Type`} + {t`Policy Type`} {t`Running Jobs`} {t`Total Jobs`} {t`Capacity Adjustment`} diff --git a/awx/ui/src/screens/InstanceGroup/Instances/InstanceListItem.js b/awx/ui/src/screens/InstanceGroup/Instances/InstanceListItem.js index 0638700eb5..442f3b464f 100644 --- a/awx/ui/src/screens/InstanceGroup/Instances/InstanceListItem.js +++ b/awx/ui/src/screens/InstanceGroup/Instances/InstanceListItem.js @@ -115,7 +115,8 @@ function InstanceListItem({ {instance.hostname} - + {instance.node_type} + {instance.managed_by_policy ? t`Auto` : t`Manual`} {instance.jobs_running} From 729723205f044c03edfc1e1e8203e5eb1e7c5fd6 Mon Sep 17 00:00:00 2001 From: Kia Lam Date: Mon, 2 Aug 2021 12:48:00 -0400 Subject: [PATCH 2/2] Fix unit tests. --- .../screens/InstanceGroup/Instances/InstanceListItem.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/awx/ui/src/screens/InstanceGroup/Instances/InstanceListItem.test.js b/awx/ui/src/screens/InstanceGroup/Instances/InstanceListItem.test.js index 7deac783be..0b660da15c 100644 --- a/awx/ui/src/screens/InstanceGroup/Instances/InstanceListItem.test.js +++ b/awx/ui/src/screens/InstanceGroup/Instances/InstanceListItem.test.js @@ -36,6 +36,7 @@ const instance = [ mem_capacity: 1, enabled: true, managed_by_policy: true, + node_type: 'hybrid', }, ]; @@ -127,7 +128,8 @@ describe('', () => { }); expect(wrapper.find('Td').at(1).text()).toBe('awx'); expect(wrapper.find('Progress').prop('value')).toBe(40); - expect(wrapper.find('Td').at(2).text()).toBe('Auto'); + expect(wrapper.find('Td').at(2).text()).toBe('hybrid'); + expect(wrapper.find('Td').at(3).text()).toBe('Auto'); expect( wrapper .find('Td')