From abc131575b5be96c35538852abe8226367d3a35a Mon Sep 17 00:00:00 2001 From: gillespi314 <73313222+gillespi314@users.noreply.github.com> Date: Thu, 8 Sep 2022 12:20:07 -0500 Subject: [PATCH] Bring patch commits to main (#7647) --- .../hosts/ManageHostsPage/ManageHostsPage.tsx | 14 +++++++++----- server/datastore/mysql/hosts.go | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx b/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx index 32dcbd2bdd..ed9498e0d5 100644 --- a/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx +++ b/frontend/pages/hosts/ManageHostsPage/ManageHostsPage.tsx @@ -35,7 +35,10 @@ import { import { IHost } from "interfaces/host"; import { ILabel } from "interfaces/label"; import { IMDMSolution, IMunkiIssuesAggregate } from "interfaces/macadmins"; -import { IOperatingSystemVersion } from "interfaces/operating_system"; +import { + formatOperatingSystemDisplayName, + IOperatingSystemVersion, +} from "interfaces/operating_system"; import { IPolicy } from "interfaces/policy"; import { ISoftware } from "interfaces/software"; import { ITeam } from "interfaces/team"; @@ -1224,14 +1227,15 @@ const ManageHostsPage = ({ if (!os) return null; const { name, name_only, version } = os; - const label = + const label = formatOperatingSystemDisplayName( name_only || version ? `${name_only || ""} ${version || ""}` - : `${name || ""}`; - + : `${name || ""}` + ); const TooltipDescription = ( - {`Hosts with ${name_only || name}`},
+ {`Hosts with ${formatOperatingSystemDisplayName(name_only || name)}`}, +
{version && `${version} installed`}
); diff --git a/server/datastore/mysql/hosts.go b/server/datastore/mysql/hosts.go index 1b24d96510..0910893cc1 100644 --- a/server/datastore/mysql/hosts.go +++ b/server/datastore/mysql/hosts.go @@ -2435,7 +2435,7 @@ func (ds *Datastore) UpdateOSVersions(ctx context.Context) error { // nothing to do so return early if len(statsByTeamID) < 1 { // log to help troubleshooting in case this happens - level.Info(ds.logger).Log("msg", "Cannot update aggregated stats for os versions: Check for records in operating_systems and host_perating_systems.") + level.Debug(ds.logger).Log("msg", "Cannot update aggregated stats for os versions: Check for records in operating_systems and host_perating_systems.") return nil }