Update moment time format in Device and Gateway list page

Details:
- Also shows "Never" when timestamp not available.

Signed-off-by: SAGAR PATEL <sagar.a.patel@slscorp.com>
This commit is contained in:
SAGAR PATEL 2022-04-07 16:36:42 +05:30
parent 0fe1ff10b4
commit 6640496e10
2 changed files with 4 additions and 2 deletions

View File

@ -71,6 +71,7 @@ class ListDevices extends Component<IProps, IState> {
ts.setUTCSeconds(record.lastSeenAt.seconds);
return moment(ts).format("YYYY-MM-DD HH:mm:ss");
}
return "Never";
},
},
{
@ -205,4 +206,4 @@ class ListDevices extends Component<IProps, IState> {
}
}
export default ListDevices;
export default ListDevices;

View File

@ -32,6 +32,7 @@ class ListGateways extends Component<IProps> {
ts.setUTCSeconds(record.lastSeenAt.seconds);
return moment(ts).format("YYYY-MM-DD HH:mm:ss");
}
return "Never";
}
},
{
@ -125,4 +126,4 @@ class ListGateways extends Component<IProps> {
}
}
export default ListGateways;
export default ListGateways;