mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Fix incorrect load state when selecting all hosts from the hosts filter (#3426)
This commit is contained in:
parent
51b19b445f
commit
1d891cd343
3 changed files with 10 additions and 9 deletions
1
changes/issue-3260-fix-load-state
Normal file
1
changes/issue-3260-fix-load-state
Normal file
|
|
@ -0,0 +1 @@
|
|||
* Fix incorrect load state when selecting all hosts from the hosts filter.
|
||||
|
|
@ -530,9 +530,8 @@ const ManageHostsPage = ({
|
|||
softwareId,
|
||||
]);
|
||||
|
||||
const handleLabelChange = ({ slug }: ILabel) => {
|
||||
const handleLabelChange = ({ slug }: ILabel): boolean => {
|
||||
if (!slug) {
|
||||
console.error("Slug was missing. This should not happen.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -580,6 +579,8 @@ const ManageHostsPage = ({
|
|||
queryParams: newQueryParams,
|
||||
})
|
||||
);
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
const handleChangePoliciesFilter = (response: PolicyResponse) => {
|
||||
|
|
@ -1480,13 +1481,12 @@ const ManageHostsPage = ({
|
|||
return <TableDataError />;
|
||||
}
|
||||
|
||||
// Hosts have not been set up for this instance yet.
|
||||
// There are no hosts for this instance yet
|
||||
if (
|
||||
(getStatusSelected() === ALL_HOSTS_LABEL && selectedLabel.count === 0) ||
|
||||
(getStatusSelected() === ALL_HOSTS_LABEL &&
|
||||
filteredHostCount === 0 &&
|
||||
searchQuery === "" &&
|
||||
!isHostsLoading)
|
||||
getStatusSelected() === ALL_HOSTS_LABEL &&
|
||||
filteredHostCount === 0 &&
|
||||
searchQuery === "" &&
|
||||
!isHostsLoading
|
||||
) {
|
||||
return (
|
||||
<NoHosts
|
||||
|
|
@ -1566,6 +1566,7 @@ const ManageHostsPage = ({
|
|||
(isPremiumTier && !currentTeam?.id && !isLoadingTeams)) &&
|
||||
!isGlobalSecretsLoading &&
|
||||
!globalSecrets?.length;
|
||||
|
||||
return ((canEnrollHosts && noTeamEnrollSecrets) ||
|
||||
(canEnrollGlobalHosts && noGlobalEnrollSecrets)) &&
|
||||
showNoEnrollSecretBanner ? (
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
*/
|
||||
import React from "react";
|
||||
import Button from "components/buttons/Button";
|
||||
import { ITeam } from "interfaces/team";
|
||||
|
||||
import RoboDogImage from "../../../../../../assets/images/robo-dog-176x144@2x.png";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue