mirror of
https://github.com/ansible/awx.git
synced 2026-02-18 19:50:05 -03:30
Add alert for org. delete.
This commit is contained in:
@@ -4,61 +4,72 @@ import { Trans, t } from '@lingui/macro';
|
||||
import {
|
||||
Badge,
|
||||
Checkbox,
|
||||
Button,
|
||||
} from '@patternfly/react-core';
|
||||
import {
|
||||
TrashAltIcon,
|
||||
} from '@patternfly/react-icons';
|
||||
import {
|
||||
Link
|
||||
} from 'react-router-dom';
|
||||
|
||||
import VerticalSeparator from '../../../components/VerticalSeparator';
|
||||
|
||||
export default ({
|
||||
itemId,
|
||||
name,
|
||||
userCount,
|
||||
teamCount,
|
||||
isSelected,
|
||||
onSelect,
|
||||
detailUrl,
|
||||
}) => (
|
||||
<li key={itemId} className="pf-c-data-list__item" aria-labelledby="check-action-item1">
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
<Checkbox
|
||||
checked={isSelected}
|
||||
onChange={onSelect}
|
||||
aria-label={i18n._(t`select organization ${itemId}`)}
|
||||
id={`select-organization-${itemId}`}
|
||||
/>
|
||||
)}
|
||||
</I18n>
|
||||
<VerticalSeparator />
|
||||
<div className="pf-c-data-list__cell">
|
||||
<span id="check-action-item1">
|
||||
<Link
|
||||
to={`${detailUrl}`}
|
||||
>
|
||||
<b>{name}</b>
|
||||
</Link>
|
||||
</span>
|
||||
</div>
|
||||
<div className="pf-c-data-list__cell">
|
||||
<Link to={`${detailUrl}/access`}>
|
||||
<Trans>Users</Trans>
|
||||
</Link>
|
||||
<Badge isRead>
|
||||
{' '}
|
||||
{userCount}
|
||||
{' '}
|
||||
</Badge>
|
||||
<Link to={`${detailUrl}/teams`}>
|
||||
<Trans>Teams</Trans>
|
||||
</Link>
|
||||
<Badge isRead>
|
||||
{' '}
|
||||
{teamCount}
|
||||
{' '}
|
||||
</Badge>
|
||||
</div>
|
||||
<div className="pf-c-data-list__cell" />
|
||||
</li>
|
||||
);
|
||||
class OrganizationListItem extends React.Component {
|
||||
render () {
|
||||
const {
|
||||
itemId,
|
||||
name,
|
||||
userCount,
|
||||
teamCount,
|
||||
isSelected,
|
||||
onSelect,
|
||||
detailUrl,
|
||||
} = this.props;
|
||||
return (
|
||||
<li key={itemId} className="pf-c-data-list__item" aria-labelledby="check-action-item1">
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
<Checkbox
|
||||
checked={isSelected}
|
||||
onChange={onSelect}
|
||||
aria-label={i18n._(t`select organization ${itemId}`)}
|
||||
id={`select-organization-${itemId}`}
|
||||
/>
|
||||
)}
|
||||
</I18n>
|
||||
<VerticalSeparator />
|
||||
<div className="pf-c-data-list__cell">
|
||||
<span id="check-action-item1">
|
||||
<Link
|
||||
to={`${detailUrl}`}
|
||||
>
|
||||
<b>{name}</b>
|
||||
</Link>
|
||||
</span>
|
||||
</div>
|
||||
<div className="pf-c-data-list__cell">
|
||||
<Link to={`${detailUrl}/access`}>
|
||||
<Trans>Users</Trans>
|
||||
</Link>
|
||||
<Badge isRead>
|
||||
{' '}
|
||||
{userCount}
|
||||
{' '}
|
||||
</Badge>
|
||||
<Link to={`${detailUrl}/teams`}>
|
||||
<Trans>Teams</Trans>
|
||||
</Link>
|
||||
<Badge isRead>
|
||||
{' '}
|
||||
{teamCount}
|
||||
{' '}
|
||||
</Badge>
|
||||
</div>
|
||||
<div className="pf-c-data-list__cell" />
|
||||
</li>
|
||||
);
|
||||
}
|
||||
}
|
||||
export default OrganizationListItem;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user