var React = require('react/addons'); var ContainerDetailsHeader = React.createClass({ render: function () { var state; if (!this.props.container) { return false; } if (this.props.container.State.Running && !this.props.container.State.Paused && !this.props.container.State.ExitCode && !this.props.container.State.Restarting) { state = RUNNING; } else if (this.props.container.State.Restarting) { state = RESTARTING; } else if (this.props.container.State.Paused) { state = PAUSED; } else if (this.props.container.State.Downloading) { state = DOWNLOADING; } else { state = STOPPED; } return (

{this.props.container.Name}

{state}
); } }); module.exports = ContainerDetailsHeader;