Update UI when IP address is unavailable and project is created via auctions
This commit is contained in:
parent
6dcee29487
commit
90e9260eb6
@ -62,31 +62,39 @@ const Domains = () => {
|
|||||||
headingText="Domains"
|
headingText="Domains"
|
||||||
button={
|
button={
|
||||||
<>
|
<>
|
||||||
<Button
|
{!project.auctionId && (
|
||||||
as="a"
|
<Button
|
||||||
href="add"
|
as="a"
|
||||||
variant="secondary"
|
href="add"
|
||||||
leftIcon={<PlusIcon />}
|
variant="secondary"
|
||||||
size="md"
|
leftIcon={<PlusIcon />}
|
||||||
>
|
size="md"
|
||||||
Add domain
|
>
|
||||||
</Button>
|
Add domain
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{domains.map((domain) => {
|
{project.auctionId ? (
|
||||||
return (
|
<p className="text-gray-500">
|
||||||
<DomainCard
|
Custom domains not supported for auction driven deployments.
|
||||||
domains={domains}
|
</p>
|
||||||
domain={domain}
|
) : (
|
||||||
key={domain.id}
|
domains.map((domain) => {
|
||||||
// TODO: Use github API for getting linked repository
|
return (
|
||||||
branches={branches}
|
<DomainCard
|
||||||
project={project}
|
domains={domains}
|
||||||
onUpdate={fetchDomains}
|
domain={domain}
|
||||||
/>
|
key={domain.id}
|
||||||
);
|
// TODO: Use github API for getting linked repository
|
||||||
})}
|
branches={branches}
|
||||||
|
project={project}
|
||||||
|
onUpdate={fetchDomains}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
)}
|
||||||
</ProjectSettingContainer>
|
</ProjectSettingContainer>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -74,9 +74,9 @@ const Config = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const dnsData = await client.getLatestDNSDataByProjectId(id);
|
const dnsData = await client.getLatestDNSDataByProjectId(id);
|
||||||
|
|
||||||
setIPAddress(dnsData.value);
|
setIPAddress(dnsData.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
fetchDNSData();
|
fetchDNSData();
|
||||||
@ -102,18 +102,25 @@ const Config = () => {
|
|||||||
<Table.Row>
|
<Table.Row>
|
||||||
<Table.RowHeaderCell>A</Table.RowHeaderCell>
|
<Table.RowHeaderCell>A</Table.RowHeaderCell>
|
||||||
<Table.Cell>@</Table.Cell>
|
<Table.Cell>@</Table.Cell>
|
||||||
<Table.Cell>{IPAddress ?? 'Not Configured'}</Table.Cell>
|
<Table.Cell>
|
||||||
|
<p className={!IPAddress ? 'text-red-500' : ''}>
|
||||||
|
{IPAddress ?? 'Not available'}
|
||||||
|
</p>
|
||||||
|
</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
</Table.Body>
|
</Table.Body>
|
||||||
</Table>
|
</Table>
|
||||||
|
|
||||||
<InlineNotification
|
{IPAddress && (
|
||||||
variant="info"
|
<InlineNotification
|
||||||
title={`It can take up to 48 hours for these updates to reflect
|
variant="info"
|
||||||
|
title={`It can take up to 48 hours for these updates to reflect
|
||||||
globally.`}
|
globally.`}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
className="w-fit"
|
className="w-fit"
|
||||||
|
disabled={!IPAddress}
|
||||||
onClick={handleSubmitDomain}
|
onClick={handleSubmitDomain}
|
||||||
variant="primary"
|
variant="primary"
|
||||||
shape="default"
|
shape="default"
|
||||||
|
Loading…
Reference in New Issue
Block a user