<commit_before>'use strict';

var React = require('react');
var Firebase = require('firebase');
var ShowStatus = require('../../elements/showStatus');
var ShowScore = require('../../elements/showScore');
var config = require('../../config');
var sites = config.SITES;
var fbUrl = config.FIREBASE_URL + config.FIREBASE_DB;

var App = React.createClass({
  getInitialState: function() {
    return {data:{}};
  },
  componentWillMount: function() {
    this.firebaseRef = new Firebase(fbUrl);
    this.firebaseRef.on("value", function(dataSnapshot) {
      var data = dataSnapshot.val();
      console.log(data);
      this.setState({
        data: data
      });
    }.bind(this));
  },
  render: function(){
    var self = this;
    return (
      <div>
        <table>
          <thead>
          <tr>
            <th className="explain">Factor</th>
            {sites.map(function(site){
              return <th className="explain">{site.name}</th>;
            })}
          </tr>
          </thead>
          <tbody>
          <tr>
            <td className="explain">Valid html</td>
            {sites.map(function(site){
              return <ShowStatus data={self.state.data} filter="html" instance={site.id}></ShowStatus>;
            })}
          </tr>
          <tr>
            <td className="explain">Accessibility</td>
            {sites.map(function(site){
              return <ShowStatus data={self.state.data} filter="wcag" instance={site.id}></ShowStatus>;
            })}
          </tr>
          <tr>
            <td className="explain">Speed desktop</td>
            {sites.map(function(site){
              return <ShowStatus data={self.state.data} filter="desktopSpeed" instance={site.id}></ShowStatus>;
            })}
          </tr>
          <tr>
            <td className="explain">Speed mobile</td>
            {sites.map(function(site){
              return <ShowStatus data={self.state.data} filter="mobileSpeed" instance={site.id}></ShowStatus>;
            })}
          </tr>
          <tr>
            <td className="explain">User experience mobile</td>
            {sites.map(function(site){
              return <ShowStatus data={self.state.data} filter="mobileUX" instance={site.id}></ShowStatus>;
            })}
          </tr>
          <tr>
            <td className="explain">Total quality</td>
            {sites.map(function(site){
              return <ShowScore data={self.state.data} instance={site.id}></ShowScore>;
            })}
          </tr>
          </tbody>
        </table>
  </div>
  );
  }
});

React.render(
  <App />,
  document.getElementById('app')
);<commit_msg>Initial commit<commit_after>'use strict';

var React = require('react');
var Firebase = require('firebase');
var ShowStatus = require('../../elements/showStatus');
var ShowScore = require('../../elements/showScore');
var config = require('../../config');
var sites = config.SITES;
var fbUrl = config.FIREBASE_URL + config.FIREBASE_DB;

var App = React.createClass({
  getInitialState: function() {
    return {data:{}};
  },
  componentWillMount: function() {
    this.firebaseRef = new Firebase(fbUrl);
    this.firebaseRef.on("value", function(dataSnapshot) {
      var data = dataSnapshot.val();
      console.log(data);
      this.setState({
        data: data
      });
    }.bind(this));
  },
  render: function(){
    var self = this;
    return (
      <div>
        <table>
          <thead>
          <tr>
            <th className="explain">Factor</th>
            {sites.map(function(site){
              return <th className="explain">{site.name}</th>;
            })}
          </tr>
          </thead>
          <tbody>
          <tr>
            <td className="explain">Valid html</td>
            {sites.map(function(site){
              return <ShowStatus data={self.state.data} filter="html" instance={site.id}></ShowStatus>;
            })}
          </tr>
          <tr>
            <td className="explain">Accessibility</td>
            {sites.map(function(site){
              return <ShowStatus data={self.state.data} filter="wcag" instance={site.id}></ShowStatus>;
            })}
          </tr>
          <tr>
            <td className="explain">Speed desktop</td>
            {sites.map(function(site){
              return <ShowStatus data={self.state.data} filter="desktopSpeed" instance={site.id}></ShowStatus>;
            })}
          </tr>
          <tr>
            <td className="explain">Speed mobile</td>
            {sites.map(function(site){
              return <ShowStatus data={self.state.data} filter="mobileSpeed" instance={site.id}></ShowStatus>;
            })}
          </tr>
          <tr>
            <td className="explain">UX mobile</td>
            {sites.map(function(site){
              return <ShowStatus data={self.state.data} filter="mobileUX" instance={site.id}></ShowStatus>;
            })}
          </tr>
          <tr>
            <td className="explain">Total quality</td>
            {sites.map(function(site){
              return <ShowScore data={self.state.data} instance={site.id}></ShowScore>;
            })}
          </tr>
          </tbody>
        </table>
  </div>
  );
  }
});

React.render(
  <App />,
  document.getElementById('app')
);
{'fraction_non_alphanumeric': 0.16723809523809524, 'fraction_numerical': 0.0, 'mean_word_length': 1.975070821529745, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 0, '>': 105, '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': '7013243', 'n_tokens_mistral': 1535, 'n_tokens_neox': 1500, 'n_words': 272}