(props)
| 37 | } |
| 38 | |
| 39 | function NodeLoad (props) { |
| 40 | const { node } = props |
| 41 | const sessionCount = node.sessionCount ?? 0 |
| 42 | const currentLoad = sessionCount === 0 |
| 43 | ? 0 |
| 44 | : Math.min(((sessionCount / node.maxSession) * 100), 100).toFixed(2) |
| 45 | |
| 46 | return ( |
| 47 | <Grid item xs={12}> |
| 48 | <Grid |
| 49 | container |
| 50 | justifyContent='space-between' |
| 51 | spacing={2} |
| 52 | > |
| 53 | <Grid item xs={3}> |
| 54 | <Box pt={1} mt={2}> |
| 55 | <Typography |
| 56 | variant='body2' |
| 57 | gutterBottom |
| 58 | > |
| 59 | Sessions: {sessionCount} |
| 60 | </Typography> |
| 61 | </Box> |
| 62 | </Grid> |
| 63 | <Grid item xs={9}> |
| 64 | <Box pt={1} mt={2}> |
| 65 | <Typography |
| 66 | variant='body2' |
| 67 | gutterBottom |
| 68 | > |
| 69 | Max. Concurrency: {node.maxSession} |
| 70 | </Typography> |
| 71 | </Box> |
| 72 | </Grid> |
| 73 | <Grid item xs={12}> |
| 74 | <LinearProgressWithLabel value={Number(currentLoad)} /> |
| 75 | </Grid> |
| 76 | </Grid> |
| 77 | </Grid> |
| 78 | ) |
| 79 | } |
| 80 | |
| 81 | export default NodeLoad |
nothing calls this directly
no outgoing calls
no test coverage detected