1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-11 19:44:35 +00:00

fix(editor): fixed log/webout/print tabs

This commit is contained in:
Yury Shkoda
2023-05-01 07:28:23 +03:00
parent 6dd2f4f876
commit d2de9dc13e

View File

@@ -62,6 +62,7 @@ const SASjsEditor = ({
selectedRunTime, selectedRunTime,
showDiff, showDiff,
webout, webout,
printOutput,
Dialog, Dialog,
handleChangeRunTime, handleChangeRunTime,
handleDiffEditorDidMount, handleDiffEditorDidMount,
@@ -153,6 +154,7 @@ const SASjsEditor = ({
> >
<TabList onChange={handleTabChange} centered> <TabList onChange={handleTabChange} centered>
<StyledTab label="Code" value="code" /> <StyledTab label="Code" value="code" />
{log && (
<StyledTab <StyledTab
label={logWithErrorsOrWarnings ? '' : 'log'} label={logWithErrorsOrWarnings ? '' : 'log'}
value="log" value="log"
@@ -169,6 +171,8 @@ const SASjsEditor = ({
if (logWrapper) logWrapper.scrollTop = 0 if (logWrapper) logWrapper.scrollTop = 0
}} }}
/> />
)}
{webout && (
<StyledTab <StyledTab
label={ label={
<Tooltip title="Displays content from the _webout fileref"> <Tooltip title="Displays content from the _webout fileref">
@@ -177,6 +181,8 @@ const SASjsEditor = ({
} }
value="webout" value="webout"
/> />
)}
{printOutput && <StyledTab label="print" value="printOutput" />}
</TabList> </TabList>
</Box> </Box>
@@ -222,11 +228,20 @@ const SASjsEditor = ({
<LogComponent log={log} selectedRunTime={selectedRunTime} /> <LogComponent log={log} selectedRunTime={selectedRunTime} />
)} )}
</StyledTabPanel> </StyledTabPanel>
{webout && (
<StyledTabPanel value="webout"> <StyledTabPanel value="webout">
<div> <div>
<pre>{webout}</pre> <pre>{webout}</pre>
</div> </div>
</StyledTabPanel> </StyledTabPanel>
)}
{printOutput && (
<StyledTabPanel value="printOutput">
<div>
<pre>{printOutput}</pre>
</div>
</StyledTabPanel>
)}
</TabContext> </TabContext>
)} )}
<Dialog /> <Dialog />