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:
@@ -62,6 +62,7 @@ const SASjsEditor = ({
|
|||||||
selectedRunTime,
|
selectedRunTime,
|
||||||
showDiff,
|
showDiff,
|
||||||
webout,
|
webout,
|
||||||
|
printOutput,
|
||||||
Dialog,
|
Dialog,
|
||||||
handleChangeRunTime,
|
handleChangeRunTime,
|
||||||
handleDiffEditorDidMount,
|
handleDiffEditorDidMount,
|
||||||
@@ -153,30 +154,35 @@ const SASjsEditor = ({
|
|||||||
>
|
>
|
||||||
<TabList onChange={handleTabChange} centered>
|
<TabList onChange={handleTabChange} centered>
|
||||||
<StyledTab label="Code" value="code" />
|
<StyledTab label="Code" value="code" />
|
||||||
<StyledTab
|
{log && (
|
||||||
label={logWithErrorsOrWarnings ? '' : 'log'}
|
<StyledTab
|
||||||
value="log"
|
label={logWithErrorsOrWarnings ? '' : 'log'}
|
||||||
icon={
|
value="log"
|
||||||
logWithErrorsOrWarnings ? (
|
icon={
|
||||||
<LogTabWithIcons log={log as LogObject} />
|
logWithErrorsOrWarnings ? (
|
||||||
) : (
|
<LogTabWithIcons log={log as LogObject} />
|
||||||
''
|
) : (
|
||||||
)
|
''
|
||||||
}
|
)
|
||||||
onClick={() => {
|
}
|
||||||
const logWrapper = document.querySelector(`#logWrapper`)
|
onClick={() => {
|
||||||
|
const logWrapper = document.querySelector(`#logWrapper`)
|
||||||
|
|
||||||
if (logWrapper) logWrapper.scrollTop = 0
|
if (logWrapper) logWrapper.scrollTop = 0
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<StyledTab
|
)}
|
||||||
label={
|
{webout && (
|
||||||
<Tooltip title="Displays content from the _webout fileref">
|
<StyledTab
|
||||||
<Typography>Webout</Typography>
|
label={
|
||||||
</Tooltip>
|
<Tooltip title="Displays content from the _webout fileref">
|
||||||
}
|
<Typography>Webout</Typography>
|
||||||
value="webout"
|
</Tooltip>
|
||||||
/>
|
}
|
||||||
|
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>
|
||||||
<StyledTabPanel value="webout">
|
{webout && (
|
||||||
<div>
|
<StyledTabPanel value="webout">
|
||||||
<pre>{webout}</pre>
|
<div>
|
||||||
</div>
|
<pre>{webout}</pre>
|
||||||
</StyledTabPanel>
|
</div>
|
||||||
|
</StyledTabPanel>
|
||||||
|
)}
|
||||||
|
{printOutput && (
|
||||||
|
<StyledTabPanel value="printOutput">
|
||||||
|
<div>
|
||||||
|
<pre>{printOutput}</pre>
|
||||||
|
</div>
|
||||||
|
</StyledTabPanel>
|
||||||
|
)}
|
||||||
</TabContext>
|
</TabContext>
|
||||||
)}
|
)}
|
||||||
<Dialog />
|
<Dialog />
|
||||||
|
|||||||
Reference in New Issue
Block a user