import _ from 'underscore'; import $ from 'jquery'; import React from 'react/addons'; import Radial from './Radial.react'; import ContainerProgress from './ContainerProgress.react'; import ContainerHomePreview from './ContainerHomePreview.react'; import ContainerHomeLogs from './ContainerHomeLogs.react'; import ContainerHomeFolders from './ContainerHomeFolders.react'; import shell from 'shell'; var ContainerHome = React.createClass({ contextTypes: { router: React.PropTypes.func }, componentDidMount: function() { this.handleResize(); window.addEventListener('resize', this.handleResize); }, componentWillUnmount: function() { window.removeEventListener('resize', this.handleResize); }, componentDidUpdate: function () { this.handleResize(); }, handleResize: function () { $('.full .wrapper').height(window.innerHeight - 132); $('.left .wrapper').height(window.innerHeight - 132); $('.right .wrapper').height(window.innerHeight / 2 - 55); }, handleErrorClick: function () { shell.openExternal('https://github.com/kitematic/kitematic/issues/new'); }, showWeb: function () { return _.keys(this.props.ports).length > 0; }, showFolders: function () { return this.props.container.Mounts && this.props.container.Mounts.length > 0 && this.props.container.State.Running; }, render: function () { if (!this.props.container) { return; } let body; if (this.props.container.Error) { body = (
{this.props.container.Error}
If this error is invalid, please file a ticket on our Github repo.
File Ticket