mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
# Details This PR merges the feature branch for the scheduled scripts UI into main. This includes the following previously-approved PRs: * https://github.com/fleetdm/fleet/pull/31750 * https://github.com/fleetdm/fleet/pull/31604 * https://github.com/fleetdm/fleet/pull/31797 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. ## Testing - [X] Added/updated automated tests - [X] Where appropriate, [automated tests simulate multiple hosts and test for host isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing) (updates to one hosts's records do not affect another) - [X] QA'd all new/changed functionality manually --------- Co-authored-by: jacobshandling <61553566+jacobshandling@users.noreply.github.com> Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import EmptyTable from "components/EmptyTable";
|
|
import TableContainer from "components/TableContainer";
|
|
import React, { useMemo } from "react";
|
|
import { IScriptBatchSummaryResponseV1 } from "services/entities/scripts";
|
|
import {
|
|
generateTableConfig,
|
|
generateTableData,
|
|
} from "./ScriptBatchStatusTableConfig";
|
|
|
|
const baseClass = "script-batch-status-table";
|
|
|
|
interface IScriptBatchStatusTableProps {
|
|
statusData: IScriptBatchSummaryResponseV1;
|
|
batchExecutionId: string;
|
|
onClickCancel: () => void;
|
|
}
|
|
|
|
const ScriptBatchStatusTable = ({
|
|
statusData,
|
|
batchExecutionId,
|
|
onClickCancel,
|
|
}: IScriptBatchStatusTableProps) => {
|
|
const columnConfigs = useMemo(() => {
|
|
return generateTableConfig(
|
|
batchExecutionId,
|
|
onClickCancel,
|
|
statusData.team_id
|
|
);
|
|
}, [batchExecutionId, onClickCancel, statusData.team_id]);
|
|
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;
|