mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
feat(kubernetes): support for jobs and cron jobs - r8s-182 (#260)
Co-authored-by: James Carppe <85850129+jamescarppe@users.noreply.github.com> Co-authored-by: Anthony Lapenna <anthony.lapenna@portainer.io> Co-authored-by: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Co-authored-by: Oscar Zhou <100548325+oscarzhou-portainer@users.noreply.github.com> Co-authored-by: Yajith Dayarathna <yajith.dayarathna@portainer.io> Co-authored-by: LP B <xAt0mZ@users.noreply.github.com> Co-authored-by: oscarzhou <oscar.zhou@portainer.io> Co-authored-by: testA113 <aliharriss1995@gmail.com>
This commit is contained in:
parent
24fdb1f600
commit
d32b0f8b7e
51 changed files with 1786 additions and 22 deletions
|
@ -0,0 +1,47 @@
|
|||
import { CalendarCheck2 } from 'lucide-react';
|
||||
|
||||
import {
|
||||
DefaultDatatableSettings,
|
||||
TableSettings as KubeTableSettings,
|
||||
} from '@/react/kubernetes/datatables/DefaultDatatableSettings';
|
||||
|
||||
import { Datatable, TableSettingsMenu } from '@@/datatables';
|
||||
import {
|
||||
type FilteredColumnsTableSettings,
|
||||
BasicTableSettings,
|
||||
} from '@@/datatables/types';
|
||||
import { TableState } from '@@/datatables/useTableState';
|
||||
|
||||
import { columns } from '../JobsDatatable/columns';
|
||||
import { Job } from '../JobsDatatable/types';
|
||||
|
||||
interface TableSettings
|
||||
extends KubeTableSettings,
|
||||
FilteredColumnsTableSettings {}
|
||||
|
||||
interface CronJobsExecutionsProps {
|
||||
item: Job[];
|
||||
tableState: TableSettings;
|
||||
}
|
||||
|
||||
export function CronJobsExecutionsInnerDatatable({
|
||||
item,
|
||||
tableState,
|
||||
}: CronJobsExecutionsProps) {
|
||||
return (
|
||||
<Datatable
|
||||
dataset={item}
|
||||
columns={columns}
|
||||
getRowId={(row) => row.Id}
|
||||
title="Executions"
|
||||
titleIcon={CalendarCheck2}
|
||||
data-cy="k8s-cronJobs-executions-datatable"
|
||||
renderTableSettings={() => (
|
||||
<TableSettingsMenu>
|
||||
<DefaultDatatableSettings settings={tableState} />
|
||||
</TableSettingsMenu>
|
||||
)}
|
||||
settingsManager={tableState as unknown as TableState<BasicTableSettings>}
|
||||
/>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue