<commit_before>/** @jsx React.DOM */

define(
  [
    'react',
    'backbone',
    'components/common/Time.react',
    'url'
  ],
  function (React, Backbone, Time, URL) {

    return React.createClass({

      propTypes: {
        instance: React.PropTypes.instanceOf(Backbone.Model).isRequired,
        provider: React.PropTypes.instanceOf(Backbone.Model).isRequired
      },

      getStatus: function(instance){
        var status = instance.get('status');
        var statusLight;
        if(status === "active"){
          statusLight = <span className="instance-status-light active"></span>;
        }else if(status === "suspended"){
          statusLight = <span className="instance-status-light suspended"></span>;
        }else if(status === "shutoff"){
          statusLight = <span className="instance-status-light stopped"></span>;
        }

        var capitalizedStatus = status.charAt(0).toUpperCase() + status.slice(1);

        return (
          <li>
            <span className="instance-detail-label">Status</span>
            {statusLight}
            <span className="instance-detail-value">{capitalizedStatus}</span>
          </li>
        );
      },

      getIpAddress: function(instance){
        return (
          <li>
            <span className="instance-detail-label">IP Address</span>
            <span className="instance-detail-value">{instance.get('ip_address')}</span>
          </li>
        );
      },

      getLaunchedDate: function(){
          return (
            <li>
              <span className="instance-detail-label">Launched</span><commit_msg>display capacity error instead of vague error<commit_after>/** @jsx React.DOM */

define(
  [
    'react',
    'backbone',
    'components/common/Time.react',
    'url'
  ],
  function (React, Backbone, Time, URL) {

    return React.createClass({

      propTypes: {
        instance: React.PropTypes.instanceOf(Backbone.Model).isRequired,
        provider: React.PropTypes.instanceOf(Backbone.Model).isRequired
      },

      getStatus: function(instance){
        var status = instance.get('status');
        var statusLight;
        if(status === "active"){
          statusLight = <span className="instance-status-light active"></span>;
        }else if(status === "suspended"){
          statusLight = <span className="instance-status-light suspended"></span>;
        }else if(status === "shutoff"){
          statusLight = <span className="instance-status-light stopped"></span>;
        }

        var style = {};
        var capitalizedStatus = status.charAt(0).toUpperCase() + status.slice(1);
        if(capitalizedStatus === "Error") {
          capitalizedStatus = "Launch failed. Atmosphere at capacity.";
          style = {
            color: "#d44950"
          }
        }

        return (
          <li>
            <span className="instance-detail-label">Status</span>
            {statusLight}
            <span style={style} className="instance-detail-value">{capitalizedStatus}</span>
          </li>
        );
      },

      getIpAddress: function(instance){
        return (
          <li>
            <span className="instance-detail-label">IP Address</span>
            <span className="instance-detail-value">{instance.get('ip_address')}</span>
          </li>
        );
      },

      getLaunchedDate: function(){
          return (
            <li>
              <span className="instance-detail-label">Launched</span>
{'fraction_non_alphanumeric': 0.1445120185346076, 'fraction_numerical': 0.0026064291920069507, 'mean_word_length': 2.2100371747211898, 'pattern_counts': {'":': 0, '<': 45, '<?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': '5565551', 'n_tokens_mistral': 954, 'n_tokens_neox': 929, 'n_words': 169}