[released bug] Fleet UI: Fix ability to bulk delete hosts (#17909)

This commit is contained in:
RachelElysia 2024-03-29 11:49:15 -04:00 committed by GitHub
parent c0f693c9b2
commit 0903381abe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View File

@ -0,0 +1 @@
- Fix UI's ability to bulk delete hosts when "All teams" is selected

View File

@ -1089,12 +1089,10 @@ const ManageHostsPage = ({
const onDeleteHostSubmit = async () => {
setIsUpdatingHosts(true);
const teamId = isAnyTeamSelected ? currentTeamId ?? null : null;
try {
await (isAllMatchingHostsSelected
? hostsAPI.destroyByFilter({
teamId,
teamId: teamIdForApi,
query: searchQuery,
status,
labelId: selectedLabel?.id,

View File

@ -116,7 +116,7 @@ export interface IExportHostsOptions {
}
export interface IActionByFilter {
teamId: number | null;
teamId?: number | null;
query: string;
status: string;
labelId?: number;