mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-07-27 14:42:42 +00:00
Compare commits
2 Commits
fix_migrat
...
v4_9_bugfi
Author | SHA1 | Date | |
---|---|---|---|
|
5418218aa1 | ||
|
29b5c3de1c |
@@ -15,16 +15,16 @@ interface IProps {
|
|||||||
|
|
||||||
function MetricChart(props: IProps) {
|
function MetricChart(props: IProps) {
|
||||||
let unit: TimeUnit = "hour";
|
let unit: TimeUnit = "hour";
|
||||||
let tooltipFormat = "LT";
|
let tooltipFormat = "p";
|
||||||
if (props.aggregation === Aggregation.DAY) {
|
if (props.aggregation === Aggregation.DAY) {
|
||||||
unit = "day";
|
unit = "day";
|
||||||
tooltipFormat = "MMM Do";
|
tooltipFormat = "MMM d";
|
||||||
} else if (props.aggregation === Aggregation.MONTH) {
|
} else if (props.aggregation === Aggregation.MONTH) {
|
||||||
unit = "month";
|
unit = "month";
|
||||||
tooltipFormat = "MMM YYYY";
|
tooltipFormat = "MMM yyyy";
|
||||||
} else if (props.aggregation === Aggregation.MINUTE) {
|
} else if (props.aggregation === Aggregation.MINUTE) {
|
||||||
unit = "minute";
|
unit = "minute";
|
||||||
tooltipFormat = "LT";
|
tooltipFormat = "p";
|
||||||
}
|
}
|
||||||
|
|
||||||
const animation = false as const;
|
const animation = false as const;
|
||||||
@@ -59,8 +59,6 @@ function MetricChart(props: IProps) {
|
|||||||
.sort((a, b) => a.getLabel().localeCompare(b.getLabel()))
|
.sort((a, b) => a.getLabel().localeCompare(b.getLabel()))
|
||||||
.map((v, i) => {
|
.map((v, i) => {
|
||||||
const colors = palette("cb-Paired", props.metric.getDatasetsList().length).map((hex: string) => "#" + hex);
|
const colors = palette("cb-Paired", props.metric.getDatasetsList().length).map((hex: string) => "#" + hex);
|
||||||
console.log(v.getLabel());
|
|
||||||
console.log(colors[i]);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
label: v.getLabel(),
|
label: v.getLabel(),
|
||||||
|
@@ -87,8 +87,9 @@ function ListDevices(props: IProps) {
|
|||||||
width: 250,
|
width: 250,
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<Link
|
<Link
|
||||||
to={`/tenants/${props.application.getTenantId()}/applications/${props.application.getId()}/devices/${record.devEui
|
to={`/tenants/${props.application.getTenantId()}/applications/${props.application.getId()}/devices/${
|
||||||
}`}
|
record.devEui
|
||||||
|
}`}
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
@@ -179,7 +180,7 @@ function ListDevices(props: IProps) {
|
|||||||
req.setMulticastGroupId(mgSelected);
|
req.setMulticastGroupId(mgSelected);
|
||||||
req.setDevEui(devEui);
|
req.setDevEui(devEui);
|
||||||
|
|
||||||
MulticastGroupStore.addDevice(req, () => { });
|
MulticastGroupStore.addDevice(req, () => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
setMgModalVisible(false);
|
setMgModalVisible(false);
|
||||||
@@ -191,7 +192,7 @@ function ListDevices(props: IProps) {
|
|||||||
req.setRelayDevEui(relaySelected);
|
req.setRelayDevEui(relaySelected);
|
||||||
req.setDeviceDevEui(devEui);
|
req.setDeviceDevEui(devEui);
|
||||||
|
|
||||||
RelayStore.addDevice(req, () => { });
|
RelayStore.addDevice(req, () => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
setRelayModalVisible(false);
|
setRelayModalVisible(false);
|
||||||
|
@@ -179,7 +179,7 @@ function ListGateways(props: IProps) {
|
|||||||
req.setMulticastGroupId(mgSelected);
|
req.setMulticastGroupId(mgSelected);
|
||||||
req.setGatewayId(gatewayId);
|
req.setGatewayId(gatewayId);
|
||||||
|
|
||||||
MulticastGroupStore.addGateway(req, () => { });
|
MulticastGroupStore.addGateway(req, () => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
setMgModalVisible(false);
|
setMgModalVisible(false);
|
||||||
|
Reference in New Issue
Block a user