From 520c0f3d06467d7eaa52e6a1b3ec202d170ae628 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Thu, 25 Apr 2024 10:34:43 -0400 Subject: [PATCH] fix(RHINENG-9248): fetch non-edge hosts For the new bootc image table, we request the non-image based system count to include at the bottom of the table. This PR modifies the api call to request to filter by non-edge based systems so we get a count of systems that matches the system table. --- src/Utilities/constants.js | 2 ++ src/routes/InventoryComponents/BifrostPage.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Utilities/constants.js b/src/Utilities/constants.js index cb71bd7a9..90ad1685b 100644 --- a/src/Utilities/constants.js +++ b/src/Utilities/constants.js @@ -28,6 +28,8 @@ export const INVENTORY_FETCH_BOOTC_PARAMS = export const INVENTORY_FETCH_BOOTC = `${INVENTORY_FETCH_BOOTC_PARAMS}=not_nil`; export const INVENTORY_FETCH_NON_BOOTC = `${INVENTORY_FETCH_BOOTC_PARAMS}=nil`; export const INVENTORY_TOTAL_FETCH_BOOTC_PARAMS = `${INVENTORY_FETCH_BOOTC}&per_page=1`; +export const INVENTORY_FILTER_NO_HOST_TYPE = + 'filter[system_profile][host_type]=nil'; export function subtractDate(days) { const date = new Date(); date.setDate(date.getDate() - days); diff --git a/src/routes/InventoryComponents/BifrostPage.js b/src/routes/InventoryComponents/BifrostPage.js index 34f331670..4714755b3 100644 --- a/src/routes/InventoryComponents/BifrostPage.js +++ b/src/routes/InventoryComponents/BifrostPage.js @@ -3,6 +3,7 @@ import axios from 'axios'; import { INVENTORY_FETCH_BOOTC, INVENTORY_FETCH_NON_BOOTC, + INVENTORY_FILTER_NO_HOST_TYPE, INVENTORY_TOTAL_FETCH_URL_SERVER, } from '../../Utilities/constants'; import BifrostTable from './BifrostTable'; @@ -19,7 +20,7 @@ const BifrostPage = () => { ); const packageBasedSystems = await axios.get( - `${INVENTORY_TOTAL_FETCH_URL_SERVER}${INVENTORY_FETCH_NON_BOOTC}&per_page=1` + `${INVENTORY_TOTAL_FETCH_URL_SERVER}${INVENTORY_FETCH_NON_BOOTC}&${INVENTORY_FILTER_NO_HOST_TYPE}&per_page=1` ); const booted = result.data.results.map(