feat(studio): recover matching Nitro sources and persist import phases
This commit is contained in:
1 parent
00e33623f7
commit
13bd3695cb
45 files changed
+903
-28
No files matched your search
@@ -15,6 +15,7 @@ export function FurnitureJobHistory({
|
||||
}) {
|
||||
const t = useTranslations("pages.admin.importHistory");
|
||||
const format = useFormatter();
|
||||
const progressT = useTranslations("pages.admin.importProgress");
|
||||
const [limits, setLimits] = useState<Record<string, number>>({});
|
||||
return (
|
||||
<details
|
||||
@@ -94,6 +95,29 @@ export function FurnitureJobHistory({
|
||||
<li key={item.classname}>
|
||||
<strong>{item.classname}</strong> · {t(item.state)}
|
||||
{item.itemId ? ` · ID ${item.itemId}` : ""}
|
||||
{item.phase &&
|
||||
(item.state === "running" ||
|
||||
item.state === "failed" ||
|
||||
item.state === "interrupted") && (
|
||||
<p className="text-xs text-[var(--admin-text-muted)]">
|
||||
{progressT(
|
||||
item.state === "running" ? "current" : "last",
|
||||
{ phase: progressT(item.phase) },
|
||||
)}
|
||||
{item.state === "running" &&
|
||||
item.phaseStartedAt &&
|
||||
` · ${progressT("elapsed", { seconds: Math.max(0, Math.floor((Date.now() - Date.parse(item.phaseStartedAt)) / 1000)) })}`}
|
||||
{item.sourceAttempt && ` · ${item.sourceAttempt}`}
|
||||
</p>
|
||||
)}
|
||||
{item.recoveredSource && (
|
||||
<p className="break-words text-xs text-[var(--admin-text-muted)]">
|
||||
{progressT("recovered", {
|
||||
source: item.recoveredSource.sourceName,
|
||||
revision: item.recoveredSource.revision,
|
||||
})}
|
||||
</p>
|
||||
)}
|
||||
{item.error && (
|
||||
<p className="text-[var(--admin-warning)]">
|
||||
{item.error}
|
||||
|
||||
Reference in new issue
Block a user