<commit_before>= haml :nav

.container
  - if @error
    .alert.alert-error
      = @error
  .row#statboxes
  %p
  .hero-unit
    #big_graph_title
    #big_graph
    #big_graph_events
    .pull-left
      %a#source_link{:title => "original source"}
        %i.icon-share
      %a#source_download{:title => "data"}
        %i.icon-download
      %a#toggle_events{:title => "toggle events"}
        %i.icon-exclamation-sign.on
    %form#bgcontrols.form-inline.pull-right
      %label.radio{:for=>"area", :title=>"area"}
        %input#area{:type=>"radio", :name=>"renderer", :value=>"area", :checked=>true}
      %label.radio{:for=>"line", :title=>"line"}
        %input#line{:type=>"radio", :name=>"renderer", :value=>"line"}
      %label.radio{:for=>"bar", :title=>"bar"}
        %input#bar{:type=>"radio", :name=>"renderer", :value=>"bar"}
      %label.radio{:for=>"scatter", :title=>"scatterplot"}
        %input#scatter{:type=>"radio", :name=>"renderer", :value=>"scatterplot"}

-## bootstrap support
%script{:type=>"text/javascript", :src=>"/bootstrap/js/jquery.js"}
%script{:type=>"text/javascript", :src=>"/bootstrap/js/bootstrap.min.js"}
-## rickshaw support
%script{:type=>"text/javascript", :src=>"/rickshaw/d3.min.js"}
%script{:type=>"text/javascript", :src=>"/rickshaw/d3.layout.min.js"}
%script{:type=>"text/javascript", :src=>"/rickshaw/rickshaw.min.js"}
-## app js and config file
%script{:type=>"text/javascript", :src=>"/js/Dash.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.BigGraph.Rickshaw.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.BigGraph.Rickshaw.Axis.Y.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.BigGraph.Rickshaw.HoverDetail.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.BigGraph.Rickshaw.Timeline.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Project.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Boxes.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.UI.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Stat.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Format.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Graphite.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Ganglia.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Opscenter.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Pingdom.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Errplane.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.GoogleAnalytics.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Test.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Logstash.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Date.js"}
%script{:type=>"text/javascript", :src=>"/cfg/_defaults_.js"}
%script{:type=>"text/javascript", :src=>"/cfg/_events_.js"}
%script{:type=>"text/javascript", :src=>"/cfg/#{@dashboard}.js"}
:javascript
  var boxes = new Dash.Boxes({
    from: '-1h',
    show_events: true
  });

  boxes.big_graph = new Dash.BigGraph.Rickshaw('#big_graph')
    .createTitle('#big_graph_title')
    .createTimeline('#big_graph_events')
    .createLink('#source_link')
    .createDownload('#source_download')
    .createRendererControls('#bgcontrols :radio');

  Dash.events_list.forEach(function(project) {
    project.ready(function() {
      boxes.big_graph
        .createEvents(project.stats)
        .addEventLines(boxes.from, project.stats);
    })
  });

  Dash.stats_list.forEach(function(project) {
    project.ready(function() {
      boxes
        .addPreHooks(project.pre_hooks)
        .createBoxes('#statboxes', project.stats)
        .createGraphs(project.stats)
        .updateStats(project.stats);
    });
  });

  new Dash.UI()
    .setInterval(15000)
    .playPause('#playpause', function(play) {
      play && boxes.updateStats();
    })
    .refresh('#refresh', function() {
      boxes.update();
    })
    .eventsToggle('#toggle_events',
      function() {
        boxes.showEvents(true);
      },
      function() {
        boxes.showEvents(false);
      }
    )
    .timeControls('ul.times li', function(from) {
      // turn off event display over this number of secs
      ((Dash.Date.toSec(from) > 60*60*24) == boxes.show_events) && $('#toggle_events').click();
      boxes.update(from);
    })
    .timeSet(boxes.from)
    .bindKeys();
<commit_msg>fix ga js name for load<commit_after>= haml :nav

