mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
feat(waiting-room): show and filter by check in [EE-5186] (#8701)
This commit is contained in:
parent
b5771df6a8
commit
4b9c857d85
10 changed files with 108 additions and 25 deletions
|
@ -1,3 +1,4 @@
|
|||
import moment from 'moment';
|
||||
import { CellProps, Column } from 'react-table';
|
||||
|
||||
import { WaitingRoomEnvironment } from '../types';
|
||||
|
@ -52,4 +53,24 @@ export const columns: readonly Column<WaitingRoomEnvironment>[] = [
|
|||
canHide: false,
|
||||
sortType: 'string',
|
||||
},
|
||||
{
|
||||
Header: 'Last Check-in',
|
||||
accessor: 'LastCheckInDate',
|
||||
Cell: LastCheckinDateCell,
|
||||
id: 'last-check-in',
|
||||
disableFilters: true,
|
||||
Filter: () => null,
|
||||
canHide: false,
|
||||
sortType: 'string',
|
||||
},
|
||||
] as const;
|
||||
|
||||
function LastCheckinDateCell({
|
||||
value,
|
||||
}: CellProps<WaitingRoomEnvironment, number>) {
|
||||
if (!value) {
|
||||
return '-';
|
||||
}
|
||||
|
||||
return moment(value * 1000).fromNow();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue