feat(scans): show scan details right after launch (#6791)

This commit is contained in:
Pablo Lara
2025-02-03 16:08:47 +01:00
parent cddda1e64e
commit dee17733a0
5 changed files with 7 additions and 31 deletions
-3
View File
@@ -8,7 +8,6 @@ import {
ButtonRefreshData,
NoProvidersAdded,
NoProvidersConnected,
ScanWarningBar,
} from "@/components/scans";
import { LaunchScanWorkflow } from "@/components/scans/launch-workflow";
import { SkeletonTableScans } from "@/components/scans/table";
@@ -73,8 +72,6 @@ export default async function Scans({
<Header title="Scans" icon="lucide:scan-search" />
<LaunchScanWorkflow providers={providerInfo} />
<Spacer y={4} />
<ScanWarningBar />
<Spacer y={8} />
</>
)}
-1
View File
@@ -2,4 +2,3 @@ export * from "./button-refresh-data";
export * from "./link-to-findings-from-scan";
export * from "./no-providers-added";
export * from "./no-providers-connected";
export * from "./scan-warning-bar";
-18
View File
@@ -1,18 +0,0 @@
"use client";
import { InfoIcon } from "../icons";
export const ScanWarningBar = () => {
return (
<div className="flex items-center rounded-lg border border-system-warning bg-system-warning-medium p-4 text-sm dark:text-default-300">
<InfoIcon className="mr-4 inline h-4 w-4 flex-shrink-0" />
<div className="flex flex-col gap-1">
<strong>Waiting for Your Scan to Show Up?</strong>
<p>
It may take a few minutes for the scan to appear on the table and be
displayed.
</p>
</div>
</div>
);
};
+3 -5
View File
@@ -117,11 +117,9 @@ export const ScanDetail = ({
<InfoField label="Completed At">
<DateWithTime inline dateTime={scan.completed_at || "-"} />
</InfoField>
{scan.next_scan_at && (
<InfoField label="Scheduled At">
<DateWithTime inline dateTime={scan.next_scan_at} />
</InfoField>
)}
<InfoField label="Scheduled At">
<DateWithTime inline dateTime={scan.scheduled_at || "-"} />
</InfoField>
</div>
</Section>
@@ -123,13 +123,13 @@ export const ColumnGetScans: ColumnDef<ScanProps>[] = [
},
},
{
accessorKey: "next_scan_at",
header: "Next scan",
accessorKey: "scheduled_at",
header: "Scheduled at",
cell: ({ row }) => {
const {
attributes: { next_scan_at },
attributes: { scheduled_at },
} = getScanData(row);
return <DateWithTime dateTime={next_scan_at} />;
return <DateWithTime dateTime={scheduled_at} />;
},
},
{