var ZeroTierNetwork = React.createClass({ getInitialState: function() { return {}; }, leaveNetwork: function(event) { Ajax.call({ url: 'network/'+this.props.nwid+'?auth='+this.props.authToken, cache: false, type: 'DELETE', success: function(data) { if (this.props.onNetworkDeleted) this.props.onNetworkDeleted(this.props.nwid); }.bind(this), error: function(error) { }.bind(this) }); event.preventDefault(); }, render: function() { return (
{this.props.nwid}  {this.props.name}
Status
{this.props['status']}
Type
{this.props['type']}
MAC
{this.props['mac']}
MTU
{this.props['mtu']}
Broadcast
{(this.props['broadcastEnabled']) ? 'ENABLED' : 'DISABLED'}
Bridging
{(this.props['bridge']) ? 'ACTIVE' : 'DISABLED'}
Device
{(this.props['portDeviceName']) ? this.props['portDeviceName'] : '(none)'}
Managed IPs
{ this.props['assignedAddresses'].map(function(ipAssignment) { return (
{ipAssignment}
); }) }
); } });