Formatted the scheduled workflow info on the overview page
This commit is contained in:
@@ -98,25 +98,46 @@ function RateOfScheduled({ source }: { source: ScheduleSourceRate }) {
|
||||
: source.rateOf.days;
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex gap-2 items-baseline">
|
||||
<Body size="extra-small" className={workflowNodeUppercaseClasses}>
|
||||
Runs
|
||||
</Body>
|
||||
<Body size="small" className="text-slate-300 normal-case tracking-normal">
|
||||
Every {value} {unit}
|
||||
</Body>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function AtScheduled({ source }: { source: ScheduleSourceCron }) {
|
||||
return (
|
||||
<>
|
||||
<Body size="extra-small" className={workflowNodeUppercaseClasses}>
|
||||
{cronstrue.toString(source.cron, {
|
||||
throwExceptionOnParseError: false,
|
||||
verbose: false,
|
||||
use24HourTimeFormat: true,
|
||||
})}
|
||||
{" - "}({source.cron})
|
||||
</Body>
|
||||
</>
|
||||
<div className="flex flex-col gap-1.5">
|
||||
<div className="flex items-baseline gap-2">
|
||||
<Body size="extra-small" className={workflowNodeUppercaseClasses}>
|
||||
Runs
|
||||
</Body>
|
||||
<Body
|
||||
size="small"
|
||||
className="text-slate-300 normal-case tracking-normal"
|
||||
>
|
||||
{cronstrue.toString(source.cron, {
|
||||
throwExceptionOnParseError: false,
|
||||
verbose: false,
|
||||
use24HourTimeFormat: true,
|
||||
})}
|
||||
</Body>
|
||||
</div>
|
||||
<div className="flex items-baseline gap-2">
|
||||
<Body size="extra-small" className={workflowNodeUppercaseClasses}>
|
||||
Cron expression
|
||||
</Body>
|
||||
<Body
|
||||
size="small"
|
||||
className="text-slate-300 normal-case tracking-normal"
|
||||
>
|
||||
{source.cron}
|
||||
</Body>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ function WorkflowList({
|
||||
<div className="flex items-center flex-1 justify-between">
|
||||
<div className="relative flex items-center">
|
||||
{workflow.status === "CREATED" && (
|
||||
<ExclamationTriangleIcon className="absolute -top-1.5 -left-1.5 h-6 w-6 text-amber-500" />
|
||||
<ExclamationTriangleIcon className="absolute -top-1.5 -left-1.5 h-6 w-6 text-amber-400" />
|
||||
)}
|
||||
<div className="p-3 bg-slate-850 rounded-md flex-shrink-0 self-start h-20 w-20 mr-4">
|
||||
<TriggerTypeIcon
|
||||
|
||||
Reference in New Issue
Block a user