Changed name for dependencies tabs and added the digest number for each layer

Signed-off-by: Amelia-Maria Breda <ambreda@cisco.com>
This commit is contained in:
Amelia-Maria Breda 2022-10-10 11:12:05 +01:00 committed by Raul Kele
parent d1bf977871
commit d4788e4192

View File

@ -215,7 +215,30 @@ function HistoryLayers(props) {
</div>
)}
{!isLoaded ? <Loading /> : renderHistoryData()}
{isLoaded && historyData && (
<Card className={classes.card} raised>
<CardContent className={classes.content}>
<Grid item xs={11}>
<Stack sx={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
<Typography variant="body1" align="left" className={classes.title}>
Command
</Typography>
<Typography variant="body1" align="left" className={classes.values}>
{transform.formatBytes(historyData[selectedIndex].Layer?.Size)}
</Typography>
</Stack>
</Grid>
<Typography variant="body1" align="left" className={classes.title} sx={{ backgroundColor: '#F7F7F7' }}>
{historyData[selectedIndex].HistoryDescription?.CreatedBy}
</Typography>
{!historyData[selectedIndex].HistoryDescription?.EmptyLayer ? (
<Typography>#: {historyData[selectedIndex].Layer?.Digest}</Typography>
) : (
<Typography></Typography>
)}
</CardContent>
</Card>
)}
</div>
);
}