<commit_before>import React, { PropTypes } from 'react';
import Utils from '../../utils';
import Section from '../common/Section';
import SimpleTable from '../common/SimpleTable';
import classNames from 'classnames';

function TaskHistory (props) {
  return (
    <Section title="History">
      <SimpleTable
        emptyMessage="This task has no history yet"
        entries={props.taskUpdates.concat().reverse()}
        perPage={5}
        headers={['Status', 'Message', 'Time']}
        renderTableRow={(data, index) => {
          return (
            <tr key={index} className={classNames({'medium-weight' :index === 0})}>
              <td>{Utils.humanizeText(data.taskState)}</td>
              <td>{data.statusMessage ? data.statusMessage : '—'}</td>
              <td>{Utils.timestampFromNow(data.timestamp)}</td>
            </tr>
          );
        }}
      />
    </Section>
  );
}

TaskHistory.propTypes = {
  taskUpdates: PropTypes.arrayOf(PropTypes.shape({
    taskState: PropTypes.string,
    statusMessage: PropTypes.string,
    timestamp: PropTypes.number
  })).isRequired
};

export default TaskHistory;<commit_msg>Fix one last lint error<commit_after>import React, { PropTypes } from 'react';
import Utils from '../../utils';
import Section from '../common/Section';
import SimpleTable from '../common/SimpleTable';
import classNames from 'classnames';

function TaskHistory (props) {
  return (
    <Section title="History">
      <SimpleTable
        emptyMessage="This task has no history yet"
        entries={props.taskUpdates.concat().reverse()}
        perPage={5}
        headers={['Status', 'Message', 'Time']}
        renderTableRow={(data, index) => {
          return (
            <tr key={index} className={classNames({'medium-weight': index === 0})}>
              <td>{Utils.humanizeText(data.taskState)}</td>
              <td>{data.statusMessage ? data.statusMessage : '—'}</td>
              <td>{Utils.timestampFromNow(data.timestamp)}</td>
            </tr>
          );
        }}
      />
    </Section>
  );
}

TaskHistory.propTypes = {
  taskUpdates: PropTypes.arrayOf(PropTypes.shape({
    taskState: PropTypes.string,
    statusMessage: PropTypes.string,
    timestamp: PropTypes.number
  })).isRequired
};

export default TaskHistory;
{'fraction_non_alphanumeric': 0.15485564304461943, 'fraction_numerical': 0.0017497812773403325, 'mean_word_length': 2.805324459234609, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 27, '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': '5447459', 'n_tokens_mistral': 639, 'n_tokens_neox': 649, 'n_words': 137}