Grid,
Typography,
} from '@material-ui/core';
+import { useAsyncInterval } from 'common/use-async-interval';
import { ArvadosTheme } from 'common/custom-theme';
import {
CloseIcon,
WordWrapOffIcon,
WordWrapOnIcon,
} from 'components/icon/icon';
-import { Process } from 'store/processes/process';
+import { Process, isProcessRunning } from 'store/processes/process';
import { MPVPanelProps } from 'components/multi-panel-view/multi-panel-view';
import {
FilterOption,
},
logViewer: {
height: '100%',
+ overflowY: 'scroll', // Required for MacOS's Safari -- See #19687
},
logViewerContainer: {
height: '100%',
},
title: {
overflow: 'hidden',
- paddingTop: theme.spacing.unit * 0.5
+ paddingTop: theme.spacing.unit * 0.5,
+ color: theme.customs.colors.greyD
},
iconHeader: {
fontSize: '1.875rem',
- color: theme.customs.colors.green700
+ color: theme.customs.colors.greyL
},
root: {
height: '100%',
onLogFilterChange: (filter: FilterOption) => void;
navigateToLog: (uuid: string) => void;
onCopy: (text: string) => void;
+ pollProcessLogs: (processUuid: string) => Promise<void>;
}
type ProcessLogsCardProps = ProcessLogsCardDataProps
export const ProcessLogsCard = withStyles(styles)(
({ classes, process, filters, selectedFilter, lines,
- onLogFilterChange, navigateToLog, onCopy,
+ onLogFilterChange, navigateToLog, onCopy, pollProcessLogs,
doHidePanel, doMaximizePanel, doUnMaximizePanel, panelMaximized, panelName }: ProcessLogsCardProps) => {
const [wordWrap, setWordWrap] = useState<boolean>(true);
const [fontSize, setFontSize] = useState<number>(3);
const fontBaseSize = 10;
const fontStepSize = 1;
+ useAsyncInterval(() => (
+ pollProcessLogs(process.containerRequest.uuid)
+ ), isProcessRunning(process) ? 2000 : null);
+
return <Grid item className={classes.root} xs={12}>
<Card className={classes.card}>
<CardHeader className={classes.header}
</Card>
</Grid >
});
-