mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Download all log files from compiles.sharelatex.env (#833)
* add a couple of missing buildPdfDownloadUrl * only download pdfs from compile server when streaming * use compiles.env for resonse files * update config to use clsi_lb
This commit is contained in:
parent
53a9a174a2
commit
7a253e56ef
2 changed files with 8 additions and 5 deletions
|
@ -135,6 +135,7 @@ module.exports = settings =
|
||||||
url: "http://#{process.env['FILESTORE_HOST'] or 'localhost'}:3009"
|
url: "http://#{process.env['FILESTORE_HOST'] or 'localhost'}:3009"
|
||||||
clsi:
|
clsi:
|
||||||
url: "http://#{process.env['CLSI_HOST'] or 'localhost'}:3013"
|
url: "http://#{process.env['CLSI_HOST'] or 'localhost'}:3013"
|
||||||
|
# url: "http://#{process.env['CLSI_LB_HOST']}:3014"
|
||||||
backendGroupName: undefined
|
backendGroupName: undefined
|
||||||
templates:
|
templates:
|
||||||
url: "http://#{process.env['TEMPLATES_HOST'] or 'localhost'}:3007"
|
url: "http://#{process.env['TEMPLATES_HOST'] or 'localhost'}:3007"
|
||||||
|
@ -340,7 +341,7 @@ module.exports = settings =
|
||||||
# disablePerUserCompiles: true
|
# disablePerUserCompiles: true
|
||||||
|
|
||||||
# Domain the client (pdfjs) should download the compiled pdf from
|
# Domain the client (pdfjs) should download the compiled pdf from
|
||||||
# pdfDownloadDomain: "http://compiles.sharelatex.test:3014"
|
# pdfDownloadDomain: "http://clsi-lb:3014"
|
||||||
|
|
||||||
# Maximum size of text documents in the real-time editing system.
|
# Maximum size of text documents in the real-time editing system.
|
||||||
max_doc_length: 2 * 1024 * 1024 # 2mb
|
max_doc_length: 2 * 1024 * 1024 # 2mb
|
||||||
|
|
|
@ -225,7 +225,8 @@ define [
|
||||||
}, {params: params}
|
}, {params: params}
|
||||||
|
|
||||||
buildPdfDownloadUrl = (pdfDownloadDomain, path)->
|
buildPdfDownloadUrl = (pdfDownloadDomain, path)->
|
||||||
if pdfDownloadDomain?
|
#we only download builds from compiles server for security reasons
|
||||||
|
if pdfDownloadDomain? and path.indexOf("build") != -1
|
||||||
return "#{pdfDownloadDomain}#{path}"
|
return "#{pdfDownloadDomain}#{path}"
|
||||||
else
|
else
|
||||||
return path
|
return path
|
||||||
|
@ -378,14 +379,15 @@ define [
|
||||||
compileGroup:ide.compileGroup
|
compileGroup:ide.compileGroup
|
||||||
clsiserverid:ide.clsiServerId
|
clsiserverid:ide.clsiServerId
|
||||||
if file?.url? # FIXME clean this up when we have file.urls out consistently
|
if file?.url? # FIXME clean this up when we have file.urls out consistently
|
||||||
opts.url = buildPdfDownloadUrl options.pdfDownloadDomain, file.url
|
opts.url = file.url
|
||||||
else if file?.build?
|
else if file?.build?
|
||||||
opts.url = buildPdfDownloadUrl options.pdfDownloadDomain, "/project/#{$scope.project_id}/build/#{file.build}/output/#{name}"
|
opts.url = "/project/#{$scope.project_id}/build/#{file.build}/output/#{name}"
|
||||||
else
|
else
|
||||||
opts.url = buildPdfDownloadUrl options.pdfDownloadDomain, "/project/#{$scope.project_id}/output/#{name}"
|
opts.url = "/project/#{$scope.project_id}/output/#{name}"
|
||||||
# check if we need to bust cache (build id is unique so don't need it in that case)
|
# check if we need to bust cache (build id is unique so don't need it in that case)
|
||||||
if not file?.build?
|
if not file?.build?
|
||||||
opts.params.cache_bust = "#{Date.now()}"
|
opts.params.cache_bust = "#{Date.now()}"
|
||||||
|
opts.url = buildPdfDownloadUrl options.pdfDownloadDomain, opts.url
|
||||||
return $http(opts)
|
return $http(opts)
|
||||||
|
|
||||||
# accumulate the log entries
|
# accumulate the log entries
|
||||||
|
|
Loading…
Reference in a new issue