mirror of
https://github.com/ansible/awx.git
synced 2026-05-25 01:27:45 -02:30
assorted schedule list fixes:
- remove pagesection and card from component...move to where called for root list - remove unnecessary placeholder schedule tab on job template detail
This commit is contained in:
@@ -3,7 +3,6 @@ import { useLocation } from 'react-router-dom';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
import { SchedulesAPI } from '@api';
|
||||
import { Card, PageSection } from '@patternfly/react-core';
|
||||
import AlertModal from '@components/AlertModal';
|
||||
import ErrorDetail from '@components/ErrorDetail';
|
||||
import DataListToolbar from '@components/DataListToolbar';
|
||||
@@ -86,8 +85,7 @@ function ScheduleList({ i18n, loadSchedules }) {
|
||||
};
|
||||
|
||||
return (
|
||||
<PageSection>
|
||||
<Card>
|
||||
<>
|
||||
<PaginatedDataList
|
||||
contentError={contentError}
|
||||
hasContentLoading={isLoading || isDeleteLoading}
|
||||
@@ -142,7 +140,6 @@ function ScheduleList({ i18n, loadSchedules }) {
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</Card>
|
||||
{deletionError && (
|
||||
<AlertModal
|
||||
isOpen={deletionError}
|
||||
@@ -154,7 +151,7 @@ function ScheduleList({ i18n, loadSchedules }) {
|
||||
<ErrorDetail error={deletionError} />
|
||||
</AlertModal>
|
||||
)}
|
||||
</PageSection>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { t } from '@lingui/macro';
|
||||
import Breadcrumbs from '@components/Breadcrumbs';
|
||||
import ScheduleList from '@components/ScheduleList';
|
||||
import { SchedulesAPI } from '@api';
|
||||
import { PageSection, Card } from '@patternfly/react-core';
|
||||
|
||||
function Schedules({ i18n }) {
|
||||
const loadSchedules = params => {
|
||||
@@ -21,7 +22,11 @@ function Schedules({ i18n }) {
|
||||
/>
|
||||
<Switch>
|
||||
<Route path="/schedules">
|
||||
<PageSection>
|
||||
<Card>
|
||||
<ScheduleList loadSchedules={loadSchedules} />
|
||||
</Card>
|
||||
</PageSection>
|
||||
</Route>
|
||||
</Switch>
|
||||
</>
|
||||
|
||||
@@ -112,10 +112,6 @@ class Template extends Component {
|
||||
}
|
||||
|
||||
tabsArray.push(
|
||||
{
|
||||
name: i18n._(t`Schedules`),
|
||||
link: '/home',
|
||||
},
|
||||
{
|
||||
name: i18n._(t`Completed Jobs`),
|
||||
link: `${match.url}/completed_jobs`,
|
||||
|
||||
@@ -61,7 +61,7 @@ describe('<Template />', () => {
|
||||
const tabs = await waitForElement(
|
||||
wrapper,
|
||||
'.pf-c-tabs__item',
|
||||
el => el.length === 7
|
||||
el => el.length === 6
|
||||
);
|
||||
expect(tabs.at(2).text()).toEqual('Notifications');
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user