mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-04-27 14:29:40 +00:00
ui: Fix formatting template after merging #460.
This commit is contained in:
parent
6a691c62e2
commit
98978135c4
@ -25,7 +25,7 @@ function LogTable(props: IProps) {
|
|||||||
const onDrawerOpen = (time: { seconds: number } | undefined, body: string) => {
|
const onDrawerOpen = (time: { seconds: number } | undefined, body: string) => {
|
||||||
const ts = new Date(0);
|
const ts = new Date(0);
|
||||||
ts.setUTCSeconds(time!.seconds);
|
ts.setUTCSeconds(time!.seconds);
|
||||||
const drawerTitle = format(ts, "YYYY-MM-DD HH:mm:ss");
|
const drawerTitle = format(ts, "yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
setBody(body);
|
setBody(body);
|
||||||
@ -106,7 +106,7 @@ function LogTable(props: IProps) {
|
|||||||
render: (text, obj) => {
|
render: (text, obj) => {
|
||||||
const ts = new Date(0);
|
const ts = new Date(0);
|
||||||
ts.setUTCSeconds(obj.time!.seconds);
|
ts.setUTCSeconds(obj.time!.seconds);
|
||||||
return format(ts, "YYYY-MM-DD HH:mm:ss");
|
return format(ts, "yyyy-MM-dd HH:mm:ss");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ function GenerateMqttCertificate(props: IProps) {
|
|||||||
const cert = certificate!;
|
const cert = certificate!;
|
||||||
|
|
||||||
const initial = {
|
const initial = {
|
||||||
expiresAt: format(cert.getExpiresAt()!.toDate()!, "YYYY-MM-DD HH:mm:ss"),
|
expiresAt: format(cert.getExpiresAt()!.toDate()!, "yyyy-MM-dd HH:mm:ss"),
|
||||||
caCert: cert.getCaCert(),
|
caCert: cert.getCaCert(),
|
||||||
tlsCert: cert.getTlsCert(),
|
tlsCert: cert.getTlsCert(),
|
||||||
tlsKey: cert.getTlsKey(),
|
tlsKey: cert.getTlsKey(),
|
||||||
|
@ -153,7 +153,7 @@ function DeviceDashboard(props: IProps) {
|
|||||||
|
|
||||||
let lastSeenAt = "Never";
|
let lastSeenAt = "Never";
|
||||||
if (props.lastSeenAt !== undefined) {
|
if (props.lastSeenAt !== undefined) {
|
||||||
lastSeenAt = format(props.lastSeenAt, "YYYY-MM-DD HH:mm:ss");
|
lastSeenAt = format(props.lastSeenAt, "yyyy-MM-dd HH:mm:ss");
|
||||||
}
|
}
|
||||||
|
|
||||||
const loading = !deviceLinkMetricsLoaded || !deviceMetrics;
|
const loading = !deviceLinkMetricsLoaded || !deviceMetrics;
|
||||||
|
@ -75,7 +75,7 @@ function ListDevices(props: IProps) {
|
|||||||
if (record.lastSeenAt !== undefined) {
|
if (record.lastSeenAt !== undefined) {
|
||||||
const ts = new Date(0);
|
const ts = new Date(0);
|
||||||
ts.setUTCSeconds(record.lastSeenAt.seconds);
|
ts.setUTCSeconds(record.lastSeenAt.seconds);
|
||||||
return format(ts, "YYYY-MM-DD HH:mm:ss");
|
return format(ts, "yyyy-MM-dd HH:mm:ss");
|
||||||
}
|
}
|
||||||
return "Never";
|
return "Never";
|
||||||
},
|
},
|
||||||
@ -87,8 +87,7 @@ 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/${
|
to={`/tenants/${props.application.getTenantId()}/applications/${props.application.getId()}/devices/${record.devEui
|
||||||
record.devEui
|
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
@ -180,7 +179,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);
|
||||||
@ -192,7 +191,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);
|
||||||
|
@ -55,7 +55,7 @@ function GatewayCertificate(props: IProps) {
|
|||||||
const cert = certificate!;
|
const cert = certificate!;
|
||||||
|
|
||||||
const initial = {
|
const initial = {
|
||||||
expiresAt: format(cert.getExpiresAt()!.toDate()!, "YYYY-MM-DD HH:mm:ss"),
|
expiresAt: format(cert.getExpiresAt()!.toDate()!, "yyyy-MM-dd HH:mm:ss"),
|
||||||
caCert: cert.getCaCert(),
|
caCert: cert.getCaCert(),
|
||||||
tlsCert: cert.getTlsCert(),
|
tlsCert: cert.getTlsCert(),
|
||||||
tlsKey: cert.getTlsKey(),
|
tlsKey: cert.getTlsKey(),
|
||||||
|
@ -89,7 +89,7 @@ function GatewayDashboard(props: IProps) {
|
|||||||
|
|
||||||
let lastSeenAt: string = "Never";
|
let lastSeenAt: string = "Never";
|
||||||
if (props.lastSeenAt !== undefined) {
|
if (props.lastSeenAt !== undefined) {
|
||||||
lastSeenAt = format(props.lastSeenAt, "YYYY-MM-DD HH:mm:ss");
|
lastSeenAt = format(props.lastSeenAt, "yyyy-MM-dd HH:mm:ss");
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -66,7 +66,7 @@ function ListGateways(props: IProps) {
|
|||||||
if (record.lastSeenAt !== undefined) {
|
if (record.lastSeenAt !== undefined) {
|
||||||
const ts = new Date(0);
|
const ts = new Date(0);
|
||||||
ts.setUTCSeconds(record.lastSeenAt.seconds);
|
ts.setUTCSeconds(record.lastSeenAt.seconds);
|
||||||
return format(ts, "YYYY-MM-DD HH:mm:ss");
|
return format(ts, "yyyy-MM-dd HH:mm:ss");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -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);
|
||||||
|
@ -46,7 +46,7 @@ function ListRelayGateways(props: IProps) {
|
|||||||
if (record.lastSeenAt !== undefined) {
|
if (record.lastSeenAt !== undefined) {
|
||||||
const ts = new Date(0);
|
const ts = new Date(0);
|
||||||
ts.setUTCSeconds(record.lastSeenAt.seconds);
|
ts.setUTCSeconds(record.lastSeenAt.seconds);
|
||||||
return format(ts, "YYYY-MM-DD HH:mm:ss");
|
return format(ts, "yyyy-MM-dd HH:mm:ss");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user