Skip to content
Browse files

Improve error reporting for downtime.

  • Loading branch information...
1 parent 85cf2c2 commit e5d28c0d9486b5234a87b5e23e690f771d06c46f Mike Cooper committed Aug 11, 2011
Showing with 4 additions and 7 deletions.
  1. +4 −7 railroad/static/js/configurator.js
View
11 railroad/static/js/configurator.js
@@ -124,10 +124,11 @@ $(document).ready(function() {
$('#downtime-submit').parent().after(
'<img src="/railroad-static/images/loading.gif" ' +
'id="downtimeLoading" />');
+ $('.cancelcode').remove();
// gather data
var expr = '';
- var checkedServiceRows =
+ var checkedServiceRows =
$('.service_row').filter(
function(index) {
return $(this).find('.controls input')
@@ -186,11 +187,6 @@ $(document).ready(function() {
to = Math.round(to.getTime() / 1000.0);
var comment = $('#downtime-comment').prop('value');
- if (!expr) {
- console.log('no comment');
- return;
- }
-
var user = $('#remoteuserid').text().trim();
var args = [expr, from, to, user, comment]
@@ -210,7 +206,8 @@ $(document).ready(function() {
.format(cancellationCode));
$('#downtimeLoading').remove();
},
- error: function () {
+ error: function (jqXHR, textStatus, errorThrown) {
+ console.log(textStatus + ': ' + jqXHR.responseText);
makeDowntimeError("There was an error.");
$('#downtimeLoading').remove();
}

0 comments on commit e5d28c0

Please sign in to comment.
Something went wrong with that request. Please try again.