mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
_Only merge to `main` after [back end](https://github.com/fleetdm/fleet/pull/29149) and [back end extension](https://github.com/fleetdm/fleet/pull/29312)_ ## For #28699, #29143, #29281 - Run scripts by filter - View batch script run summary via activity feed - Code clean up ### Run scripts by filter: <img width="1280" alt="Screenshot 2025-05-09 at 5 21 51 PM" src="https://github.com/user-attachments/assets/bcf2e275-f229-461b-8411-0e99c34af5bf" /> <img width="1280" alt="Screenshot 2025-05-09 at 5 22 47 PM" src="https://github.com/user-attachments/assets/d4882ed3-cfa6-4952-acbe-89c60d65d482" /> ### View script run summary:  - [x] Changes file added for user-visible changes in `changes/` - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import EmptyTable from "components/EmptyTable";
|
|
import TableContainer from "components/TableContainer";
|
|
import React, { useMemo } from "react";
|
|
import { IScriptBatchSummaryResponse } from "services/entities/scripts";
|
|
import {
|
|
generateTableConfig,
|
|
generateTableData,
|
|
} from "./ScriptBatchStatusTableConfig";
|
|
|
|
const baseClass = "script-batch-status-table";
|
|
|
|
interface IScriptBatchStatusTableProps {
|
|
statusData: IScriptBatchSummaryResponse;
|
|
onClickCancel: () => void;
|
|
}
|
|
|
|
const ScriptBatchStatusTable = ({
|
|
statusData,
|
|
onClickCancel,
|
|
}: IScriptBatchStatusTableProps) => {
|
|
const columnConfigs = useMemo(() => {
|
|
return generateTableConfig(onClickCancel);
|
|
}, [onClickCancel]);
|
|
const tableData = generateTableData(statusData);
|
|
|
|
return (
|
|
<TableContainer
|
|
className={baseClass}
|
|
columnConfigs={columnConfigs}
|
|
data={tableData}
|
|
isLoading={false}
|
|
emptyComponent={() => <EmptyTable />}
|
|
showMarkAllPages={false}
|
|
isAllPagesSelected={false}
|
|
manualSortBy
|
|
disableTableHeader
|
|
disablePagination
|
|
disableCount
|
|
hideFooter
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default ScriptBatchStatusTable;
|