var React = require('react/addons');
var ContainerListItem = require('./ContainerListItem.react');
var ContainerListNewItem = require('./ContainerListNewItem.react');

var ContainerList = React.createClass({
  componentWillMount: function () {
    this._start = Date.now();
  },
  render: function () {
    var self = this;
    var containers = this.props.containers.map(function (container) {
      var container_id = container.Id;
      if (!container_id && container.State.Downloading) {
        // Fall back to the container image name when there is no id. (when the
        // image is downloading).
        container_id = container.Image;
      }
      return (
        <ContainerListItem key={container_id} container={container} start={self._start} />
      );
    });
    var newItem;
    if (!this.props.downloading) {
      newItem = <ContainerListNewItem key={'newcontainer'} containers={this.props.containers} />;
    } else {
      newItem = '';
    }
    return (
      <ul>
        {newItem}
        {containers}
      </ul>
    );
  }
});

module.exports = ContainerList;

var React = require('react/addons');
var ContainerListItem = require('./ContainerListItem.react');
var ContainerListNewItem = require('./ContainerListNewItem.react');

var ContainerList = React.createClass({
  componentWillMount: function () {
    this._start = Date.now();
  },
  render: function () {
    var self = this;
    var containers = this.props.containers.map(function (container) {
      var containerId = container.Id;
      if (!containerId && container.State.Downloading) {
        // Fall back to the container image name when there is no id. (when the
        // image is downloading).
        containerId = container.Image;
      }
      return (
        <ContainerListItem key={containerId} container={container} start={self._start} />
      );
    });
    var newItem;
    if (!this.props.downloading) {
      newItem = <ContainerListNewItem key={'newcontainer'} containers={this.props.containers} />;
    } else {
      newItem = '';
    }
    return (
      <ul>
        {newItem}
        {containers}
      </ul>
    );
  }
});

module.exports = ContainerList;

Change variable from snake_case to camelCase.
Change variable from snake_case to camelCase.

Signed-off-by: Kristján Oddsson <7f4038d71424a99d2ff6bb9f6d45a8ec0dfda48e@gmail.com>
