Browse files

better error messages for downtime

  • Loading branch information...
1 parent adc02ea commit e32a27a7bde46986ff4a6a97d9dbd7d8962c1db7 Jordan Evans committed with Mike Cooper Aug 12, 2011
Showing with 6 additions and 4 deletions.
  1. +4 −2 railroad/static/js/configurator.js
  2. +2 −2 railroad/templates/form.html
View
6 railroad/static/js/configurator.js
@@ -143,7 +143,7 @@ $(document).ready(function() {
});
hosts = hosts.uniqueList();
expr = hosts.join(' or ')
- } else {
+ } else if ($('#downtime-service').prop('checked')) {
var hosts = [];
var services = [];
var objs = [];
@@ -160,6 +160,8 @@ $(document).ready(function() {
}
objs = objs.uniqueList();
expr = '(' + (objs.join(') or (')) + ')';
+ } else {
+ makeDowntimeError('Please choose to downtime by host or service');
}
if (!expr) {
@@ -208,7 +210,7 @@ $(document).ready(function() {
},
error: function (jqXHR, textStatus, errorThrown) {
console.log(textStatus + ': ' + jqXHR.responseText);
- makeDowntimeError("There was an error.");
+ makeDowntimeError(jqXHR.responseText);
$('#downtimeLoading').remove();
}
});
View
4 railroad/templates/form.html
@@ -42,11 +42,11 @@
</p>
<ul class="fieldset_ul">
<li>
- <label class="from">From</label>
+ <label class="from">Start</label>
<input type="text" id="downtime-from" />
</li>
<li>
- <label class="to">To</label>
+ <label class="to">Stop</label>
<input type="text" id="downtime-to" />
</li>
<li>

0 comments on commit e32a27a

Please sign in to comment.