= ({
hideSymbol
copyIcon={}
checkIcon={}
+ {...props}
>
diff --git a/components/scans/table/column-scans.tsx b/components/scans/table/column-scans.tsx
index 401f02aa14..624d2bdc40 100644
--- a/components/scans/table/column-scans.tsx
+++ b/components/scans/table/column-scans.tsx
@@ -1,122 +1,56 @@
"use client";
import { ColumnDef } from "@tanstack/react-table";
-import { add } from "date-fns";
-import {
- DateWithTime,
- ProviderInfo,
- SnippetIdProvider,
-} from "@/components/providers";
-import { DataTableColumnHeader, StatusBadge } from "@/components/ui/table";
+import { AddIcon } from "@/components/icons/Icons";
+import { ProviderInfoShort } from "@/components/providers";
+import { CustomButton } from "@/components/ui/custom";
import { ProviderProps } from "@/types";
-import { DataTableRowActions } from "./data-table-row-actions";
-
const getProviderData = (row: { original: ProviderProps }) => {
return row.original;
};
export const ColumnScans: ColumnDef[] = [
{
- header: " ",
- cell: ({ row }) => {row.index + 1}
,
- },
- {
- accessorKey: "account",
- header: ({ column }) => (
-
- ),
+ accessorKey: "provider",
+ header: "Provider",
cell: ({ row }) => {
const {
- attributes: { connection, provider, alias },
+ attributes: { connection, provider, alias, uid },
} = getProviderData(row);
return (
-
);
},
},
{
- accessorKey: "uid",
- header: ({ column }) => (
-
- ),
+ accessorKey: "launchScan",
+ header: "Launch Scan",
cell: ({ row }) => {
const {
attributes: { uid },
} = getProviderData(row);
- return ;
- },
- },
- {
- accessorKey: "status",
- header: "Scan Status",
- cell: () => {
- // Temporarily overwriting the value until the API is functional.
- return ;
- },
- },
- {
- accessorKey: "lastScan",
- header: ({ column }) => (
-
- ),
- cell: ({ row }) => {
- const {
- attributes: { updated_at },
- } = getProviderData(row);
- return ;
- },
- },
- {
- accessorKey: "nextScan",
- header: "Next Scan",
- cell: ({ row }) => {
- const {
- attributes: { updated_at },
- } = getProviderData(row);
- const nextDay = add(new Date(updated_at), {
- hours: 24,
- });
- return ;
- },
- },
- {
- accessorKey: "resources",
- header: "Resources",
- cell: () => {
- // Temporarily overwriting the value until the API is functional.
- return {288}
;
- },
- },
- {
- accessorKey: "added",
- header: ({ column }) => (
-
- ),
- cell: ({ row }) => {
- const {
- attributes: { inserted_at },
- } = getProviderData(row);
- return ;
- },
- },
- {
- id: "actions",
- cell: ({ row }) => {
- return ;
+ return (
+ }
+ onPress={() => {
+ console.log(uid);
+ }}
+ >
+ Start
+
+ );
},
},
];
diff --git a/components/ui/table/data-table.tsx b/components/ui/table/data-table.tsx
index 30593a7cf9..ecec4422a3 100644
--- a/components/ui/table/data-table.tsx
+++ b/components/ui/table/data-table.tsx
@@ -58,9 +58,11 @@ export function DataTable({
return (
<>
-
-
-
+ {customFilters && (
+
+
+
+ )}