fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Display software version filter on hosts page when filtering by a team without that software version

Open Brajim20 opened this issue 9 months ago β€’ 8 comments

Fleet version: "go_version": "go1.25.6" (Fleet 4.81.0)

Web browser and operating system: Chrome Version 144.0.7559.110 (Official Build) (arm64)


πŸ’₯ Actual behavior

When filtering by a specific software version the "Version pill" might disappear when switching teams, especially if the team doesn't have that software installed

Image Image

πŸ› οΈ To fix

  • Backend: update hosts API to include software object when a valid software_version_id parameter is provided, even if it is not present on the selected team
  • Frontend: Display software version filter badge and table headings when hosts list has no results (similar to how we display label w/ no results, see screenshot)
    Image

These steps:

  • [x] Have been confirmed to consistently reproduce the issue across multiple Fleet instances.
  • [ ] Describe the workflow that led to the issue but have not yet been reproduced across multiple Fleet instances.

πŸ§‘β€πŸ’» Steps to reproduce

  1. Navigate to Software in the Fleet software library.

  2. Click on a software title.

  3. From the Versions section, click the host count to open the filtered Hosts view for that software.

  4. Change the Team dropdown:

    • Select a team that has the installer configured but no hosts with the software installed.
    • Then select a team that does not have the installer configured.

πŸ•―οΈ More info (optional)

N/A

Brajim20 avatar Feb 02 '26 21:02 Brajim20

Jacob's estimate: Frontend 2 Backend 3

~1.5-2 days β†’ 5 total

getvictor avatar Feb 19 '26 17:02 getvictor

Image

getvictor avatar Feb 19 '26 18:02 getvictor

@rachaelshaw @Brajim20 in the to-fix photo, the empty state has various filters. To me it makes more sense to keep the filters hidden, since if there are no hosts, there's no reason to filter further. This okay with you?

Image

jacobshandling avatar Mar 25 '26 22:03 jacobshandling

@jacobshandling I think we'd need to keep the filters in case one of them is in use and could be cleared, right? (Or does software version not work with other filters?)

rachaelshaw avatar Mar 26 '26 17:03 rachaelshaw

@rachaelshaw looks like there are some very specific relationships there - software version can be combined with os name or os version (both of which are represented with filter pills, not the dropdowns in question), and not any other filters (see logic here)

The UI currently reflects that: the other software/cve filters applied to the hosts page for a team that doesn’t have any matching hosts hides the other drop-downs: -software_title_id: Image

-vulnerability: Image

So seems like unless we want to add support for combining those filters, we want to leave the dropdowns hidden here

jacobshandling avatar Mar 26 '26 18:03 jacobshandling

@jacobshandling makes sense to me then πŸ‘

rachaelshaw avatar Mar 26 '26 19:03 rachaelshaw

QA Verification

  • [X] Software filter is visible for a team with no hosts
  • [X] Vulnerabilities filter is visible for a team with no hosts
  • [X] OS versions filter is visible for a team with no hosts
  • [X] Combined filters are visible
Image

AndreyKizimenko avatar Apr 06 '26 17:04 AndreyKizimenko

Filter gone astray, Teams find clarity in change, Software lights the way.

fleet-release avatar Apr 25 '26 01:04 fleet-release