<commit_before>/**
 *
 *
 * @copyright 2017 Government of Canada
 * @license MIT
 * @author igboyes
 *
 */

import React, { PropTypes } from "react";
import { connect } from "react-redux";
import { Badge, Panel, ListGroup, ListGroupItem, Table } from "react-bootstrap";

import { Flex, FlexItem, RelativeTime } from "virtool/js/components/Base";

const IndexGeneral = (props) => {

    const contributors = props.detail.contributors.map(contributor =>
        <ListGroupItem key={contributor.id}>
            {contributor.id} <Badge>{contributor.count} {`change${contributor.count > 1 ? "s": ""}`}</Badge>
        </ListGroupItem>
    );

    const viruses = props.detail.viruses.map(virus =>
        <ListGroupItem key={virus.id}>
            {virus.name} <Badge>{virus.change_count} {`change${virus.change_count > 1 ? "s": ""}`}</Badge>
        </ListGroupItem>
    );

    const contributorsHeader = (
        <Flex alignItems="center">
            <FlexItem>
                Contributors
            </FlexItem>
            <FlexItem pad>
                <Badge>{contributors.length}</Badge>
            </FlexItem><commit_msg>Link to viruses in IndexGeneral<commit_after>/**
 *
 *
 * @copyright 2017 Government of Canada
 * @license MIT
 * @author igboyes
 *
 */

import React, { PropTypes } from "react";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import { Badge, Panel, ListGroup, ListGroupItem, Table } from "react-bootstrap";

import { Flex, FlexItem, RelativeTime } from "virtool/js/components/Base";

const IndexGeneral = (props) => {

    const contributors = props.detail.contributors.map(contributor =>
        <ListGroupItem key={contributor.id}>
            {contributor.id} <Badge>{contributor.count} {`change${contributor.count > 1 ? "s": ""}`}</Badge>
        </ListGroupItem>
    );

    const viruses = props.detail.viruses.map(virus =>
        <ListGroupItem key={virus.id}>
            <Link to={`/viruses/${virus.id}`}>
                {virus.name}
            </Link>
            <Badge>
                {virus.change_count} {`change${virus.change_count > 1 ? "s": ""}`}
            </Badge>
        </ListGroupItem>
    );

    const contributorsHeader = (
        <Flex alignItems="center">
            <FlexItem>
                Contributors
            </FlexItem>
            <FlexItem pad>
                <Badge>{contributors.length}</Badge>
            </FlexItem>
{'fraction_non_alphanumeric': 0.147493837304848, 'fraction_numerical': 0.0049301561216105174, 'mean_word_length': 2.4686609686609686, 'pattern_counts': {'":': 4, '<': 35, '<?xml version=': 0, '>': 45, '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': '7578553', 'n_tokens_mistral': 775, 'n_tokens_neox': 711, 'n_words': 153}