Add the beginnings of a clsi-maintenance-mode message

This commit is contained in:
Shane Kilkelly 2016-03-21 15:00:25 +00:00
parent 3b35605edc
commit 53dfa841cc
2 changed files with 11 additions and 8 deletions

View file

@ -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")}

View file

@ -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()}"