refactor(webui): adopt semantic workspace actions
This commit is contained in:
@@ -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 }: {
|
||||
</div>
|
||||
{execution ?
|
||||
<>
|
||||
<ActionToolbar surface="panel-header" className="reporting-output-toolbar">
|
||||
<span>Generated {formatDateTime(execution.generated_at)}</span>
|
||||
{report.export_formats.includes("csv") &&
|
||||
<WorkspaceActionBar
|
||||
scope="detail-pane"
|
||||
variant="detail"
|
||||
className="reporting-output-toolbar"
|
||||
contextActions={<span>Generated {formatDateTime(execution.generated_at)}</span>}
|
||||
primaryActions={<>
|
||||
{report.export_formats.includes("csv") &&
|
||||
<IconButton label="Download CSV" icon={<Download size={17} />} variant="ghost" onClick={() => void download("csv")} />
|
||||
}
|
||||
{report.export_formats.includes("json") &&
|
||||
}
|
||||
{report.export_formats.includes("json") &&
|
||||
<IconButton label="Download JSON" icon={<FileJson size={17} />} variant="ghost" onClick={() => void download("json")} />
|
||||
}
|
||||
</ActionToolbar>
|
||||
}
|
||||
</>}
|
||||
/>
|
||||
<div className="reporting-provider-output">
|
||||
<ProviderResult execution={execution} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user