mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 23:16:01 -03:30
fix inventory saving without insights credential specified
This commit is contained in:
@@ -16,7 +16,7 @@ import ErrorDetail from '@components/ErrorDetail';
|
|||||||
|
|
||||||
const EmptyState = styled(PFEmptyState)`
|
const EmptyState = styled(PFEmptyState)`
|
||||||
width: var(--pf-c-empty-state--m-lg--MaxWidth);
|
width: var(--pf-c-empty-state--m-lg--MaxWidth);
|
||||||
max-width: 100%;
|
margin: 0 auto;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
async function logout() {
|
async function logout() {
|
||||||
|
|||||||
@@ -54,7 +54,9 @@ function InventoryAdd({ history, i18n }) {
|
|||||||
data: { id: inventoryId },
|
data: { id: inventoryId },
|
||||||
} = await InventoriesAPI.create({
|
} = await InventoriesAPI.create({
|
||||||
organization: organization.id,
|
organization: organization.id,
|
||||||
insights_credential: insights_credential.id,
|
insights_credential: insights_credential
|
||||||
|
? insights_credential.id
|
||||||
|
: null,
|
||||||
...remainingValues,
|
...remainingValues,
|
||||||
});
|
});
|
||||||
if (instanceGroups) {
|
if (instanceGroups) {
|
||||||
@@ -74,7 +76,15 @@ function InventoryAdd({ history, i18n }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
return <ContentError />;
|
return (
|
||||||
|
<PageSection>
|
||||||
|
<Card>
|
||||||
|
<CardBody>
|
||||||
|
<ContentError error={error} />
|
||||||
|
</CardBody>
|
||||||
|
</Card>
|
||||||
|
</PageSection>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return <ContentLoading />;
|
return <ContentLoading />;
|
||||||
|
|||||||
Reference in New Issue
Block a user