From d9cedcba8d39d10d3f7cd437af542ec5ff1ddd35 Mon Sep 17 00:00:00 2001 From: jacobshandling <61553566+jacobshandling@users.noreply.github.com> Date: Fri, 17 Oct 2025 14:01:03 -0700 Subject: [PATCH] Consolidate rolling linux version possibilities (#34467) **Related issue:** Resolves #34214 - [x] manual QA by @sgress454 --- frontend/interfaces/software.ts | 12 +++++++ .../cards/OperatingSystems/OSTableConfig.tsx | 12 +++---- .../SoftwareDetailsSummary.tsx | 17 +++++----- .../hosts/ManageHostsPage/HostTableConfig.tsx | 33 ++++++++----------- .../details/cards/HostSummary/HostSummary.tsx | 10 ++---- 5 files changed, 43 insertions(+), 41 deletions(-) diff --git a/frontend/interfaces/software.ts b/frontend/interfaces/software.ts index 91709fa51b..51e0ce5e69 100644 --- a/frontend/interfaces/software.ts +++ b/frontend/interfaces/software.ts @@ -713,3 +713,15 @@ export interface IFleetMaintainedAppDetails { software_title_id?: number; // null unless the team already has the software added (as a Fleet-maintained app, App Store (app), or custom package) categories: SoftwareCategory[]; } + +export const ROLLING_ARCH_LINUX_NAMES = [ + "Arch Linux", + "Arch Linux ARM", + "Manjaro Linux", + "Manjaro Linux ARM", + "Manjaro ARM Linux", +]; + +export const ROLLING_ARCH_LINUX_VERSIONS = ROLLING_ARCH_LINUX_NAMES.map( + (name) => `${name} rolling` +); diff --git a/frontend/pages/DashboardPage/cards/OperatingSystems/OSTableConfig.tsx b/frontend/pages/DashboardPage/cards/OperatingSystems/OSTableConfig.tsx index af6900474f..b85a17efa4 100644 --- a/frontend/pages/DashboardPage/cards/OperatingSystems/OSTableConfig.tsx +++ b/frontend/pages/DashboardPage/cards/OperatingSystems/OSTableConfig.tsx @@ -13,7 +13,10 @@ import { formatOperatingSystemDisplayName, IOperatingSystemVersion, } from "interfaces/operating_system"; -import { ISoftwareVulnerability } from "interfaces/software"; +import { + ISoftwareVulnerability, + ROLLING_ARCH_LINUX_NAMES, +} from "interfaces/software"; import TextCell from "components/TableContainer/DataTable/TextCell"; import HeaderCell from "components/TableContainer/DataTable/HeaderCell"; @@ -99,12 +102,7 @@ const generateDefaultTableHeaders = ( Cell: (cellProps: IVersionCellProps) => { const { version, name_only } = cellProps.row.original; if ( - [ - "Arch Linux", - "Arch Linux ARM", - "Manjaro Linux", - "Manjaro Linux ARM", - ].includes(name_only) && + ROLLING_ARCH_LINUX_NAMES.includes(name_only) && version === "rolling" ) { return ( diff --git a/frontend/pages/SoftwarePage/components/cards/SoftwareDetailsSummary/SoftwareDetailsSummary.tsx b/frontend/pages/SoftwarePage/components/cards/SoftwareDetailsSummary/SoftwareDetailsSummary.tsx index b5fdf0dbbb..a6feb85f0c 100644 --- a/frontend/pages/SoftwarePage/components/cards/SoftwareDetailsSummary/SoftwareDetailsSummary.tsx +++ b/frontend/pages/SoftwarePage/components/cards/SoftwareDetailsSummary/SoftwareDetailsSummary.tsx @@ -8,7 +8,10 @@ import React from "react"; import { getPathWithQueryParams, QueryParams } from "utilities/url"; import paths from "router/paths"; -import { NO_VERSION_OR_HOST_DATA_SOURCES } from "interfaces/software"; +import { + NO_VERSION_OR_HOST_DATA_SOURCES, + ROLLING_ARCH_LINUX_VERSIONS, +} from "interfaces/software"; import DataSet from "components/DataSet"; import LastUpdatedHostCount from "components/LastUpdatedHostCount"; @@ -106,14 +109,12 @@ const SoftwareDetailsSummary = ({ )}