Skip to content

Commit

Permalink
hosts section
Browse files Browse the repository at this point in the history
  • Loading branch information
tiyiprh committed Jul 15, 2024
1 parent 433474a commit da351fe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion cypress/support/hostsfunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function createAndCheckHost(host_type: string, inventory: string) {

// create host
cy.clickButton(/^Create host$/);
cy.verifyPageTitle('Create Host');
cy.verifyPageTitle('Create host');
cy.getByDataCy('name').type(hostName);
cy.getByDataCy('description').type('This is the description');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,21 @@ export function CreateHost() {
}),
}
: {},
{ label: t('Add') },
{ label: t('Create host') },
];
} else {
breadcrumbs = [
{
label: t('Hosts'),
to: getPageUrl(AwxRoute.Hosts),
},
{ label: t('Create') },
{ label: t('Create host') },
];
}

return (
<PageLayout>
<PageHeader breadcrumbs={breadcrumbs} title={t('Create Host')} />
<PageHeader breadcrumbs={breadcrumbs} title={t('Create host')} />
<AwxPageForm
submitText={t('Create host')}
onSubmit={onSubmit}
Expand Down Expand Up @@ -256,31 +256,24 @@ export function EditHost() {
},
}),
},
{
label: t(`${hostResponse?.name}`),
to: getPageUrl(AwxRoute.InventoryHostDetails, {
params: {
id: params.id,
inventory_type: params.inventory_type,
host_id: params.host_id,
},
}),
},
{ label: t('Edit') },
{ label: t('Edit {{hostName}}', { hostName: host?.name }) },
];
} else {
breadcrumbs = [
{
label: t('Hosts'),
to: getPageUrl(AwxRoute.Hosts),
},
{ label: t('Edit') },
{ label: t('Edit {{hostName}}', { hostName: host?.name }) },
];
}

return (
<PageLayout>
<PageHeader breadcrumbs={breadcrumbs} title={t('Edit host')} />
<PageHeader
breadcrumbs={breadcrumbs}
title={t('Edit {{hostName}}', { hostName: host?.name })}
/>
<AwxPageForm<IHostInput>
submitText={t('Save host')}
onSubmit={onSubmit}
Expand Down

0 comments on commit da351fe

Please sign in to comment.