Merge pull request #10801 from kialam/add-instances-node-type-ui

Add Node Type to Instances page and modify "Type" to "Policy Type."
This commit is contained in:
kialam 2021-08-03 14:01:02 -04:00 committed by GitHub
commit 791d24bcb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -204,7 +204,8 @@ function InstanceList() {
headerRow={
<HeaderRow qsConfig={QS_CONFIG}>
<HeaderCell sortKey="name">{t`Name`}</HeaderCell>
<HeaderCell>{t`Type`}</HeaderCell>
<HeaderCell>{t`Node Type`}</HeaderCell>
<HeaderCell>{t`Policy Type`}</HeaderCell>
<HeaderCell>{t`Running Jobs`}</HeaderCell>
<HeaderCell>{t`Total Jobs`}</HeaderCell>
<HeaderCell>{t`Capacity Adjustment`}</HeaderCell>

View File

@ -115,7 +115,8 @@ function InstanceListItem({
<Td id={labelId} dataLabel={t`Name`}>
{instance.hostname}
</Td>
<Td dataLabel={t`Type`}>
<Td dataLabel={t`Node Type`}>{instance.node_type}</Td>
<Td dataLabel={t`Policy Type`}>
{instance.managed_by_policy ? t`Auto` : t`Manual`}
</Td>
<Td dataLabel={t`Running Jobs`}>{instance.jobs_running}</Td>

View File

@ -36,6 +36,7 @@ const instance = [
mem_capacity: 1,
enabled: true,
managed_by_policy: true,
node_type: 'hybrid',
},
];
@ -127,7 +128,8 @@ describe('<InstanceListItem/>', () => {
});
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')