1
0
Fork 0
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:
Chaim Lev-Ari 2023-05-02 13:42:16 +07:00 committed by GitHub
parent f20d3e72b9
commit 757461d58b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
140 changed files with 1805 additions and 2872 deletions

View file

@ -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,
};
});