<commit_before>'use strict'

var React = require('react')

var Loader = require('react-loader')
var ReactBootstrap = require('react-bootstrap')
var Panel = ReactBootstrap.Panel
var Row = ReactBootstrap.Row
var Col = ReactBootstrap.Col

var $ = require('jquery')

var TeamDetails = require('./teamDetails')
var AssessmentTable = require('../assessment/assessmentTable')
var AssessmentCreationForm = require('../home/assessmentCreationForm')

var Team = React.createClass({
  propTypes: {
    params: React.PropTypes.object
  },

  loadTeamFromServer: function () {
    var teamId = parseInt(this.props.params.teamId, 10)
    var url = '/api/teams/' + teamId + '/'
    $.ajax({
      url: url,
      dataType: 'json',
      cache: false,
      success: function (data) {
        this.setState({team: data, loaded: true})
      }.bind(this),
      error: function (xhr, status, err) {
        console.error(url, status, err.toString())
      }
    })
  },
  getInitialState: function () {
    return {
      team: {},
      loaded: false
    }
  },
  componentDidMount: function () {
    this.loadTeamFromServer()
  },
  render: function () {
    var teamId = parseInt(this.props.params.teamId, 10)
    return (
      <div>
        <Row>
          <Col xs={12} sm={6}>          
            <Panel header='Team' bsStyle='primary'>
              <Loader scale={0.25} top='10' loaded={this.state.loaded}>
                <TeamDetails team={this.state.team} />
              </Loader>
            </Panel>
          </Col>
          <Col xs={12} sm={6}>
            <Panel header='Create Assessment' bsStyle='info'>
              <AssessmentCreationForm teamId={teamId} />
            </Panel><commit_msg>Make spinner default size<commit_after>'use strict'

var React = require('react')

var Loader = require('react-loader')
var ReactBootstrap = require('react-bootstrap')
var Panel = ReactBootstrap.Panel
var Row = ReactBootstrap.Row
var Col = ReactBootstrap.Col

var $ = require('jquery')

var TeamDetails = require('./teamDetails')
var AssessmentTable = require('../assessment/assessmentTable')
var AssessmentCreationForm = require('../home/assessmentCreationForm')

var Team = React.createClass({
  propTypes: {
    params: React.PropTypes.object
  },

  loadTeamFromServer: function () {
    var teamId = parseInt(this.props.params.teamId, 10)
    var url = '/api/teams/' + teamId + '/'
    $.ajax({
      url: url,
      dataType: 'json',
      cache: false,
      success: function (data) {
        this.setState({team: data, loaded: true})
      }.bind(this),
      error: function (xhr, status, err) {
        console.error(url, status, err.toString())
      }
    })
  },
  getInitialState: function () {
    return {
      team: {},
      loaded: false
    }
  },
  componentDidMount: function () {
    this.loadTeamFromServer()
  },
  render: function () {
    var teamId = parseInt(this.props.params.teamId, 10)
    return (
      <div>
        <Row>
          <Col xs={12} sm={6}>          
            <Panel header='Team' bsStyle='primary'>
              <Loader loaded={this.state.loaded}>
                <TeamDetails team={this.state.team} />
              </Loader>
            </Panel>
          </Col>
          <Col xs={12} sm={6}>
            <Panel header='Create Assessment' bsStyle='info'>
              <AssessmentCreationForm teamId={teamId} />
            </Panel>
{'fraction_non_alphanumeric': 0.14551357733175915, 'fraction_numerical': 0.007378984651711925, 'mean_word_length': 2.4406091370558376, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '6064504', 'n_tokens_mistral': 1030, 'n_tokens_neox': 1001, 'n_words': 226}