mirror of
https://github.com/sasjs/server.git
synced 2025-12-11 03:34:35 +00:00
fix(log): fixed parsing log for different runtime
This commit is contained in:
@@ -170,18 +170,23 @@ const useEditor = ({
|
|||||||
runTime: selectedRunTime
|
runTime: selectedRunTime
|
||||||
})
|
})
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const { errors, warnings, logLines } = parseErrorsAndWarnings(
|
if (selectedRunTime === RunTimeType.SAS) {
|
||||||
res.data.split(SASJS_LOGS_SEPARATOR)[1]
|
const { errors, warnings, logLines } = parseErrorsAndWarnings(
|
||||||
)
|
res.data.split(SASJS_LOGS_SEPARATOR)[1]
|
||||||
|
)
|
||||||
|
|
||||||
const log: LogObject = {
|
const log: LogObject = {
|
||||||
body: logLines.join(`\n`),
|
body: logLines.join(`\n`),
|
||||||
errors,
|
errors,
|
||||||
warnings
|
warnings
|
||||||
|
}
|
||||||
|
|
||||||
|
setLog(log)
|
||||||
|
} else {
|
||||||
|
setLog(res.data.split(SASJS_LOGS_SEPARATOR)[1] ?? '')
|
||||||
}
|
}
|
||||||
|
|
||||||
setWebout(res.data.split(SASJS_LOGS_SEPARATOR)[0] ?? '')
|
setWebout(res.data.split(SASJS_LOGS_SEPARATOR)[0] ?? '')
|
||||||
setLog(log)
|
|
||||||
setTab('log')
|
setTab('log')
|
||||||
|
|
||||||
// Scroll to bottom of log
|
// Scroll to bottom of log
|
||||||
|
|||||||
Reference in New Issue
Block a user