ui: Fix formatting template after merging .

This commit is contained in:
Orne Brocaar 2024-07-30 11:18:52 +01:00
parent 6a691c62e2
commit 98978135c4
8 changed files with 14 additions and 15 deletions

@ -25,7 +25,7 @@ function LogTable(props: IProps) {
const onDrawerOpen = (time: { seconds: number } | undefined, body: string) => {
const ts = new Date(0);
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 () => {
setBody(body);
@ -106,7 +106,7 @@ function LogTable(props: IProps) {
render: (text, obj) => {
const ts = new Date(0);
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 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(),
tlsCert: cert.getTlsCert(),
tlsKey: cert.getTlsKey(),

@ -153,7 +153,7 @@ function DeviceDashboard(props: IProps) {
let lastSeenAt = "Never";
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;

@ -75,7 +75,7 @@ function ListDevices(props: IProps) {
if (record.lastSeenAt !== undefined) {
const ts = new Date(0);
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";
},
@ -87,9 +87,8 @@ function ListDevices(props: IProps) {
width: 250,
render: (text, record) => (
<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}
</Link>
@ -180,7 +179,7 @@ function ListDevices(props: IProps) {
req.setMulticastGroupId(mgSelected);
req.setDevEui(devEui);
MulticastGroupStore.addDevice(req, () => {});
MulticastGroupStore.addDevice(req, () => { });
}
setMgModalVisible(false);
@ -192,7 +191,7 @@ function ListDevices(props: IProps) {
req.setRelayDevEui(relaySelected);
req.setDeviceDevEui(devEui);
RelayStore.addDevice(req, () => {});
RelayStore.addDevice(req, () => { });
}
setRelayModalVisible(false);

@ -55,7 +55,7 @@ function GatewayCertificate(props: IProps) {
const cert = certificate!;
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(),
tlsCert: cert.getTlsCert(),
tlsKey: cert.getTlsKey(),

@ -89,7 +89,7 @@ function GatewayDashboard(props: IProps) {
let lastSeenAt: string = "Never";
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 (

@ -66,7 +66,7 @@ function ListGateways(props: IProps) {
if (record.lastSeenAt !== undefined) {
const ts = new Date(0);
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.setGatewayId(gatewayId);
MulticastGroupStore.addGateway(req, () => {});
MulticastGroupStore.addGateway(req, () => { });
}
setMgModalVisible(false);

@ -46,7 +46,7 @@ function ListRelayGateways(props: IProps) {
if (record.lastSeenAt !== undefined) {
const ts = new Date(0);
ts.setUTCSeconds(record.lastSeenAt.seconds);
return format(ts, "YYYY-MM-DD HH:mm:ss");
return format(ts, "yyyy-MM-dd HH:mm:ss");
}
},
},