Added tree-like hierarchy to active scripts

This commit is contained in:
Olivier Gagnon
2021-09-18 00:31:14 -04:00
parent d1cb5b313a
commit 6f20b0bc30
4 changed files with 16 additions and 10 deletions
@@ -59,11 +59,13 @@ export function WorkerScriptAccordion(props: IProps): React.ReactElement {
return (
<>
<ListItemButton onClick={() => setOpen((old) => !old)} component={Paper}>
<ListItemText primary={<Typography style={{ whiteSpace: "pre-wrap" }}>{props.workerScript.name}</Typography>} />
<ListItemText
primary={<Typography style={{ whiteSpace: "pre-wrap" }}> {props.workerScript.name}</Typography>}
/>
{open ? <ExpandLess /> : <ExpandMore />}
</ListItemButton>
<Collapse in={open} timeout={0} unmountOnExit>
<Box m={3}>
<Box mx={4}>
<pre>Threads: {numeralWrapper.formatThreads(props.workerScript.scriptRef.threads)}</pre>
<pre>Args: {arrayToString(props.workerScript.args)}</pre>
<pre>Online Time: {convertTimeMsToTimeElapsedString(scriptRef.onlineRunningTime * 1e3)}</pre>