From 3064259b888d422ab3d47019aa4686f4ea6c4101 Mon Sep 17 00:00:00 2001 From: Jordan Montgomery Date: Wed, 17 Dec 2025 10:17:10 -0500 Subject: [PATCH] Hide builtin labels on host page (#37393) **Related issue:** Resolves #32777 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. ## Testing - [x] QA'd all new/changed functionality manually --- changes/32777-hide-builtin-labels | 1 + .../hosts/details/cards/Labels/Labels.tsx | 38 ++++++++----------- 2 files changed, 17 insertions(+), 22 deletions(-) create mode 100644 changes/32777-hide-builtin-labels diff --git a/changes/32777-hide-builtin-labels b/changes/32777-hide-builtin-labels new file mode 100644 index 0000000000..a2da4bb479 --- /dev/null +++ b/changes/32777-hide-builtin-labels @@ -0,0 +1 @@ +* Changed the Host details page to hide builtin labels in line with other areas such as the label filter diff --git a/frontend/pages/hosts/details/cards/Labels/Labels.tsx b/frontend/pages/hosts/details/cards/Labels/Labels.tsx index 93c81128c6..7bc28b076c 100644 --- a/frontend/pages/hosts/details/cards/Labels/Labels.tsx +++ b/frontend/pages/hosts/details/cards/Labels/Labels.tsx @@ -24,27 +24,21 @@ const Labels = ({ }: ILabelsProps): JSX.Element => { const classNames = classnames(baseClass, className); - const labelItems = labels.map((label: ILabel) => { - return ( -
  • - -
  • - ); - }); + const labelItems = labels + .filter((label: ILabel) => label.label_type !== "builtin") + .map((label: ILabel) => { + return ( +
  • + +
  • + ); + }); return ( - {labels.length === 0 ? ( + {labelItems.length === 0 ? (

    No labels are associated with this host.