var ZeroTierNetwork = React.createClass({
getInitialState: function() {
return {
deleted: false
};
},
leaveNetwork: function(event) {
Ajax.call({
url: 'network/'+this.props.nwid+'?auth='+this.props.authToken,
cache: false,
type: 'DELETE',
success: function(data) {
this.setState({deleted: true});
}.bind(this),
error: function(error) {
}.bind(this)
});
event.preventDefault();
},
render: function() {
return (
{
(this.state.deleted) ? (
) : (null)
}
{this.props.nwid}
{this.props.name}
Status
{this.props['status']}
Type
{this.props['type']}
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}
);
})
}
);
}
});