1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 06:19:41 +02:00
portainer/app/react/kubernetes/ServicesView/ServicesDatatable/columns/created.tsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
611 B
TypeScript
Raw Normal View History

import { CellProps, Column } from 'react-table';
import { formatDate } from '@/portainer/filters/filters';
import { Service } from '../../types';
export const created: Column<Service> = {
Header: 'Created',
id: 'created',
accessor: (row) => row.CreationTimestamp,
Cell: ({ row }: CellProps<Service>) => {
const owner =
row.original.Labels?.['io.portainer.kubernetes.application.owner'];
if (owner) {
return `${formatDate(row.original.CreationTimestamp)} by ${owner}`;
}
return formatDate(row.original.CreationTimestamp);
},
disableFilters: true,
canHide: true,
};