Skip to content

Commit

Permalink
Merge pull request #80 from lucidsoftware/PROD-1577-more-pause-messaging
Browse files Browse the repository at this point in the history
PROD-1577 Make pause dialog red and bold in production environments
  • Loading branch information
tmccombs authored Jan 20, 2020
2 parents d621576 + fdcbb46 commit a06fe25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
16 changes: 10 additions & 6 deletions admin/app/com/lucidchart/piezo/admin/views/job.scala.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import com.lucidchart.piezo.admin.controllers.{routes=>piezoRoutes}
@import com.lucidchart.piezo.admin.views
@import play.api.Play.{current,configuration}
@import java.net.URLEncoder
@import org.quartz.TriggerKey
@(
Expand Down Expand Up @@ -71,12 +72,15 @@ <h4>This will permanently delete the job!</h4>
<button type="button" class="btn btn-danger" onclick="deleteJob()">Delete</button>
<button type="button" class="btn btn-default" onclick="$('#deleteConfirm').hide()">Cancel</button>
</div>
<!-- Pause Job Alerts -->
<div id="pauseConfirm" style="display:none;" class="alert alert-warning fade in">
<h4>Are you sure you want to pause the job?</h4>
<button type="button" class="btn btn-warning" onclick="pauseJob()">Pause</button>
<button type="button" class="btn btn-default" onclick="$('#pauseConfirm').hide()">Cancel</button>
</div>
@defining(configuration.getBoolean("com.lucidchart.piezo.admin.production").contains(true)) { inProd =>
<!-- Pause Job Alerts -->
<div id="pauseConfirm" style="display: none;" class="alert alert-@if(inProd) {danger} else {warning} fade in">
<h4>Are you sure you want to pause the job?</h4>
@if(inProd) {<h2><b>THIS IS IN PRODUCTION!!!</b></h2>}
<button type="button" class="btn btn-@if(inProd) {danger} else {warning}" onclick="pauseJob()">Pause</button>
<button type="button" class="btn btn-default" onclick="$('#pauseConfirm').hide()">Cancel</button>
</div>
}
<script>
var deleteConfirm = $('#deleteError');
var deleteError = $('#deleteConfirm');
Expand Down
1 change: 1 addition & 0 deletions admin/conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ application.langs="en"
# You can disable evolutions if needed
# evolutionplugin=disabled
com.lucidchart.piezo.heartbeatFile="/tmp/piezo/workerHeartbeatFile"
com.lucidchart.piezo.admin.production=false
healthCheck.worker.minutesBetween=5

0 comments on commit a06fe25

Please sign in to comment.