mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
chore(deps): upgrade react-table to v8 [EE-4837] (#8245)
This commit is contained in:
parent
f20d3e72b9
commit
757461d58b
140 changed files with 1805 additions and 2872 deletions
|
@ -1,23 +1,20 @@
|
|||
import { CellProps, Column } from 'react-table';
|
||||
|
||||
import { formatDate } from '@/portainer/filters/filters';
|
||||
|
||||
import { Service } from '../../types';
|
||||
import { columnHelper } from './helper';
|
||||
|
||||
export const created: Column<Service> = {
|
||||
Header: 'Created',
|
||||
export const created = columnHelper.accessor('CreationTimestamp', {
|
||||
header: 'Created',
|
||||
id: 'created',
|
||||
accessor: (row) => row.CreationTimestamp,
|
||||
Cell: ({ row }: CellProps<Service>) => {
|
||||
cell: ({ row, getValue }) => {
|
||||
const date = formatDate(getValue());
|
||||
|
||||
const owner =
|
||||
row.original.Labels?.['io.portainer.kubernetes.application.owner'];
|
||||
|
||||
if (owner) {
|
||||
return `${formatDate(row.original.CreationTimestamp)} by ${owner}`;
|
||||
return `${date} by ${owner}`;
|
||||
}
|
||||
|
||||
return formatDate(row.original.CreationTimestamp);
|
||||
return date;
|
||||
},
|
||||
disableFilters: true,
|
||||
canHide: true,
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue