diff --git a/services/web/app/views/project/editor/pdf.jade b/services/web/app/views/project/editor/pdf.jade index 843ff07c6c..a19e374736 100644 --- a/services/web/app/views/project/editor/pdf.jade +++ b/services/web/app/views/project/editor/pdf.jade @@ -74,8 +74,9 @@ div.full-size.pdf(ng-controller="PdfController") ) i.split-screen i.split-screen - - .pdf-viewer(ng-show="pdf.url && pdf.view == 'pdf' && !pdf.failure && !pdf.timeout && !pdf.error && !pdf.renderingError") + // end of toolbar + + .pdf-viewer(ng-show="pdf.url && pdf.view == 'pdf' && !pdf.failure && !pdf.timeout && !pdf.error && !pdf.renderingError && !pdf.clsiMaintenance") div( pdfng ng-if="settings.pdfViewer == 'pdfjs'" @@ -96,12 +97,15 @@ div.full-size.pdf(ng-controller="PdfController") |   i.fa.fa-level-up.fa-flip-horizontal.fa-2x |   #{translate('click_here_to_preview_pdf')} - - .pdf-errors(ng-show="(pdf.timedout || pdf.error || pdf.renderingError) && pdf.view != 'logs'") + + .pdf-errors(ng-show="(pdf.timedout || pdf.error || pdf.renderingError || pdf.clsiMaintenance) && pdf.view != 'logs'") .alert.alert-danger(ng-show="pdf.error || pdf.renderingError") strong #{translate("server_error")} span #{translate("somthing_went_wrong_compiling")} + .alert.alert-danger(ng-show="pdf.clsiMaintenance") + strong #{translate("server_error")} + span #{translate("clsi_maintenance")} .alert.alert-danger(ng-show="pdf.timedout") p @@ -158,10 +162,6 @@ div.full-size.pdf(ng-controller="PdfController") span #{translate("project_too_large_please_reduce")} - - - - .pdf-logs(ng-show="(pdf.view == 'logs' || pdf.failure) && !pdf.error && !pdf.timeout && !pdf.uncompiled") .alert.alert-success(ng-show="pdf.logEntries.all.length == 0") | #{translate("no_errors_good_job")} diff --git a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee index 10d6a1f51b..7dbeaee59f 100644 --- a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee +++ b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee @@ -37,6 +37,7 @@ define [ $scope.pdf.uncompiled = false $scope.pdf.projectTooLarge = false $scope.pdf.url = null + $scope.pdf.clsiMaintenance = false if response.status == "timedout" $scope.pdf.timedout = true @@ -47,6 +48,8 @@ define [ else if response.status == "failure" $scope.pdf.failure = true fetchLogs() + else if response.status == 'clsi-maintenance' + $scope.pdf.clsiMaintenance = true else if response.status == "success" # define the base url $scope.pdf.url = "/project/#{$scope.project_id}/output/output.pdf?cache_bust=#{Date.now()}"