2020-10-15 03:13:36 +00:00
|
|
|
import { Schedule } from '@/api/server/schedules/getServerSchedules';
|
2022-06-20 19:28:27 +00:00
|
|
|
import classNames from 'classnames';
|
2020-10-15 03:13:36 +00:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
cron: Schedule['cron'];
|
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const ScheduleCronRow = ({ cron, className }: Props) => (
|
2022-06-20 19:28:27 +00:00
|
|
|
<div className={classNames('flex', className)}>
|
2023-01-12 19:31:47 +00:00
|
|
|
<div className={'w-1/5 text-center sm:w-auto'}>
|
2022-06-20 19:28:27 +00:00
|
|
|
<p className={'font-medium'}>{cron.minute}</p>
|
2023-01-12 19:31:47 +00:00
|
|
|
<p className={'text-2xs uppercase text-neutral-500'}>Minute</p>
|
2020-10-15 03:13:36 +00:00
|
|
|
</div>
|
2023-01-12 19:31:47 +00:00
|
|
|
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
|
2022-06-20 19:28:27 +00:00
|
|
|
<p className={'font-medium'}>{cron.hour}</p>
|
2023-01-12 19:31:47 +00:00
|
|
|
<p className={'text-2xs uppercase text-neutral-500'}>Hour</p>
|
2020-10-15 03:13:36 +00:00
|
|
|
</div>
|
2023-01-12 19:31:47 +00:00
|
|
|
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
|
2022-06-20 19:28:27 +00:00
|
|
|
<p className={'font-medium'}>{cron.dayOfMonth}</p>
|
2023-01-12 19:31:47 +00:00
|
|
|
<p className={'text-2xs uppercase text-neutral-500'}>Day (Month)</p>
|
2020-10-15 03:13:36 +00:00
|
|
|
</div>
|
2023-01-12 19:31:47 +00:00
|
|
|
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
|
2022-06-20 19:28:27 +00:00
|
|
|
<p className={'font-medium'}>{cron.month}</p>
|
2023-01-12 19:31:47 +00:00
|
|
|
<p className={'text-2xs uppercase text-neutral-500'}>Month</p>
|
2020-10-15 03:13:36 +00:00
|
|
|
</div>
|
2023-01-12 19:31:47 +00:00
|
|
|
<div className={'ml-4 w-1/5 text-center sm:w-auto'}>
|
2022-06-20 19:28:27 +00:00
|
|
|
<p className={'font-medium'}>{cron.dayOfWeek}</p>
|
2023-01-12 19:31:47 +00:00
|
|
|
<p className={'text-2xs uppercase text-neutral-500'}>Day (Week)</p>
|
2020-10-15 03:13:36 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default ScheduleCronRow;
|