Skip to content

Commit

Permalink
Fix login
Browse files Browse the repository at this point in the history
If there's no index or ES is down, then you see the es_down page. That
page has no histogram, so the dashboard.js code was erroring out which
prevented the browserid stuff from setting up and thus you couldn't
log in.

This fixes that.
  • Loading branch information
willkg committed Mar 6, 2013
1 parent 416f03c commit 6015d72
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fjord/analytics/static/js/dashboard.js
@@ -1,4 +1,12 @@
$(function() {
var $histogram = $('.graph .histogram');

// If the histogram isn't on the page, then we're probably looking
// at the es_down template and none of this will work.
if ($histogram.length === 0) {
return;
}

// General widgets.
// Expandos
$('.expando').hide();
Expand Down Expand Up @@ -77,7 +85,6 @@ $(function() {


// Draw histogram in the middle column.
var $histogram = $('.graph .histogram');
var data = $histogram.data('histogram');
colors = {
'happy': '#72BF3E',
Expand Down

0 comments on commit 6015d72

Please sign in to comment.