mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
feat(edge): sort waiting room table [EE-6259] (#10577)
This commit is contained in:
parent
32d8dc311b
commit
25741e8c4c
10 changed files with 306 additions and 106 deletions
|
@ -8,27 +8,32 @@ const columnHelper = createColumnHelper<WaitingRoomEnvironment>();
|
|||
export const columns = [
|
||||
columnHelper.accessor('Name', {
|
||||
header: 'Name',
|
||||
id: 'name',
|
||||
id: 'Name',
|
||||
}),
|
||||
columnHelper.accessor('EdgeID', {
|
||||
header: 'Edge ID',
|
||||
id: 'edge-id',
|
||||
id: 'EdgeID',
|
||||
}),
|
||||
columnHelper.accessor((row) => row.EdgeGroups.join(', ') || '-', {
|
||||
columnHelper.accessor((row) => row.EdgeGroups.join(', '), {
|
||||
header: 'Edge Groups',
|
||||
id: 'edge-groups',
|
||||
enableSorting: false,
|
||||
cell: ({ getValue }) => getValue() || '-',
|
||||
}),
|
||||
columnHelper.accessor((row) => row.Group || '-', {
|
||||
columnHelper.accessor((row) => row.Group, {
|
||||
header: 'Group',
|
||||
id: 'group',
|
||||
id: 'Group',
|
||||
cell: ({ getValue }) => getValue() || '-',
|
||||
}),
|
||||
columnHelper.accessor((row) => row.Tags.join(', ') || '-', {
|
||||
columnHelper.accessor((row) => row.Tags.join(', '), {
|
||||
header: 'Tags',
|
||||
id: 'tags',
|
||||
enableSorting: false,
|
||||
cell: ({ getValue }) => getValue() || '-',
|
||||
}),
|
||||
columnHelper.accessor((row) => row.LastCheckInDate, {
|
||||
header: 'Last Check-in',
|
||||
id: 'last-check-in',
|
||||
id: 'LastCheckIn',
|
||||
cell: ({ getValue }) => {
|
||||
const value = getValue();
|
||||
return value ? moment(value * 1000).fromNow() : '-';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue