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-02 06:42:16 +00:00
|
|
|
export const created = columnHelper.accessor('CreationDate', {
|
|
|
|
header: 'Created',
|
|
|
|
cell: ({ row, getValue }) => {
|
|
|
|
const date = formatDate(getValue());
|
2023-03-02 19:45:19 +00:00
|
|
|
const owner =
|
|
|
|
row.original.Labels?.['io.portainer.kubernetes.ingress.owner'];
|
|
|
|
|
|
|
|
if (owner) {
|
2023-05-02 06:42:16 +00:00
|
|
|
return `${date} by ${owner}`;
|
2023-03-02 19:45:19 +00:00
|
|
|
}
|
|
|
|
|
2023-05-02 06:42:16 +00:00
|
|
|
return date;
|
2023-03-02 19:45:19 +00:00
|
|
|
},
|
2023-05-02 06:42:16 +00:00
|
|
|
id: 'created',
|
|
|
|
});
|