fleet/frontend/pages/hosts/details/OSSettingsModal/OSSettingsTable/OSSettingsTable.tsx
Gabriel Hernandez 1e6839c004
Feat UI resend profile (#18111)
relates to #17896

UI implementation of the resend profile feature. This adds a resend
button on the OS Settings modal row items that will request the profile
is resent.


![image](https://github.com/fleetdm/fleet/assets/1153709/f9072ccc-2d28-4638-adea-da3cb25da33b)

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Roberto Dip <me@roperzh.com>
2024-04-15 14:17:08 +01:00

46 lines
1,018 B
TypeScript

import React from "react";
import TableContainer from "components/TableContainer";
import generateTableHeaders, {
IHostMdmProfileWithAddedStatus,
} from "./OSSettingsTableConfig";
const baseClass = "os-settings-table";
interface IOSSettingsTableProps {
canResendProfiles: boolean;
hostId: number;
tableData: IHostMdmProfileWithAddedStatus[];
onProfileResent?: () => void;
}
const OSSettingsTable = ({
canResendProfiles,
hostId,
tableData,
onProfileResent,
}: IOSSettingsTableProps) => {
const tableConfig = generateTableHeaders(
hostId,
canResendProfiles,
onProfileResent
);
return (
<div className={baseClass}>
<TableContainer
resultsTitle="settings"
defaultSortHeader="name"
columnConfigs={tableConfig}
data={tableData}
emptyComponent="symbol"
isLoading={false}
showMarkAllPages={false}
isAllPagesSelected={false}
disablePagination
/>
</div>
);
};
export default OSSettingsTable;