var updateCheckState = function(check) {
  var html = '';
  if (typeof check.isUp == 'undefined') {
    if (check.lastTested) {
      // recover from pause
      html += '<span class="label label-info">unknown</span>';
    } else {
      // never tested
      html += '<span class="label label-danger">down</span> <span class="label label-warning">new</span>';
    }
  } else {
    var status = {};
    if (check.isPaused) {
      // paused
      status.label = 'info';
      status.text = 'paused';
      status.date = check.lastTested;
    } else if (check.isUp) {
      // up
      status.label = 'success';
      status.text = 'up';
      status.date = check.lastChanged;
    } else {
      // down
      status.label = 'danger';
<<<<<<< HEAD:app/dashboard/public/javascripts/checkState.js
      status.color = 'red';
=======
>>>>>>> phanan/master:app/dashboard/src/js/checkState.js
      status.text = 'down';
      status.date = check.lastChanged;
    }
    html += '<span class="label label-' + status.label + '">' +  status.text +'</span>'
    html += '<span class="text-' + status.label + '"> for <span title="' + new Date(status.date) + '">' + moment(status.date).fromNow(true) + '</span></span>';
  }
  $('#check_24h').html(html);
}

var updateCheckState = function(check) {
  var html = '';
  if (typeof check.isUp == 'undefined') {
    if (check.lastTested) {
      // recover from pause
      html += '<span class="label label-info">unknown</span>';
    } else {
      // never tested
      html += '<span class="label label-danger">down</span> <span class="label label-warning">new</span>';
    }
  } else {
    var status = {};
    if (check.isPaused) {
      // paused
      status.label = 'info';
      status.text = 'paused';
      status.date = check.lastTested;
    } else if (check.isUp) {
      // up
      status.label = 'success';
      status.text = 'up';
      status.date = check.lastChanged;
    } else {
      // down
      status.label = 'danger';
      status.text = 'down';
      status.date = check.lastChanged;
    }
    html += '<span class="label label-' + status.label + '">' +  status.text +'</span>'
    html += '<span class="text-' + status.label + '"> for <span title="' + new Date(status.date) + '">' + moment(status.date).fromNow(true) + '</span></span>';
  }
  $('#check_24h').html(html);
}

Fix phanan conflict remnants