2023-03-02 19:45:19 +00:00
|
|
|
import { formatDate } from '@/portainer/filters/filters';
|
|
|
|
|
2023-05-02 06:42:16 +00:00
|
|
|
import { columnHelper } from './helper';
|
2023-03-02 19:45:19 +00:00
|
|
|
|
2023-05-11 00:55:15 +00:00
|
|
|
export const created = columnHelper.accessor(
|
|
|
|
(row) => {
|
|
|
|
const owner = row.Labels?.['io.portainer.kubernetes.ingress.owner'];
|
|
|
|
const date = formatDate(row.CreationDate);
|
|
|
|
return owner ? `${date} by ${owner}` : date;
|
2023-03-02 19:45:19 +00:00
|
|
|
},
|
2023-05-11 00:55:15 +00:00
|
|
|
{
|
|
|
|
header: 'Created',
|
|
|
|
cell: ({ row, getValue }) => {
|
|
|
|
const date = formatDate(getValue());
|
|
|
|
const owner =
|
|
|
|
row.original.Labels?.['io.portainer.kubernetes.ingress.owner'];
|
|
|
|
|
|
|
|
return owner ? `${date} by ${owner}` : date;
|
|
|
|
},
|
|
|
|
id: 'created',
|
|
|
|
}
|
|
|
|
);
|