mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
Merge pull request #9057 from keithjgrant/9049-inventory-table-responsiveness
Fix inventory list responsive behavior
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
https://github.com/tiagodread
This commit is contained in:
commit
5ab0b91a0d
@ -71,6 +71,7 @@ export function HeaderCell({
|
||||
sortBy,
|
||||
columnIndex,
|
||||
idPrefix,
|
||||
className,
|
||||
children,
|
||||
}) {
|
||||
const sort = sortKey
|
||||
@ -81,7 +82,11 @@ export function HeaderCell({
|
||||
}
|
||||
: null;
|
||||
return (
|
||||
<Th sort={sort} id={sortKey ? `${idPrefix}-${sortKey}` : null}>
|
||||
<Th
|
||||
id={sortKey ? `${idPrefix}-${sortKey}` : null}
|
||||
className={className}
|
||||
sort={sort}
|
||||
>
|
||||
{children}
|
||||
</Th>
|
||||
);
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'styled-components/macro';
|
||||
import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { TableComposable, Tbody } from '@patternfly/react-table';
|
||||
@ -88,13 +89,13 @@ function PaginatedTable({
|
||||
);
|
||||
} else {
|
||||
Content = (
|
||||
<>
|
||||
<div css="overflow: scroll">
|
||||
{hasContentLoading && <LoadingSpinner />}
|
||||
<TableComposable aria-label={dataListLabel}>
|
||||
{headerRow}
|
||||
<Tbody>{items.map(renderRow)}</Tbody>
|
||||
</TableComposable>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -195,9 +195,6 @@ function InventoryList({ i18n }) {
|
||||
<HeaderCell>{i18n._(t`Status`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Type`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Organization`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Groups`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Hosts`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Sources`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Actions`)}</HeaderCell>
|
||||
</HeaderRow>
|
||||
}
|
||||
|
||||
@ -89,11 +89,6 @@ function InventoryListItem({
|
||||
{inventory?.summary_fields?.organization?.name}
|
||||
</Link>
|
||||
</Td>
|
||||
<Td dataLabel={i18n._(t`Groups`)}>{inventory.total_groups}</Td>
|
||||
<Td dataLabel={i18n._(t`Hosts`)}>{inventory.total_hosts}</Td>
|
||||
<Td dataLabel={i18n._(t`Sources`)}>
|
||||
{inventory.total_inventory_sources}
|
||||
</Td>
|
||||
{inventory.pending_deletion ? (
|
||||
<Td dataLabel={i18n._(t`Groups`)}>
|
||||
<Label color="red">{i18n._(t`Pending delete`)}</Label>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user