fix conditions for batch run ui disabling (#29599)
## For #29595 - Only depend on total filtered hosts count when selecting all hosts on all pages  - [x] Manual QA for all new/changed functionality Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
co-authored by
Jacob Shandling
parent
9ba16421cc
commit
b96ce7cdfd
@@ -1647,18 +1647,19 @@ const ManageHostsPage = ({
|
||||
);
|
||||
} else if (isAllTeamsSelected && isPremiumTier) {
|
||||
disableRunScriptBatchTooltipContent = "Select a team to run a script";
|
||||
} else if (runScriptBatchFilterNotSupported && isAllMatchingHostsSelected) {
|
||||
disableRunScriptBatchTooltipContent =
|
||||
"Choose different filters to run a script";
|
||||
} else if (
|
||||
// default to blocking until count API responds
|
||||
!totalFilteredHostsCount ||
|
||||
totalFilteredHostsCount > MAX_SCRIPT_BATCH_TARGETS
|
||||
) {
|
||||
disableRunScriptBatchTooltipContent =
|
||||
"Target at most 5,000 hosts to run a script";
|
||||
} else if (isAllMatchingHostsSelected) {
|
||||
if (runScriptBatchFilterNotSupported) {
|
||||
disableRunScriptBatchTooltipContent =
|
||||
"Choose different filters to run a script";
|
||||
} else if (
|
||||
// default to blocking until count API responds
|
||||
!totalFilteredHostsCount ||
|
||||
totalFilteredHostsCount > MAX_SCRIPT_BATCH_TARGETS
|
||||
) {
|
||||
disableRunScriptBatchTooltipContent =
|
||||
"Target at most 5,000 hosts to run a script";
|
||||
}
|
||||
}
|
||||
|
||||
const secondarySelectActions: IActionButtonProps[] = [
|
||||
{
|
||||
name: "run-script",
|
||||
|
||||
Reference in New Issue
Block a user