Skip to content

Commit

Permalink
feat(scans): show scan details right after launch (#6791)
Browse files Browse the repository at this point in the history
  • Loading branch information
paabloLC committed Feb 10, 2025
1 parent cddda1e commit dee1773
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 31 deletions.
3 changes: 0 additions & 3 deletions ui/app/(prowler)/scans/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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} />
</>
)}
Expand Down
1 change: 0 additions & 1 deletion ui/components/scans/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 0 additions & 18 deletions ui/components/scans/scan-warning-bar.tsx

This file was deleted.

8 changes: 3 additions & 5 deletions ui/components/scans/table/scan-detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
8 changes: 4 additions & 4 deletions ui/components/scans/table/scans/column-get-scans.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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} />;
},
},
{
Expand Down

0 comments on commit dee1773

Please sign in to comment.