<commit_before>// Default settings
var myColumns = 4;

// Remove all row and graph divs
var clearDashboards = function() {
  $('div.dashboards div.row').remove();
}

// Grab configuration blob and construct our graph urls
var renderDashboards = function(owner) {
  var myUrl = window.location.pathname;
  /* if (tags.length > 0) {
    myUrl += '?tags=' + encodeURI(tags);
  } */
  return $.ajax({
    accepts: {json: 'application/json'},
    cache: false,
    dataType: 'json',
    error: function(xhr, textStatus, errorThrown) { console.log(errorThrown); },
    url: myUrl
  }).done(function(d) {
    if (d.length === 0) {
      console.log('No dashboards found');
    }
    var row = 0;
    $('div.dashboards').append('<div class="row"></div>');
    for (var i=0; i < d.length; i++) {
      row = Math.floor( i / myColumns );
      var spanSize = ( 12 / myColumns );
      if (($('div.dashboards div.row').length - 1) !== row) {
        $('div.dashboards').append('<div class="row"></div>');
      }
      $($('div.dashboards div.row')[row]).append('<a href="/dashboards/' + d[i].uuid + '"><div class="dashboard span' + spanSize + '"></div></a>');
      $($($($('div.dashboards div.row')[row]) + 'div.dashboard.span' + spanSize)[i]).append('<div class="name" id="' + d[i].uuid + '">' + d[i].name + '</div>');
      $($($($('div.dashboards div.row')[row]) + 'div.dashboard.span' + spanSize)[i]).append('<div class="count">' + d[i].graph_count + '</div>');
      //$($($($('div.dashboards div.row')[row]) + 'div.dashboard.span' + spanSize)[i]).append('<img src="' + encodeURI(myGraphUrl) + '" alt="' + d[i].name + '" name="' + d[i].uuid + '" />');
    }
  });
};

// Initial page load<commit_msg>because I hate long lines<commit_after>// Default settings
var myColumns = 4;

// Remove all row and graph divs
var clearDashboards = function() {
  $('div.dashboards div.row').remove();
}

// Grab configuration blob and construct our graph urls
var renderDashboards = function(owner) {
  var myUrl = window.location.pathname;
  /* if (tags.length > 0) {
    myUrl += '?tags=' + encodeURI(tags);
  } */
  return $.ajax({
    accepts: {json: 'application/json'},
    cache: false,
    dataType: 'json',
    error: function(xhr, textStatus, errorThrown) { console.log(errorThrown); },
    url: myUrl
  }).done(function(d) {
    if (d.length === 0) {
      console.log('No dashboards found');
    }
    var row = 0;
    $('div.dashboards').append('<div class="row"></div>');
    for (var i=0; i < d.length; i++) {
      row = Math.floor( i / myColumns );
      var spanSize = ( 12 / myColumns );
      if (($('div.dashboards div.row').length - 1) !== row) {
        $('div.dashboards').append('<div class="row"></div>');
      }
      var cardWrapper = '<a href="/dashboards/' + d[i].uuid + '"><div class="dashboard span' + spanSize + '"></div></a>';
      $($('div.dashboards div.row')[row]).append(cardWrapper);
      var cardDashboardName = '<div class="name" id="' + d[i].uuid + '">' + d[i].name + '</div>';
      $($($($('div.dashboards div.row')[row]) + 'div.dashboard.span' + spanSize)[i]).append(cardDashboardName);
      var cardGraphCount = '<div class="count">' + d[i].graph_count + '</div>';
      $($($($('div.dashboards div.row')[row]) + 'div.dashboard.span' + spanSize)[i]).append(cardGraphCount);
    }
  });
};

// Initial page load
{'fraction_non_alphanumeric': 0.22920406941950927, 'fraction_numerical': 0.0047875523638539795, 'mean_word_length': 3.3472041612483747, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1072592', 'n_tokens_mistral': 1153, 'n_tokens_neox': 1144, 'n_words': 250}