Report renderer progress and detect stalled jobs
This commit is contained in:
@@ -5,8 +5,10 @@ import { createBrowserClient } from "@supabase/ssr";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { api } from "./StartGame";
|
||||
import type { MapListing } from "@/lib/catalog";
|
||||
import type { ProcessingJob } from "@/shared/processing-progress";
|
||||
import { ProcessingProgress } from "./ProcessingProgress";
|
||||
type Draft = MapListing & {
|
||||
upload_jobs: { state: string; progress: number; error: string | null } | null;
|
||||
upload_jobs: ProcessingJob | null;
|
||||
};
|
||||
export function Dashboard() {
|
||||
const [maps, setMaps] = useState<Draft[]>([]),
|
||||
@@ -101,12 +103,8 @@ export function Dashboard() {
|
||||
</span>
|
||||
<h3>{m.name}</h3>
|
||||
<span className="badge">{m.state}</span>{" "}
|
||||
<span className="muted">
|
||||
{m.panorama_count} locations{" "}
|
||||
{m.upload_jobs?.state === "running"
|
||||
? `· ${m.upload_jobs.progress}% processed`
|
||||
: ""}
|
||||
</span>
|
||||
<span className="muted">{m.panorama_count} locations</span>
|
||||
<ProcessingProgress job={m.upload_jobs} />
|
||||
{m.rejection_reason && (
|
||||
<p className="error-message">{m.rejection_reason}</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user