diff --git a/awx/ui_next/src/screens/InstanceGroup/InstanceGroupDetails/InstanceGroupDetails.jsx b/awx/ui_next/src/screens/InstanceGroup/InstanceGroupDetails/InstanceGroupDetails.jsx
index c6d3313ffe..0d6964559a 100644
--- a/awx/ui_next/src/screens/InstanceGroup/InstanceGroupDetails/InstanceGroupDetails.jsx
+++ b/awx/ui_next/src/screens/InstanceGroup/InstanceGroupDetails/InstanceGroupDetails.jsx
@@ -2,8 +2,8 @@ import React, { useCallback } from 'react';
import { withI18n } from '@lingui/react';
import { t } from '@lingui/macro';
import { Link, useHistory } from 'react-router-dom';
-import { Button } from '@patternfly/react-core';
import styled from 'styled-components';
+import { Button, Label } from '@patternfly/react-core';
import AlertModal from '../../../components/AlertModal';
import { CardBody, CardActionsRow } from '../../../components/Card';
@@ -46,12 +46,28 @@ function InstanceGroupDetails({ instanceGroup, i18n }) {
);
};
+ const verifyIsIsolated = item => {
+ if (item.is_isolated) {
+ return (
+ <>
+ {item.name}
+
+
+
+ >
+ );
+ }
+ return <>{item.name}>;
+ };
+
return (
', () => {
});
wrapper.update();
- expectDetailToMatch(wrapper, 'Name', instanceGroups[0].name);
+
+ expect(wrapper.find('Detail[label="Name"]').text()).toEqual(
+ expect.stringContaining(instanceGroups[0].name)
+ );
+ expect(wrapper.find('Detail[label="Name"]')).toHaveLength(1);
expectDetailToMatch(wrapper, 'Type', `Instance group`);
const dates = wrapper.find('UserDateDetail');
expect(dates).toHaveLength(2);
@@ -144,4 +150,18 @@ describe('', () => {
expect(wrapper.find('Button[aria-label="Edit"]').length).toBe(0);
});
+
+ test('should display isolated label', async () => {
+ await act(async () => {
+ wrapper = mountWithContexts(
+
+ );
+ });
+ wrapper.update();
+ expect(
+ wrapper.find('Label[aria-label="isolated instance"]').prop('children')
+ ).toEqual('Isolated');
+ });
});
diff --git a/awx/ui_next/src/screens/InstanceGroup/InstanceGroupList/InstanceGroupListItem.jsx b/awx/ui_next/src/screens/InstanceGroup/InstanceGroupList/InstanceGroupListItem.jsx
index 915aa44d44..f531f8b182 100644
--- a/awx/ui_next/src/screens/InstanceGroup/InstanceGroupList/InstanceGroupListItem.jsx
+++ b/awx/ui_next/src/screens/InstanceGroup/InstanceGroupList/InstanceGroupListItem.jsx
@@ -6,15 +6,16 @@ import { Link } from 'react-router-dom';
import 'styled-components/macro';
import {
Badge as PFBadge,
- Progress,
- ProgressMeasureLocation,
- ProgressSize,
Button,
DataListAction as _DataListAction,
DataListCheck,
DataListItem,
- DataListItemRow,
DataListItemCells,
+ DataListItemRow,
+ Label,
+ Progress,
+ ProgressMeasureLocation,
+ ProgressSize,
Tooltip,
} from '@patternfly/react-core';
import { PencilAltIcon } from '@patternfly/react-icons';
@@ -112,6 +113,13 @@ function InstanceGroupListItem({
{instanceGroup.name}
+ {instanceGroup.is_isolated ? (
+
+
+
+ ) : null}
,