Fleet UI: Make OS copies in dashboard are consistent (#27248)

This commit is contained in:
RachelElysia 2025-03-20 09:20:10 -04:00 committed by GitHub
parent 3d3c901d3c
commit 59d9cafbdd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 13 deletions

View file

@ -239,29 +239,29 @@ const DashboardPage = ({ router, location }: IDashboardProps): JSX.Element => {
(platform: IHostSummaryPlatforms) => platform.platform === "windows"
) || { platform: "windows", hosts_count: 0 };
const chromebooks = data.platforms?.find(
const chomeOSHosts = data.platforms?.find(
(platform: IHostSummaryPlatforms) => platform.platform === "chrome"
) || { platform: "chrome", hosts_count: 0 };
const iphones = data.platforms?.find(
const iOSHosts = data.platforms?.find(
(platform: IHostSummaryPlatforms) => platform.platform === "ios"
) || { platform: "ios", hosts_count: 0 };
const ipads = data.platforms?.find(
const iPadOSHosts = data.platforms?.find(
(platform: IHostSummaryPlatforms) => platform.platform === "ipados"
) || { platform: "ipados", hosts_count: 0 };
const android = data.platforms?.find(
const androidHosts = data.platforms?.find(
(platform: IHostSummaryPlatforms) => platform.platform === "android"
) || { platform: "android", hosts_count: 0 };
setMacCount(macHosts.hosts_count);
setWindowsCount(windowsHosts.hosts_count);
setLinuxCount(data.all_linux_count);
setChromeCount(chromebooks.hosts_count);
setIosCount(iphones.hosts_count);
setIpadosCount(ipads.hosts_count);
setAndroidCount(android.hosts_count);
setChromeCount(chomeOSHosts.hosts_count);
setIosCount(iOSHosts.hosts_count);
setIpadosCount(iPadOSHosts.hosts_count);
setAndroidCount(androidHosts.hosts_count);
setShowHostsUI(true);
},
}

View file

@ -78,7 +78,7 @@ const OperatingSystems = ({
auto-update expiration date.{" "}
<CustomLink
url="https://fleetdm.com/learn-more-about/chromeos-updates"
text="See supported devices"
text="Learn more"
newTab
multiline
/>

View file

@ -138,7 +138,7 @@ const PlatformHostCounts = ({
<HostCountCard
iconName="chrome"
count={chromeCount}
title="Chromebooks"
title="ChromeOS"
path={getPathWithQueryParams(PATHS.MANAGE_HOSTS_LABEL(chromeLabelId), {
team_id: teamId,
})}
@ -161,7 +161,7 @@ const PlatformHostCounts = ({
<HostCountCard
iconName="iOS"
count={iosCount}
title="iPhones"
title="iOS"
path={getPathWithQueryParams(PATHS.MANAGE_HOSTS_LABEL(iosLabelId), {
team_id: teamId,
})}
@ -184,7 +184,7 @@ const PlatformHostCounts = ({
<HostCountCard
iconName="iPadOS"
count={ipadosCount}
title="iPads"
title="iPadOS"
path={getPathWithQueryParams(PATHS.MANAGE_HOSTS_LABEL(ipadosLabelId), {
team_id: teamId,
})}

View file

@ -1203,7 +1203,7 @@ func IOSiPadOSRefetch(ctx context.Context, ds fleet.Datastore, commander *MDMApp
start := time.Now()
devices, err := ds.ListIOSAndIPadOSToRefetch(ctx, 1*time.Hour)
if err != nil {
return ctxerr.Wrap(ctx, err, "list ios and ipad devices to refetch")
return ctxerr.Wrap(ctx, err, "list ios and ipados devices to refetch")
}
if len(devices) == 0 {
return nil