mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Show logs when compile fails correctly
This commit is contained in:
parent
35442f7ce9
commit
3452a9870e
1 changed files with 7 additions and 5 deletions
|
@ -48,6 +48,11 @@ define [
|
||||||
$scope.pdf.tooRecentlyCompiled = false
|
$scope.pdf.tooRecentlyCompiled = false
|
||||||
$scope.pdf.renderingError = false
|
$scope.pdf.renderingError = false
|
||||||
|
|
||||||
|
# make a cache to look up files by name
|
||||||
|
fileByPath = {}
|
||||||
|
for file in response.outputFiles
|
||||||
|
fileByPath[file.path] = file
|
||||||
|
|
||||||
if response.status == "timedout"
|
if response.status == "timedout"
|
||||||
$scope.pdf.view = 'errors'
|
$scope.pdf.view = 'errors'
|
||||||
$scope.pdf.timedout = true
|
$scope.pdf.timedout = true
|
||||||
|
@ -60,7 +65,7 @@ define [
|
||||||
$scope.pdf.view = 'errors'
|
$scope.pdf.view = 'errors'
|
||||||
$scope.pdf.failure = true
|
$scope.pdf.failure = true
|
||||||
$scope.shouldShowLogs = true
|
$scope.shouldShowLogs = true
|
||||||
fetchLogs()
|
fetchLogs(fileByPath['output.log'], fileByPath['output.blg'])
|
||||||
else if response.status == 'clsi-maintenance'
|
else if response.status == 'clsi-maintenance'
|
||||||
$scope.pdf.view = 'errors'
|
$scope.pdf.view = 'errors'
|
||||||
$scope.pdf.clsiMaintenance = true
|
$scope.pdf.clsiMaintenance = true
|
||||||
|
@ -71,10 +76,6 @@ define [
|
||||||
$scope.pdf.view = 'pdf'
|
$scope.pdf.view = 'pdf'
|
||||||
$scope.shouldShowLogs = false
|
$scope.shouldShowLogs = false
|
||||||
|
|
||||||
# make a cache to look up files by name
|
|
||||||
fileByPath = {}
|
|
||||||
for file in response.outputFiles
|
|
||||||
fileByPath[file.path] = file
|
|
||||||
# prepare query string
|
# prepare query string
|
||||||
qs = {}
|
qs = {}
|
||||||
# define the base url. if the pdf file has a build number, pass it to the clsi in the url
|
# define the base url. if the pdf file has a build number, pass it to the clsi in the url
|
||||||
|
@ -123,6 +124,7 @@ define [
|
||||||
fetchLogs = (logFile, blgFile) ->
|
fetchLogs = (logFile, blgFile) ->
|
||||||
|
|
||||||
getFile = (name, file) ->
|
getFile = (name, file) ->
|
||||||
|
console.log "[getFile]", name, file
|
||||||
opts =
|
opts =
|
||||||
method:"GET"
|
method:"GET"
|
||||||
params:
|
params:
|
||||||
|
|
Loading…
Reference in a new issue