diff --git a/services/web/app/coffee/Features/Compile/CompileController.coffee b/services/web/app/coffee/Features/Compile/CompileController.coffee index e52693d4c4..000465a83c 100755 --- a/services/web/app/coffee/Features/Compile/CompileController.coffee +++ b/services/web/app/coffee/Features/Compile/CompileController.coffee @@ -30,7 +30,7 @@ module.exports = CompileController = if req.body?.draft options.draft = req.body.draft if req.body?.check - options.check = if req.body.check is "error" then "error" else "warn" + options.check = if req.body.check is "validate" then "validate" else undefined logger.log {options:options, project_id:project_id, user_id:user_id}, "got compile request" CompileManager.compile project_id, user_id, options, (error, status, outputFiles, clsiServerId, limits, validationProblems) -> return next(error) if error? diff --git a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee index 5a0b232a4c..968cd1b60f 100644 --- a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee +++ b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee @@ -86,7 +86,7 @@ define [ return $http.post url, { rootDoc_id: options.rootDocOverride_id or null draft: $scope.draft - check: if options.check then "error" else "warn" + check: if options.check then "validate" else null _csrf: window.csrfToken }, {params: params} @@ -129,6 +129,12 @@ define [ $scope.pdf.view = 'errors' $scope.pdf.compileTerminated = true fetchLogs(fileByPath) + else if response.status in ["validation-fail", "validation-pass"] + $scope.pdf.view = 'pdf' + $scope.pdf.compileExited = true + $scope.pdf.url = last_pdf_url + $scope.shouldShowLogs = true + fetchLogs(fileByPath) else if response.status == "exited" $scope.pdf.view = 'pdf' $scope.pdf.compileExited = true @@ -249,7 +255,8 @@ define [ else warnings.push result all = [].concat errors, warnings - accumulateResults {type: "ChkTeX", all, errors, warnings} + logHints = HumanReadableLogs.parse {type: "Validation", all, errors, warnings} + accumulateResults logHints processBiber = (log) -> {errors, warnings} = BibLogParser.parse(log, {})