- {visible.map((run) => {
- const status = automationRunStatusLabel(run.status, tx);
- const needsAttention = automationRunNeedsAttention(run.status);
- const duration = run.duration_ms === undefined
- ? null
- : formatAutomationRunDuration(run.duration_ms, locale, tx);
- const runTime = fmtDateTime(run.run_at_ms, locale);
- const runMeta = duration
- ? tx("settings.automations.history.runMetaWithDuration", "{{time}} · {{duration}}", {
- time: runTime,
- duration,
- })
- : runTime;
- const primary = needsAttention
- ? run.error || status
- : tx("settings.automations.history.noError", "No error recorded");
- const secondary = needsAttention ? `${status} · ${runMeta}` : runMeta;
- return (
-
-
-
-
- {primary}
-
-
- {secondary}
-
-
-
- {status}
-
-
- );
- })}
-
- ) : null}
-