mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Put project related tabs in the correct order
This commit is contained in:
@@ -129,22 +129,29 @@ class Project extends Component {
|
|||||||
const tabsArray = [
|
const tabsArray = [
|
||||||
{ name: i18n._(t`Details`), link: `${match.url}/details`, id: 0 },
|
{ name: i18n._(t`Details`), link: `${match.url}/details`, id: 0 },
|
||||||
{ name: i18n._(t`Access`), link: `${match.url}/access`, id: 1 },
|
{ name: i18n._(t`Access`), link: `${match.url}/access`, id: 1 },
|
||||||
{ name: i18n._(t`Schedules`), link: `${match.url}/schedules`, id: 2 },
|
|
||||||
{
|
|
||||||
name: i18n._(t`Job Templates`),
|
|
||||||
link: `${match.url}/job_templates`,
|
|
||||||
id: 3,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
if (canSeeNotificationsTab) {
|
if (canSeeNotificationsTab) {
|
||||||
tabsArray.push({
|
tabsArray.push({
|
||||||
name: i18n._(t`Notifications`),
|
name: i18n._(t`Notifications`),
|
||||||
link: `${match.url}/notifications`,
|
link: `${match.url}/notifications`,
|
||||||
id: 4,
|
id: 2,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tabsArray.push(
|
||||||
|
{
|
||||||
|
name: i18n._(t`Job Templates`),
|
||||||
|
link: '/job_templates',
|
||||||
|
id: canSeeNotificationsTab ? 3 : 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: i18n._(t`Schedules`),
|
||||||
|
link: '/schedules',
|
||||||
|
id: canSeeNotificationsTab ? 4 : 3,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const CardHeader = styled(PFCardHeader)`
|
const CardHeader = styled(PFCardHeader)`
|
||||||
--pf-c-card--first-child--PaddingTop: 0;
|
--pf-c-card--first-child--PaddingTop: 0;
|
||||||
--pf-c-card--child--PaddingLeft: 0;
|
--pf-c-card--child--PaddingLeft: 0;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ describe.only('<Project />', () => {
|
|||||||
'.pf-c-tabs__item',
|
'.pf-c-tabs__item',
|
||||||
el => el.length === 5
|
el => el.length === 5
|
||||||
);
|
);
|
||||||
expect(tabs.last().text()).toEqual('Notifications');
|
expect(tabs.at(2).text()).toEqual('Notifications');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user