mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 00:45:19 +00:00
[released bug] Fleet UI: Fix ability to bulk delete hosts (#17909)
This commit is contained in:
parent
c0f693c9b2
commit
0903381abe
1
changes/17621-bulk-delete-hosts-all-teams
Normal file
1
changes/17621-bulk-delete-hosts-all-teams
Normal file
@ -0,0 +1 @@
|
||||
- Fix UI's ability to bulk delete hosts when "All teams" is selected
|
@ -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,
|
||||
|
@ -116,7 +116,7 @@ export interface IExportHostsOptions {
|
||||
}
|
||||
|
||||
export interface IActionByFilter {
|
||||
teamId: number | null;
|
||||
teamId?: number | null;
|
||||
query: string;
|
||||
status: string;
|
||||
labelId?: number;
|
||||
|
Loading…
Reference in New Issue
Block a user