style(striker-ui): fix style linting errors in components

main
Tsu-ba-me 3 years ago
parent c2f38a3f00
commit 0db0a94a05
  1. 13
      striker-ui/components/Hosts/AnvilHost.tsx
  2. 18
      striker-ui/components/Resource/ResourceVolumes.tsx

@ -73,7 +73,8 @@ const AnvilHost = ({
return ( return (
<Box className={classes.root}> <Box className={classes.root}>
{hosts && {hosts &&
hosts.map((host): JSX.Element => { hosts.map(
(host): JSX.Element => {
return ( return (
<InnerPanel key={host.host_uuid}> <InnerPanel key={host.host_uuid}>
<PanelHeader> <PanelHeader>
@ -103,10 +104,13 @@ const AnvilHost = ({
<Switch <Switch
checked={host.state === 'online'} checked={host.state === 'online'}
onChange={() => onChange={() =>
putFetch(`${process.env.NEXT_PUBLIC_API_URL}/set_power`, { putFetch(
`${process.env.NEXT_PUBLIC_API_URL}/set_power`,
{
host_uuid: host.host_uuid, host_uuid: host.host_uuid,
is_on: !(host.state === 'online'), is_on: !(host.state === 'online'),
}) },
)
} }
/> />
</Box> </Box>
@ -150,7 +154,8 @@ const AnvilHost = ({
)} )}
</InnerPanel> </InnerPanel>
); );
})} },
)}
</Box> </Box>
); );
}; };

@ -78,7 +78,8 @@ const ResourceVolumes = ({
</Box> </Box>
</Box> </Box>
</PanelHeader> </PanelHeader>
{volume.connections.map((connection, index): JSX.Element => { {volume.connections.map(
(connection, index): JSX.Element => {
return ( return (
<> <>
<Box <Box
@ -89,14 +90,20 @@ const ResourceVolumes = ({
> >
<Box className={classes.decoratorBox}> <Box className={classes.decoratorBox}>
<Decorator <Decorator
colour={selectDecorator(connection.connection_state)} colour={selectDecorator(
connection.connection_state,
)}
/> />
</Box> </Box>
<Box> <Box>
<Box display="flex" width="100%"> <Box display="flex" width="100%">
<BodyText text={connection.targets[0].target_name} /> <BodyText
text={connection.targets[0].target_name}
/>
<InsertLinkIcon style={{ color: DIVIDER }} /> <InsertLinkIcon style={{ color: DIVIDER }} />
<BodyText text={connection.targets[1].target_name} /> <BodyText
text={connection.targets[1].target_name}
/>
</Box> </Box>
<Box <Box
display="flex" display="flex"
@ -112,7 +119,8 @@ const ResourceVolumes = ({
) : null} ) : null}
</> </>
); );
})} },
)}
</InnerPanel> </InnerPanel>
); );
})} })}

Loading…
Cancel
Save