mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
fixes qs namespace, and location of proptypes
This commit is contained in:
parent
08d9341704
commit
f211c70e69
@ -15,6 +15,7 @@ import { t } from '@lingui/macro';
|
||||
import { Link } from 'react-router-dom';
|
||||
import styled from 'styled-components';
|
||||
import { PencilAltIcon } from '@patternfly/react-icons';
|
||||
import { formatDateString } from '../../../util/dates';
|
||||
import { Application } from '../../../types';
|
||||
import DataListCell from '../../../components/DataListCell';
|
||||
|
||||
@ -25,6 +26,10 @@ const DataListAction = styled(_DataListAction)`
|
||||
grid-template-columns: 40px;
|
||||
`;
|
||||
|
||||
const Label = styled.b`
|
||||
margin-right: 20px;
|
||||
`;
|
||||
|
||||
function ApplicationListItem({
|
||||
application,
|
||||
isSelected,
|
||||
@ -32,13 +37,6 @@ function ApplicationListItem({
|
||||
detailUrl,
|
||||
i18n,
|
||||
}) {
|
||||
ApplicationListItem.propTypes = {
|
||||
application: Application.isRequired,
|
||||
detailUrl: string.isRequired,
|
||||
isSelected: bool.isRequired,
|
||||
onSelect: func.isRequired,
|
||||
};
|
||||
|
||||
const labelId = `check-action-${application.id}`;
|
||||
return (
|
||||
<DataListItem
|
||||
@ -73,6 +71,10 @@ function ApplicationListItem({
|
||||
<b>{application.summary_fields.organization.name}</b>
|
||||
</Link>
|
||||
</DataListCell>,
|
||||
<DataListCell key="modified" aria-label={i18n._(t`last modified`)}>
|
||||
<Label>{i18n._(t`Last Modified`)}</Label>
|
||||
<span>{formatDateString(application.modified)}</span>
|
||||
</DataListCell>,
|
||||
]}
|
||||
/>
|
||||
<DataListAction
|
||||
@ -99,4 +101,12 @@ function ApplicationListItem({
|
||||
</DataListItem>
|
||||
);
|
||||
}
|
||||
|
||||
ApplicationListItem.propTypes = {
|
||||
application: Application.isRequired,
|
||||
detailUrl: string.isRequired,
|
||||
isSelected: bool.isRequired,
|
||||
onSelect: func.isRequired,
|
||||
};
|
||||
|
||||
export default withI18n()(ApplicationListItem);
|
||||
|
||||
@ -19,7 +19,7 @@ import useSelected from '../../../util/useSelected';
|
||||
|
||||
import ApplicationListItem from './ApplicationListItem';
|
||||
|
||||
const QS_CONFIG = getQSConfig('inventory', {
|
||||
const QS_CONFIG = getQSConfig('applications', {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
order_by: 'name',
|
||||
@ -105,12 +105,8 @@ function ApplicationsList({ i18n }) {
|
||||
isDefault: true,
|
||||
},
|
||||
{
|
||||
name: i18n._(t`Created by (Username)`),
|
||||
key: 'created_by__username',
|
||||
},
|
||||
{
|
||||
name: i18n._(t`Modified by (Username)`),
|
||||
key: 'modified_by__username',
|
||||
name: i18n._(t`Description`),
|
||||
key: 'description',
|
||||
},
|
||||
]}
|
||||
toolbarSortColumns={[
|
||||
@ -118,6 +114,18 @@ function ApplicationsList({ i18n }) {
|
||||
name: i18n._(t`Name`),
|
||||
key: 'name',
|
||||
},
|
||||
{
|
||||
name: i18n._(t`Created`),
|
||||
key: 'created',
|
||||
},
|
||||
{
|
||||
name: i18n._(t`Organization`),
|
||||
key: 'organization',
|
||||
},
|
||||
{
|
||||
name: i18n._(t`Description`),
|
||||
key: 'description',
|
||||
},
|
||||
]}
|
||||
renderToolbar={props => (
|
||||
<DatalistToolbar
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user