.container
  - if @error
    .alert.alert-error
      = @error
  .row#statboxes
  %p
  .hero-unit
    #big_graph_title
    #big_graph
    #big_graph_events
    .pull-left
      %a#source_link{:title => "original source"}
        %i.icon-share
      %a#source_download{:title => "data"}
        %i.icon-download
      %a#toggle_events{:title => "toggle events"}
        %i.icon-exclamation-sign.on
    %form#bgcontrols.form-inline.pull-right
      %label.radio{:for=>"area", :title=>"area"}
        %input#area{:type=>"radio", :name=>"renderer", :value=>"area", :checked=>true}
      %label.radio{:for=>"line", :title=>"line"}
        %input#line{:type=>"radio", :name=>"renderer", :value=>"line"}
      %label.radio{:for=>"bar", :title=>"bar"}
        %input#bar{:type=>"radio", :name=>"renderer", :value=>"bar"}
      %label.radio{:for=>"scatter", :title=>"scatterplot"}
        %input#scatter{:type=>"radio", :name=>"renderer", :value=>"scatterplot"}

-## bootstrap support
%script{:type=>"text/javascript", :src=>"/bootstrap/js/jquery.js"}
%script{:type=>"text/javascript", :src=>"/bootstrap/js/bootstrap.min.js"}
-## rickshaw support
%script{:type=>"text/javascript", :src=>"/rickshaw/d3.min.js"}
%script{:type=>"text/javascript", :src=>"/rickshaw/d3.layout.min.js"}
%script{:type=>"text/javascript", :src=>"/rickshaw/rickshaw.min.js"}
-## app js and config file
%script{:type=>"text/javascript", :src=>"/js/Dash.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.BigGraph.Rickshaw.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.BigGraph.Rickshaw.Axis.Y.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.BigGraph.Rickshaw.HoverDetail.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.BigGraph.Rickshaw.Timeline.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Project.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Boxes.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.UI.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Stat.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Format.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Graphite.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Ganglia.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Opscenter.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Pingdom.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Errplane.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Googleanalytics.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Test.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Source.Logstash.js"}
%script{:type=>"text/javascript", :src=>"/js/Dash.Date.js"}
%script{:type=>"text/javascript", :src=>"/cfg/_defaults_.js"}
%script{:type=>"text/javascript", :src=>"/cfg/_events_.js"}
%script{:type=>"text/javascript", :src=>"/cfg/#{@dashboard}.js"}
:javascript
  var boxes = new Dash.Boxes({
    from: '-1h',
    show_events: true
  });

  boxes.big_graph = new Dash.BigGraph.Rickshaw('#big_graph')
    .createTitle('#big_graph_title')
    .createTimeline('#big_graph_events')
    .createLink('#source_link')
    .createDownload('#source_download')
    .createRendererControls('#bgcontrols :radio');

  Dash.events_list.forEach(function(project) {
    project.ready(function() {
      boxes.big_graph
        .createEvents(project.stats)
        .addEventLines(boxes.from, project.stats);
    })
  });

  Dash.stats_list.forEach(function(project) {
    project.ready(function() {
      boxes
        .addPreHooks(project.pre_hooks)
        .createBoxes('#statboxes', project.stats)
        .createGraphs(project.stats)
        .updateStats(project.stats);
    });
  });

  new Dash.UI()
    .setInterval(15000)
    .playPause('#playpause', function(play) {
      play && boxes.updateStats();
    })
    .refresh('#refresh', function() {
      boxes.update();
    })
    .eventsToggle('#toggle_events',
      function() {
        boxes.showEvents(true);
      },
      function() {
        boxes.showEvents(false);
      }
    )
    .timeControls('ul.times li', function(from) {
      // turn off event display over this number of secs
      ((Dash.Date.toSec(from) > 60*60*24) == boxes.show_events) && $('#toggle_events').click();
      boxes.update(from);
    })
    .timeSet(boxes.from)
    .bindKeys();

{'fraction_non_alphanumeric': 0.2265750286368843, 'fraction_numerical': 0.0032073310423825887, 'mean_word_length': 4.3237804878048784, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 161, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4846099', 'n_tokens_mistral': 3246, 'n_tokens_neox': 3151, 'n_words': 359}