+ |
+
+
+ {application.name}
+
+ |
+
+
- {application.summary_fields.user_capabilities.edit ? (
-
-
-
- ) : (
- ''
- )}
-
-
-
+ {application.summary_fields.organization.name}
+
+ |
+
+ {formatDateString(application.modified)}
+ |
+
+
+
+
+
+
);
}
diff --git a/awx/ui_next/src/screens/Application/ApplicationsList/ApplicationListItem.test.jsx b/awx/ui_next/src/screens/Application/ApplicationsList/ApplicationListItem.test.jsx
index 0a53dd4cd8..510c89ff28 100644
--- a/awx/ui_next/src/screens/Application/ApplicationsList/ApplicationListItem.test.jsx
+++ b/awx/ui_next/src/screens/Application/ApplicationsList/ApplicationListItem.test.jsx
@@ -18,12 +18,16 @@ describe('', () => {
test('should mount successfully', async () => {
await act(async () => {
wrapper = mountWithContexts(
- {}}
- />
+
);
});
expect(wrapper.find('ApplicationListItem').length).toBe(1);
@@ -31,38 +35,30 @@ describe('', () => {
test('should render the proper data', async () => {
await act(async () => {
wrapper = mountWithContexts(
- {}}
- />
+
);
});
expect(
- wrapper.find('DataListCell[aria-label="application name"]').text()
+ wrapper
+ .find('Td')
+ .at(1)
+ .text()
).toBe('Foo');
expect(
- wrapper.find('DataListCell[aria-label="organization name"]').text()
+ wrapper
+ .find('Td')
+ .at(2)
+ .text()
).toBe('Organization');
- expect(wrapper.find('input#select-application-1').prop('checked')).toBe(
- false
- );
expect(wrapper.find('PencilAltIcon').length).toBe(1);
});
- test('should be checked', async () => {
- await act(async () => {
- wrapper = mountWithContexts(
- {}}
- />
- );
- });
- expect(wrapper.find('input#select-application-1').prop('checked')).toBe(
- true
- );
- });
});
diff --git a/awx/ui_next/src/screens/Application/ApplicationsList/ApplicationsList.jsx b/awx/ui_next/src/screens/Application/ApplicationsList/ApplicationsList.jsx
index b35ecc7d68..5ed5e092da 100644
--- a/awx/ui_next/src/screens/Application/ApplicationsList/ApplicationsList.jsx
+++ b/awx/ui_next/src/screens/Application/ApplicationsList/ApplicationsList.jsx
@@ -11,7 +11,11 @@ import AlertModal from '../../../components/AlertModal';
import DatalistToolbar from '../../../components/DataListToolbar';
import { ApplicationsAPI } from '../../../api';
-import PaginatedDataList, {
+import PaginatedTable, {
+ HeaderRow,
+ HeaderCell,
+} from '../../../components/PaginatedTable';
+import {
ToolbarDeleteButton,
ToolbarAddButton,
} from '../../../components/PaginatedDataList';
@@ -104,7 +108,7 @@ function ApplicationsList({ i18n }) {
<>
- (
@@ -170,7 +156,17 @@ function ApplicationsList({ i18n }) {
]}
/>
)}
- renderItem={application => (
+ headerRow={
+
+ {i18n._(t`Name`)}
+
+ {i18n._(t`Organization`)}
+
+ {i18n._(t`Last Modified`)}
+ {i18n._(t`Actions`)}
+
+ }
+ renderRow={(application, index) => (
handleSelect(application)}
isSelected={selected.some(row => row.id === application.id)}
+ rowIndex={index}
/>
)}
emptyStateControls={