<commit_before>var React = require('react');
var ReactBootstrap = require('react-bootstrap');
var ReactIntl = require('react-intl');
var Reflux = require('reflux');
var ReactDocumentTitle = require('react-document-title');

var LoadingIndicator = require('../component/LoadingIndicator');

var ServiceStatusAction = require('../action/ServiceStatusAction');

var ServiceStatusStore = require('../store/ServiceStatusStore');

var Grid = ReactBootstrap.Grid,
    Row = ReactBootstrap.Row,
    Col = ReactBootstrap.Col,
    Table = ReactBootstrap.Table;

module.exports = React.createClass({

    mixins: [
        ReactIntl.IntlMixin,
        Reflux.connect(ServiceStatusStore, 'serviceStatus')
    ],

    componentWillMount: function()
    {
        ServiceStatusAction.showStatus();
    },

    componentDidMount: function()
    {
        this.interval = setInterval(
            () => ServiceStatusAction.updateStatus(),
            10000
        );
    },

    componentWillUnmount: function()
    {
        clearInterval(this.interval);
    },

    getStatusClassNames: function(status)
    {
        return status ? 'cocorico-blue' : 'cocorico-red';
    },

    render: function()
    {
        if (!this.state.serviceStatus)
            return (
                <div className="page">
                    <Grid>
                        <Row><commit_msg>Fix broken references to the cocorico-blue and cocorico-red CSS classes in ServiceStatus.jsx.<commit_after>var React = require('react');
var ReactBootstrap = require('react-bootstrap');
var ReactIntl = require('react-intl');
var Reflux = require('reflux');
var ReactDocumentTitle = require('react-document-title');

var LoadingIndicator = require('../component/LoadingIndicator');

var ServiceStatusAction = require('../action/ServiceStatusAction');

var ServiceStatusStore = require('../store/ServiceStatusStore');

var Grid = ReactBootstrap.Grid,
    Row = ReactBootstrap.Row,
    Col = ReactBootstrap.Col,
    Table = ReactBootstrap.Table;

module.exports = React.createClass({

    mixins: [
        ReactIntl.IntlMixin,
        Reflux.connect(ServiceStatusStore, 'serviceStatus')
    ],

    componentWillMount: function()
    {
        ServiceStatusAction.showStatus();
    },

    componentDidMount: function()
    {
        this.interval = setInterval(
            () => ServiceStatusAction.updateStatus(),
            10000
        );
    },

    componentWillUnmount: function()
    {
        clearInterval(this.interval);
    },

    getStatusClassNames: function(status)
    {
        return status ? 'positive' : 'negative';
    },

    render: function()
    {
        if (!this.state.serviceStatus)
            return (
                <div className="page">
                    <Grid>
                        <Row>
{'fraction_non_alphanumeric': 0.12190749372534959, 'fraction_numerical': 0.0035855145213338113, 'mean_word_length': 2.6518324607329844, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '2748355', 'n_tokens_mistral': 778, 'n_tokens_neox': 746, 'n_words': 142}