[P1] Fleet UI: Hide bulk selection when unsupported filter (#17463)

This commit is contained in:
RachelElysia 2024-03-07 16:38:25 -05:00 committed by GitHub
parent 70d369dcf7
commit 7e264b386f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1030,6 +1030,7 @@ const ManageHostsPage = ({
setSelectedHostIds(hostIds);
};
// Bulk transfer is hidden for defined unsupportedFilters
const onTransferHostSubmit = async (transferTeam: ITeam) => {
setIsUpdatingHosts(true);
@ -1083,6 +1084,7 @@ const ManageHostsPage = ({
}
};
// Bulk delete is hidden for defined unsupportedFilters
const onDeleteHostSubmit = async () => {
setIsUpdatingHosts(true);
@ -1501,6 +1503,27 @@ const ManageHostsPage = ({
return emptyHosts;
};
// Shortterm fix for #17257
const unsupportedFilter = !!(
policyId ||
policyResponse ||
softwareId ||
softwareTitleId ||
softwareVersionId ||
osName ||
osVersionId ||
osVersion ||
macSettingsStatus ||
bootstrapPackageStatus ||
mdmId ||
mdmEnrollmentStatus ||
munkiIssueId ||
lowDiskSpaceHosts ||
osSettingsStatus ||
diskEncryptionStatus ||
vulnerability
);
return (
<TableContainer
resultsTitle="hosts"
@ -1532,7 +1555,7 @@ const ManageHostsPage = ({
onActionButtonClick: onDeleteHostsClick,
}}
secondarySelectActions={secondarySelectActions}
showMarkAllPages
showMarkAllPages={!unsupportedFilter} // Shortterm fix for #17257
isAllPagesSelected={isAllMatchingHostsSelected}
searchable
renderCount={renderHostCount}