MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / getTimeMeta

Function getTimeMeta

src/components/CronJobCard.tsx:226–248  ·  view source on GitHub ↗
(job: CronJob)

Source from the content-addressed store, hash-verified

224}
225
226function getTimeMeta(job: CronJob): { label: string; value: string; hint: string } {
227 if (job.nextRun) {
228 return {
229 label: job.recurrenceKind === "once" ? "Execution Time" : "Next Run",
230 value: formatPrimaryDate(job.nextRun),
231 hint: formatRelativeTime(job.nextRun),
232 };
233 }
234
235 if (job.recurrenceKind === "once" && job.lastRun) {
236 return {
237 label: "Executed",
238 value: formatPrimaryDate(job.lastRun),
239 hint: "This is a one-time job.",
240 };
241 }
242
243 return {
244 label: "Schedule Info",
245 value: "Not scheduled",
246 hint: "Please check the schedule configuration.",
247 };
248}
249
250function getStatusIcon(tone: Tone) {
251 return tone === "error" ? AlertTriangle : tone === "success" ? CheckCircle2 : Clock3;

Callers 1

CronJobCardFunction · 0.85

Calls 2

formatPrimaryDateFunction · 0.85
formatRelativeTimeFunction · 0.85

Tested by

no test coverage detected