<commit_before><!DOCTYPE html>
<meta charset="utf-8">
<%= include_gon %>

<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>

<style>


#loginInfo {
width:100%;
height: 12px;
font-family:  Verdana, Geneva, sans-serif;
}
#username{
float:right;
padding-top: 2px;
padding-right: 4px;
}
#logout{
float:right;
border: 2px solid;
border-radius: 5px;
background-color: #eaeaea;
  margin-left:3px;
padding-left:3px;
padding-right:3px;
}

.chart {
  background-color: #efefef;
}
.chart text {
  fill: black;
  font: 10px sans-serif;
  text-anchor: end;
}

.axis text {
  font: 11px sans-serif;
}

.axis line {
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
}

.grid-background {
  fill: #ddd;
}

.grid line,
.grid path {
  fill: none;
  stroke: #fff;
  shape-rendering: crispEdges;
}

.grid .minor.tick line {
  stroke-opacity: .5;
}

.brush .extent {
  stroke: #000;
  fill-opacity: .125;
  shape-rendering: crispEdges;
}

.axis text {
  font: 10px sans-serif;
}

.axis line,
.axis path {
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
}

#PulseAreaDetail{
width:100px;
height:100px;

}

</style>

<div id="loginInfo">
<div id="logout">logout</div>

<div id="username"></div>

</div>

<h3>CyberDojo Id: <%= params[:id] %>
Avatar: <%= params[:avatar] %>
Kata Name: <%= params[:kataName] %>
</h3>


<body>

<div id="viz"></div>
<svg class="chart"></svg>

<div id="accordion">
</div>


<div id="dialog" style="display:none;">
Please Enter your name:
  <input type="text" value="" id="usernameInput">
</div>

<script>

initializeKeyBindings();

var data = gon.compiles;
var phaseData = gon.phases;
// console.log(phaseData);
compiles = gon.compiles;
cycles = gon.cycles;
// username = gon.username;
username  = $.cookie('username');
console.log(gon.cycles);

checkLogin();
pageSetup();



// console.log(gon.normalizedPhaseTime);
// console.log(gon.normalizedPhaseSLOC);
console.log(username);

if(username == null){
    $( "#dialog" ).dialog({
                            dialogClass: "no-close",
                            modal: "true",
                            buttons: [
                              {
                                text: "OK",
                                click: function() {
                                  var username = $( "#usernameInput" ).val();
                                  console.log(username);

                                  // setUserNameCookie(username);
                                  // document.cookie = value;

                                  $.cookie('username', username, { expires: 7, path: '/' });

                                  $('#username').html("Hello "+username);
                                  $( this ).dialog( "close" );
                                }
                              }
                            ]
    });
  }
  // }


  // TDDData = gon.normalizedPhaseSLOC;
  drawUncatagorizedKata();
  // buildpulseChart(gon.normalizedPhaseSLOC);<commit_msg>reload working data if logging in<commit_after><!DOCTYPE html>
<meta charset="utf-8">
<%= include_gon %>

<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>

<style>


#loginInfo {
width:100%;
height: 12px;
font-family:  Verdana, Geneva, sans-serif;
}
#username{
float:right;
padding-top: 2px;
padding-right: 4px;
}
#logout{
float:right;
border: 2px solid;
border-radius: 5px;
background-color: #eaeaea;
  margin-left:3px;
padding-left:3px;
padding-right:3px;
}

.chart {
  background-color: #efefef;
}
.chart text {
  fill: black;
  font: 10px sans-serif;
  text-anchor: end;
}

.axis text {
  font: 11px sans-serif;
}

.axis line {
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
}

.grid-background {
  fill: #ddd;
}

.grid line,
.grid path {
  fill: none;
  stroke: #fff;
  shape-rendering: crispEdges;
}

.grid .minor.tick line {
  stroke-opacity: .5;
}

.brush .extent {
  stroke: #000;
  fill-opacity: .125;
  shape-rendering: crispEdges;
}

.axis text {
  font: 10px sans-serif;
}

.axis line,
.axis path {
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
}

#PulseAreaDetail{
width:100px;
height:100px;

}

</style>

<div id="loginInfo">
<div id="logout">logout</div>

<div id="username"></div>

</div>

<h3>CyberDojo Id: <%= params[:id] %>
Avatar: <%= params[:avatar] %>
Kata Name: <%= params[:kataName] %>
</h3>


<body>

<div id="viz"></div>
<svg class="chart"></svg>

<div id="accordion">
</div>


<div id="dialog" style="display:none;">
Please Enter your name:
  <input type="text" value="" id="usernameInput">
</div>

<script>

initializeKeyBindings();

var data = gon.compiles;
var phaseData = gon.phases;
// console.log(phaseData);
compiles = gon.compiles;
cycles = gon.cycles;
// username = gon.username;
username  = $.cookie('username');
console.log(gon.cycles);

checkLogin();
pageSetup();



// console.log(gon.normalizedPhaseTime);
// console.log(gon.normalizedPhaseSLOC);
console.log(username);

if(username == null){
    $( "#dialog" ).dialog({
                            dialogClass: "no-close",
                            modal: "true",
                            buttons: [
                              {
                                text: "OK",
                                click: function() {
                                  var username = $( "#usernameInput" ).val();
                                  // console.log(username);

                                  // setUserNameCookie(username);
                                  // document.cookie = value;

                                  $.cookie('username', username, { expires: 70000000, path: '/' });

                                  $('#username').html("Hello "+username);
                                  $( this ).dialog( "close" );
                                  window.location.reload();
                                }
                              }
                            ]
    });
  }
  // }


  // TDDData = gon.normalizedPhaseSLOC;
  drawUncatagorizedKata();
  // buildpulseChart(gon.normalizedPhaseSLOC);
{'fraction_non_alphanumeric': 0.16230972865651885, 'fraction_numerical': 0.016048974189278625, 'mean_word_length': 2.0225, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '507002', 'n_tokens_mistral': 2162, 'n_tokens_neox': 1980, 'n_words': 401}