fix(my-joy-beta): fix custom image on summary

This commit is contained in:
Sérgio Ramos 2018-01-04 11:22:32 +00:00 committed by Sérgio Ramos
parent a9ef5f91ba
commit 28f44d943f
2 changed files with 8 additions and 4 deletions

View File

@ -158,7 +158,9 @@ export const Meta = ({
</Row>,
<Margin top={2} bottom={3}>
<Flex>
<Label>{image ? titleCase(image.name) : 'Custom Image'}</Label>
<Label>
{image && image.name ? titleCase(image.name) : 'Custom Image'}
</Label>
<VerticalDivider />
<Label>
{brand === 'LX'
@ -354,9 +356,10 @@ export default withTheme(
/>
<CopiableField text={instance.id} label="ID" />
<CopiableField text={instance.compute_node} label="CN UUID" />
{instance.image && (
<CopiableField text={instance.image.id} label="Image UUID" />
)}
{instance.image &&
instance.image.id && (
<CopiableField text={instance.image.id} label="Image UUID" />
)}
<CopiableField
text={`ssh root@${instance.primary_ip}`}
label="Login"

View File

@ -2,6 +2,7 @@ query instance($name: String) {
machines(name: $name) {
id
state
brand
name
created
updated