const React = require('react'); const NodeDetailsTable = require('./node-details-table'); const NodeColorMixin = require('../mixins/node-color-mixin'); const TitleUtils = require('../utils/title-utils'); const NodeDetails = React.createClass({ mixins: [ NodeColorMixin ], componentDidMount: function() { this.updateTitle(); }, componentWillUnmount: function() { TitleUtils.resetTitle(); }, render: function() { const node = this.props.details; if (!node) { return
; } const style = { 'background-color': this.getNodeColorDark(node.label_major) }; return (

{node.label_major}

{node.label_minor}
{this.props.details.tables.map(function(table) { return ; })}
); }, componentDidUpdate: function() { this.updateTitle(); }, updateTitle: function() { TitleUtils.setTitle(this.props.details && this.props.details.label_major); } }); module.exports = NodeDetails;