Fleet UI: Team saved across dashboard <> manage host link bug (#8704)

This commit is contained in:
RachelElysia 2022-11-14 15:15:37 -05:00 committed by GitHub
parent 2a98d87ee7
commit 928b4be2c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View file

@ -401,6 +401,7 @@ const DashboardPage = (): JSX.Element => {
isLoadingHosts={isHostSummaryFetching}
showHostsUI={showHostsUI}
selectedPlatformLabelId={selectedPlatformLabelId}
currentTeamId={currentTeam?.id}
/>
),
});
@ -414,6 +415,7 @@ const DashboardPage = (): JSX.Element => {
isLoadingHosts={isHostSummaryFetching}
showHostsUI={showHostsUI}
selectedPlatformLabelId={selectedPlatformLabelId}
currentTeamId={currentTeam?.id}
/>
),
});

View file

@ -13,6 +13,7 @@ interface IHostSummaryProps {
isLoadingHosts: boolean;
showHostsUI: boolean;
selectedPlatformLabelId?: number;
currentTeamId?: number;
}
const LowDiskSpaceHosts = ({
@ -21,11 +22,13 @@ const LowDiskSpaceHosts = ({
isLoadingHosts,
showHostsUI,
selectedPlatformLabelId,
currentTeamId,
}: IHostSummaryProps): JSX.Element => {
// build the manage hosts URL filtered by low disk space only
// currently backend cannot filter by both low disk space and label
const queryParams = {
low_disk_space: lowDiskSpaceGb,
team_id: currentTeamId,
};
const queryString = buildQueryStringFromParams(queryParams);
const endpoint = selectedPlatformLabelId

View file

@ -12,6 +12,7 @@ interface IHostSummaryProps {
isLoadingHosts: boolean;
showHostsUI: boolean;
selectedPlatformLabelId?: number;
currentTeamId?: number;
}
const MissingHosts = ({
@ -19,10 +20,12 @@ const MissingHosts = ({
isLoadingHosts,
showHostsUI,
selectedPlatformLabelId,
currentTeamId,
}: IHostSummaryProps): JSX.Element => {
// build the manage hosts URL filtered by missing and platform
const queryParams = {
status: "missing",
team_id: currentTeamId,
};
const queryString = buildQueryStringFromParams(queryParams);
const endpoint = selectedPlatformLabelId