Merge pull request #28560 from esw-afabiano/af/resize-logs-scaffolder

Change in scaffolder streaming logs screen
This commit is contained in:
Ben Lambert
2025-01-27 13:53:49 +01:00
committed by GitHub
3 changed files with 34 additions and 15 deletions
@@ -20,7 +20,6 @@ import Box from '@material-ui/core/Box';
import Button from '@material-ui/core/Button';
import Paper from '@material-ui/core/Paper';
import { makeStyles } from '@material-ui/core/styles';
import { ResizableBox } from 'react-resizable';
import {
ScaffolderTaskOutput,
scaffolderApiRef,
@@ -119,6 +118,7 @@ export const OngoingTask = (props: {
useEffect(() => {
if (taskStream.completed && !taskStream.error) {
setLogVisibleState(true);
setButtonBarVisibleState(false);
}
}, [taskStream.error, taskStream.completed]);
@@ -292,13 +292,11 @@ export const OngoingTask = (props: {
) : null}
{logsVisible ? (
<ResizableBox height={240} minConstraints={[0, 160]} axis="y">
<Paper style={{ height: '100%' }}>
<Box padding={2} height="100%">
<TaskLogStream logs={taskStream.stepLogs} />
</Box>
</Paper>
</ResizableBox>
<Paper style={{ height: '100%' }}>
<Box padding={2} height="100%">
<TaskLogStream logs={taskStream.stepLogs} />
</Box>
</Paper>
) : null}
</Content>
</Page>