diff --git a/webui/src/features/reporting/ProviderReportWorkspace.tsx b/webui/src/features/reporting/ProviderReportWorkspace.tsx index 7092310..b128508 100644 --- a/webui/src/features/reporting/ProviderReportWorkspace.tsx +++ b/webui/src/features/reporting/ProviderReportWorkspace.tsx @@ -1,7 +1,7 @@ import { DescriptionList } from "@govoplan/core-webui"; import { Download, FileJson, Play, ShieldCheck } from "lucide-react"; import { useEffect, useMemo, useState } from "react"; -import { ContentGrid, ActionToolbar, +import { ContentGrid, Button, Card, DismissibleAlert, @@ -9,6 +9,7 @@ import { ContentGrid, ActionToolbar, MetricCard, StatePanel, StatusBadge, + WorkspaceActionBar, hasScope, type ApiSettings, type AuthInfo @@ -176,15 +177,20 @@ export function ProviderReportWorkspace({ settings, auth, report }: { {execution ? <> - - Generated {formatDateTime(execution.generated_at)} - {report.export_formats.includes("csv") && + Generated {formatDateTime(execution.generated_at)}} + primaryActions={<> + {report.export_formats.includes("csv") && } variant="ghost" onClick={() => void download("csv")} /> - } - {report.export_formats.includes("json") && + } + {report.export_formats.includes("json") && } variant="ghost" onClick={() => void download("json")} /> - } - + } + } + />
diff --git a/webui/src/features/reporting/ReportingPage.tsx b/webui/src/features/reporting/ReportingPage.tsx index 8f55d64..7af6593 100644 --- a/webui/src/features/reporting/ReportingPage.tsx +++ b/webui/src/features/reporting/ReportingPage.tsx @@ -7,7 +7,6 @@ import { FolderOutput, History, Play, - RefreshCw, Save, Search, SlidersHorizontal, @@ -19,7 +18,7 @@ import { useState, type FormEvent } from "react"; -import { FormGrid, ActionToolbar, +import { FormGrid, Button, DataGrid, Dialog, @@ -37,6 +36,7 @@ import { FormGrid, ActionToolbar, StatusBadge, ToggleSwitch, hasScope, + WorkspaceActionBar, WorkspaceFrame, type DataGridColumn, type PlatformRouteContext @@ -256,8 +256,14 @@ export default function ReportingPage({ settings, auth }: PlatformRouteContext) return (
- - + void reload(), loading, label: "Reload reports" }} + className="reporting-toolbar" + contextActions={<> + - {reports.length + providerReports.length} reports - + {reports.length + providerReports.length} reports + } + helpAction={ - } - variant="ghost" - onClick={() => void reload()} - /> - + />} + /> {error && {error} @@ -345,8 +346,11 @@ export default function ReportingPage({ settings, auth }: PlatformRouteContext) onQueryChange={setQuery} onParametersChange={setParameters} /> - - Visual }, { id: "table", label: <> Table } ]} - /> - {execution && + />} + primaryActions={execution ? <> {execution.total_rows} rows{execution.truncated ? " (truncated)" : ""} } variant="ghost" onClick={() => void downloadExecution(settings, execution.execution_id, "csv").catch((reason) => setError(message(reason)))} /> @@ -364,8 +368,8 @@ export default function ReportingPage({ settings, auth }: PlatformRouteContext) } variant="ghost" onClick={() => setPublishDialogOpen(true)} /> } - } - + : undefined} + />
{!execution && } {execution && outputMode === "visual" && }