mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
Update usage of new custom ChipGroup
Update usage of new custom `ChipGroup`. See: https://github.com/ansible/awx/pull/6935/fies Also: https://www.patternfly.org/v4/documentation/react/components/chipgroup
This commit is contained in:
@@ -3,15 +3,10 @@ import { Link, useHistory } from 'react-router-dom';
|
|||||||
import { withI18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
|
|
||||||
import {
|
import { Button, Chip, List, ListItem } from '@patternfly/react-core';
|
||||||
Button,
|
|
||||||
Chip,
|
|
||||||
ChipGroup,
|
|
||||||
List,
|
|
||||||
ListItem,
|
|
||||||
} from '@patternfly/react-core';
|
|
||||||
import AlertModal from '../../../components/AlertModal';
|
import AlertModal from '../../../components/AlertModal';
|
||||||
import { CardBody, CardActionsRow } from '../../../components/Card';
|
import { CardBody, CardActionsRow } from '../../../components/Card';
|
||||||
|
import ChipGroup from '../../../components/ChipGroup';
|
||||||
import { VariablesDetail } from '../../../components/CodeMirrorInput';
|
import { VariablesDetail } from '../../../components/CodeMirrorInput';
|
||||||
import CredentialChip from '../../../components/CredentialChip';
|
import CredentialChip from '../../../components/CredentialChip';
|
||||||
import DeleteButton from '../../../components/DeleteButton';
|
import DeleteButton from '../../../components/DeleteButton';
|
||||||
@@ -161,7 +156,10 @@ function InventorySourceDetail({ inventorySource, i18n }) {
|
|||||||
fullWidth
|
fullWidth
|
||||||
label={i18n._(t`Regions`)}
|
label={i18n._(t`Regions`)}
|
||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5}>
|
<ChipGroup
|
||||||
|
numChips={5}
|
||||||
|
totalChips={source_regions.split(',').length}
|
||||||
|
>
|
||||||
{source_regions.split(',').map(region => (
|
{source_regions.split(',').map(region => (
|
||||||
<Chip key={region} isReadOnly>
|
<Chip key={region} isReadOnly>
|
||||||
{region}
|
{region}
|
||||||
@@ -176,7 +174,10 @@ function InventorySourceDetail({ inventorySource, i18n }) {
|
|||||||
fullWidth
|
fullWidth
|
||||||
label={i18n._(t`Instance filters`)}
|
label={i18n._(t`Instance filters`)}
|
||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5}>
|
<ChipGroup
|
||||||
|
numChips={5}
|
||||||
|
totalChips={instance_filters.split(',').length}
|
||||||
|
>
|
||||||
{instance_filters.split(',').map(filter => (
|
{instance_filters.split(',').map(filter => (
|
||||||
<Chip key={filter} isReadOnly>
|
<Chip key={filter} isReadOnly>
|
||||||
{filter}
|
{filter}
|
||||||
@@ -191,7 +192,7 @@ function InventorySourceDetail({ inventorySource, i18n }) {
|
|||||||
fullWidth
|
fullWidth
|
||||||
label={i18n._(t`Only group by`)}
|
label={i18n._(t`Only group by`)}
|
||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5}>
|
<ChipGroup numChips={5} totalChips={group_by.split(',').length}>
|
||||||
{group_by.split(',').map(group => (
|
{group_by.split(',').map(group => (
|
||||||
<Chip key={group} isReadOnly>
|
<Chip key={group} isReadOnly>
|
||||||
{group}
|
{group}
|
||||||
|
|||||||
Reference in New Issue
Block a user