mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-06-12 20:48:09 +00:00
Split private gateways under tenant in uplink / downlink.
This makes it possible to share uplink data with other tenants, but do not allow other tenants to use these gateways for downlinks.
This commit is contained in:
@ -37,12 +37,25 @@ class ListTenants extends Component {
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Private gateways",
|
||||
dataIndex: "privateGateways",
|
||||
key: "privateGateways",
|
||||
title: "Private gateways (uplink)",
|
||||
dataIndex: "privateGatewaysUp",
|
||||
key: "privateGatewaysUp",
|
||||
width: 250,
|
||||
render: (text, record) => {
|
||||
if (record.privateGateways) {
|
||||
if (record.privateGatewaysUp) {
|
||||
return "yes";
|
||||
} else {
|
||||
return "no";
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Private gateways (down)",
|
||||
dataIndex: "privateGatewaysDown",
|
||||
key: "privateGatewaysDown",
|
||||
width: 250,
|
||||
render: (text, record) => {
|
||||
if (record.privateGatewaysDown) {
|
||||
return "yes";
|
||||
} else {
|
||||
return "no";
|
||||
|
@ -23,7 +23,8 @@ class TenantForm extends Component<IProps, IState> {
|
||||
tenant.setCanHaveGateways(values.canHaveGateways);
|
||||
tenant.setMaxGatewayCount(values.maxGatewayCount);
|
||||
tenant.setMaxDeviceCount(values.maxDeviceCount);
|
||||
tenant.setPrivateGateways(values.privateGateways);
|
||||
tenant.setPrivateGatewaysUp(values.privateGatewaysUp);
|
||||
tenant.setPrivateGatewaysDown(values.privateGatewaysDown);
|
||||
|
||||
this.props.onFinish(tenant);
|
||||
};
|
||||
@ -38,7 +39,7 @@ class TenantForm extends Component<IProps, IState> {
|
||||
<Input.TextArea disabled={this.props.disabled} />
|
||||
</Form.Item>
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
label="Tenant can have gateways"
|
||||
name="canHaveGateways"
|
||||
@ -48,11 +49,21 @@ class TenantForm extends Component<IProps, IState> {
|
||||
<Switch disabled={this.props.disabled} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
label="Gateways are private"
|
||||
name="privateGateways"
|
||||
tooltip="Gateways can only be used by the devices of this tenant."
|
||||
label="Gateways are private (uplink)"
|
||||
name="privateGatewaysUp"
|
||||
tooltip="Uplink received by gateways of this tenant can only be used by the devices of this tenant."
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch disabled={this.props.disabled} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item
|
||||
label="Gateways are private (downlink)"
|
||||
name="privateGatewaysDown"
|
||||
tooltip="Other tenants can not use the gateways of this tenant for downlinks. This can be useful in case uplinks are shared with other tenants, but you want to avoid other tenants using downlink airtime of your gateways."
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch disabled={this.props.disabled} />
|
||||
|
Reference in New Issue
Block a user