mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 20:30:46 -03:30
table header cleanup; fix inventory status labels
This commit is contained in:
parent
6a47899dbb
commit
9da636e294
@ -17,7 +17,7 @@ const ActionsGrid = styled.div`
|
||||
`;
|
||||
|
||||
export default function ActionsTd({ children }) {
|
||||
const numActions = children.length;
|
||||
const numActions = children.length || 1;
|
||||
const width = numActions * 40;
|
||||
return (
|
||||
<Td
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
import React from 'react';
|
||||
import { useLocation, useHistory } from 'react-router-dom';
|
||||
import { Thead, Tr, Th } from '@patternfly/react-table';
|
||||
import { Thead, Tr, Th as PFTh } from '@patternfly/react-table';
|
||||
import styled from 'styled-components';
|
||||
import {
|
||||
encodeNonDefaultQueryString,
|
||||
parseQueryString,
|
||||
replaceParams,
|
||||
} from '../../util/qs';
|
||||
|
||||
const Th = styled(PFTh)`
|
||||
--pf-c-table--cell--Overflow: initial;
|
||||
`;
|
||||
|
||||
export default function HeaderRow({ qsConfig, defaultSortKey, children }) {
|
||||
const location = useLocation();
|
||||
const history = useHistory();
|
||||
|
||||
@ -199,6 +199,7 @@ function InventoryList({ i18n }) {
|
||||
<HeaderCell>{i18n._(t`Groups`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Hosts`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Sources`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Actions`)}</HeaderCell>
|
||||
</HeaderRow>
|
||||
}
|
||||
renderToolbar={props => (
|
||||
|
||||
@ -11,7 +11,7 @@ import { InventoriesAPI } from '../../../api';
|
||||
import { Inventory } from '../../../types';
|
||||
import { ActionsTd, ActionItem } from '../../../components/PaginatedTable';
|
||||
import CopyButton from '../../../components/CopyButton';
|
||||
import SyncStatusIndicator from '../../../components/SyncStatusIndicator';
|
||||
import StatusLabel from '../../../components/StatusLabel';
|
||||
|
||||
function InventoryListItem({
|
||||
inventory,
|
||||
@ -74,9 +74,7 @@ function InventoryListItem({
|
||||
)}
|
||||
</Td>
|
||||
<Td>
|
||||
{inventory.kind !== 'smart' && (
|
||||
<SyncStatusIndicator status={syncStatus} />
|
||||
)}
|
||||
{inventory.kind !== 'smart' && <StatusLabel status={syncStatus} />}
|
||||
</Td>
|
||||
<Td>
|
||||
{inventory.kind === 'smart'
|
||||
|
||||
@ -156,6 +156,7 @@ function OrganizationsList({ i18n }) {
|
||||
<HeaderCell sortKey="name">{i18n._(t`Name`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Members`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Teams`)}</HeaderCell>
|
||||
<HeaderCell>{i18n._(t`Actions`)}</HeaderCell>
|
||||
</HeaderRow>
|
||||
}
|
||||
renderToolbar={props => (
|
||||
|
||||
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { string, bool, func } from 'prop-types';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
import { Button, Tooltip } from '@patternfly/react-core';
|
||||
import { Button } from '@patternfly/react-core';
|
||||
import { Tr, Td } from '@patternfly/react-table';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { PencilAltIcon } from '@patternfly/react-icons';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user