Members
# constant InventoryList
Component that consumes active filters and passes them down to component.
# constant InventoryTable
This component is used to combine all essential components together: EntityTableToolbar - to control top toolbar. InventoryList - to allow consumers to change data from outside and contains actual inventory table. Pagination - bottom pagination. It also calculates pagination and sortBy from props or from store if consumer passed items or not.
# constant buildOSFilterConfig
TODO: Deprecated, remove once no longer exposed through fed modules
# constant getSelectedOsFilterVersions
Extracts enabled OS filter values from ConditionalFilter-like object
# constant inventoryCache
A helper function to store props and to always return the latest state. For example, EntityTableToolbar wraps OnRefreshData in a callback, so we need this to get the latest props and not the props at the time of when the function is being wrapped in callback.
# constant toGroupSelection
Takes an array of object versions value
and returns an object in the format
required by ConditionalFilter component (group filter);
# constant toGroupSelectionValue
TODO: Deprecated, remove once no longer exposed through fed modules
# constant updateURLSearchParams
This module exports functions to work with the URL search parameters. The functions require window.location and window.history to be available.
Methods
# AppInfo(props) → {React.ReactElement}
Small component that just renders active detail with some specific class.
This component detail is accessed from redux if no component found missing component
is displayed.
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
Component Props |
componentMapper |
object
|
Enables passing different components list |
activeApp |
object
|
Identifies the active app |
Returns the app information for the active app
React.ReactElement
# AppInfoCmp(props) → {React.ReactElement}
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
Component Props |
- Deprecated:
- Remove once all apps send `componentMapper` and `activeApp` and use directly AppInfo
Returns the app information for the active app
React.ReactElement
# AppInfoWrapper(props) → {React.ReactElement}
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
Component Props |
componentMapper |
object
|
Enables passing different components list |
activeApp |
object
|
Identifies the active app |
- Deprecated:
- This component can be removed once all apps migrate to componentMapper and activeApp
Returns the app information for the active app
React.ReactElement
# ApplicationDetails(props)
Component that renders tabs for each application detail and handles clicking on each item.
Parameters:
Name | Type | Description |
---|---|---|
props |
*
|
onTabSelect can be used to notify parent component that detail has been selected. |
# ContextInventoryList(props) → {React.node}
Component that works as a side channel for consumers to notify inventory of new data changes.
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
props object |
showHealth |
boolean
|
if true, the health is shown |
onRefreshData |
function
|
on refresh data function to notify inventory of new data changes |
ignoreRefresh |
boolean
|
if true, the ignore refresh is enabled and the onRefreshData function is not called |
React node with inventory list
React.node
# EntityTable(props) → {React.ReactNode}
The actual (PF)table component. It calculates each cell and every table property.
It uses rows, columns and loaded from redux to show correct data.
When row is selected selectEntity
is dispatched.
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
all props used in this component. |
hasItems |
boolean
|
if true, the items are loaded |
expandable |
boolean
|
if true, the expandable is enabled |
onExpandClick |
function
|
on expand click function |
hasCheckbox |
boolean
|
if true, the checkbox is enabled |
actions |
Array
|
actions array for the table |
variant |
string
|
variant of the table |
sortBy |
object
|
sort by object |
tableProps |
object
|
table props object |
onSort |
function
|
on sort function |
onRowClick |
function
|
on row click function |
noDetail |
boolean
|
if true, the no detail is enabled |
noSystemsTable |
React.node
|
no systems table node |
showTags |
boolean
|
if true, the tags are shown |
columns |
Array
|
columns array |
disableDefaultColumns |
boolean
|
if true, the default columns are disabled |
loaded |
boolean
|
if true, the loaded is true |
columnsCounter |
number
|
columns counter |
lastSeenOverride |
string
|
last seen override |
the table component
React.ReactNode
# EntityTableToolbar(props) → {React.node}
Table toolbar used at top of inventory table. It uses couple of filters and acces redux data along side all passed props.
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
props object |
total |
number
|
total number of items |
page |
number
|
current page |
perPage |
number
|
items per page |
filterConfig |
object
|
filter configuration for the table |
hasItems |
boolean
|
if true, the items are loaded |
children |
React.node
|
children nodes for the toolbar |
actionsConfig |
object
|
actions configuration for the toolbar |
activeFiltersConfig |
object
|
active filters configuration for the toolbar |
showTags |
boolean
|
if true, the tags are shown |
getTags |
function
|
get tags function to fetch tags |
items |
Array
|
row items array for the table (systems) |
sortBy |
object
|
sort by configuration |
customFilters |
object
|
custom filters configuration |
hasAccess |
boolean
|
if true, the access is granted |
bulkSelect |
object
|
bulk select configuration |
hideFilters |
object
|
hide filters configuration for the toolbar |
paginationProps |
object
|
pagination properties |
onRefreshData |
function
|
on refresh data function to notify inventory of new data changes |
loaded |
boolean
|
if true, the loaded is true |
showTagModal |
function
|
show tag modal function to show the tag modal |
showSystemTypeFilter |
boolean
|
if true, the system type filter is shown |
showCentosVersions |
boolean
|
if true, the centos versions are shown |
showNoGroupOption |
boolean
|
if true, the no group option is shown |
enableExport |
boolean
|
if true, the export is enabled |
fetchCustomOSes |
function
|
fetch custom OSes function to fetch custom OSes |
axios |
function
|
axios function |
React node with inventory table toolbar
React.node
# FactsInfo(props) → {React.ReactNode}
Basic information about system. UUID and last seen.
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
entity and if entity is loaded. |
entity |
object
|
entity object |
loaded |
boolean
|
if entity is loaded |
LastSeenWrapper |
React.elementType
|
last seen wrapper element |
the facts info component
React.ReactNode
# FooterPagination(props) → {React.node}
Bottom pagination used in table. It can remember what page user is on if user entered the page number in input.
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
props object |
total |
number
|
total number of items |
page |
number
|
current page |
perPage |
number
|
items per page |
direction |
string
|
direction of the pagination |
isFull |
boolean
|
if true, the pagination is full |
hasAccess |
boolean
|
if true, the pagination has access |
paginationProps |
object
|
pagination props |
onRefreshData |
function
|
on refresh data function |
loaded |
boolean
|
if true, the pagination is loaded |
ouiaId |
string
|
ouia id for testing |
React node with pagination
React.node
# InventoryDetail(props) → {React.ReactNode}
Composit component which tangles together Topbar, facts, tags, app details and if system is found or not.
This component is connected to redux and reads loaded
and entity
.
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
additional features from parent component. |
showTags |
boolean
|
if show tags is true |
onTabSelect |
function
|
on tab select function |
onBackToListClick |
function
|
on back to list click function |
inventoryId |
string
|
inventory id |
additionalClasses |
object
|
additional classes |
activeApp |
string
|
active app name |
appList |
Array
|
app list |
showMainSection |
boolean
|
if show main section is true |
headerProps |
object
|
props for the detail header |
the inventory detail component
React.ReactNode
# NoEntitiesFound(props) → {React.node}
Empty state stable when no systems (or other entities) are found.
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
props object |
entities |
string
|
entities count (systems, workspaces, etc.) |
onClearAll |
function
|
on clear all function |
showIcon |
boolean
|
if true, the icon is shown |
React node with empty state
React.node
# SystemNotFound(props) → {React.ReactNode}
Empty state when system was not found in inventory.
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
inventoryId and onBackToListClick. |
inventoryId |
string
|
inventory id |
onBackToListClick |
function
|
on back to list click function |
the system not found component
React.ReactNode
# TitleColumn(children, id, item, props) → {React.node}
Helper component to generate first cell in plain inventory either with clickable detail or just data from attribut.
This is later on used in redux in renderFunc
.
Parameters:
Name | Type | Description |
---|---|---|
children |
React.node
|
React node with information that will be shown to user as column title. |
id |
string
|
inventory UUID, used to navigate to correct URL. |
item |
object
|
row data, holds every information from redux store for currecnt row. |
props |
object
|
additional props passed from |
React node with information that will be shown to user as column title.
React.node
# TopBar(props) → {React.ReactNode}
Top inventory bar with title, buttons (namely remove from inventory and inventory detail button) and actions. Remove from inventory button requires remove modal, which is included at bottom of this component.
Parameters:
Name | Type | Description |
---|---|---|
props |
object
|
namely entity and if entity is loaded. |
entity |
object
|
entity object |
loaded |
boolean
|
if entity is loaded |
actions |
Array
|
actions array for the top bar |
hideInvLink |
boolean
|
if hide inv link is true |
deleteEntity |
function
|
delete entity function |
addNotification |
function
|
add notification function |
onBackToListClick |
function
|
on back to list click function |
showDelete |
boolean
|
if show delete is true |
showInventoryDrawer |
boolean
|
if show inventory drawer is true |
TitleWrapper |
React.elementType
|
title wrapper element |
TagsWrapper |
React.elementType
|
tags wrapper element |
DeleteWrapper |
React.elementType
|
delete wrapper element |
ActionsWrapper |
React.elementType
|
actions wrapper element |
showTags |
boolean
|
if show tags is true |
the top bar component
React.ReactNode
# groupOSVersions(versions) → {Array}
TODO: Deprecated, remove once no longer exposed through fed modules
Parameters:
Name | Type | Description |
---|---|---|
versions |
Array
|
the versions to be selected |
the group selection value
Array
# onRowClick(event, id, props) → {void}
Helper function to proprly calculate what to do when user clicks on first cell.
Either full redirect if used with ctrl button or onRowClick
from props is used.
Parameters:
Name | Type | Description |
---|---|---|
event |
object
|
html event, to find out if meta key was clicked. |
id |
string
|
inventory UUID. |
props |
object
|
additional props from |
loaded |
boolean
|
boolean, if true, the row can be clicked. |
onRowClick |
function
|
function, to handle the row click. |
noDetail |
boolean
|
boolean, if true, the row can be clicked. |
void
void
# useExportDownloadCheck(optionsopt) → {function}
A hook to periodically check for an available download for an export
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
object
|
<optional> |
Options |
onDownloadAvailable |
object
|
<optional> |
Callback function, called when the requested export is available to download |
onError |
object
|
<optional> |
Callback function, called when the requested export failed or an error occured |
axios |
object
|
<optional> |
Axios instance |
result.setCheckForDownload Function to set an export ID to check for
function
# useGroupsQueryWithFilter(options) → {Array}
Fetches workspaces (host groups) with a search support and infinite pagination.
Behavior:
- Captures the unfiltered total when debouncedTerm is empty to understand dataset size.
- Uses a debounced search term for server-side filtering via getGroups if the total results exceed two pages (PAGE_SIZE * 2).
- Exposes setSearchQuery which is debounced; when remote search is disabled it resets the debounced term to initSearchQuery to avoid unnecessary server calls.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
object
|
The options object. |
|
initSearchQuery |
string
|
<optional> |
Initial query reflected when remote search is disabled. |
isKesselEnabled |
boolean
|
<optional> |
When true, restricts to standard workspaces via type filter. |
hasAccess |
boolean
|
<optional> |
Enables the underlying query when true, otherwise the query is disabled. |
debounceTime |
number
|
<optional> |
Debounce duration for remote search, in ms. |
result array of a single object with the following properties: result.groups {Array<{name: string}>} - Flattened list of loaded workspaces. result.setSearchQuery {function(string): void} - Debounced setter for the remote search term. result.fetchNextPage {function(): void} - Load the next page when available. result.hasNextPage {boolean} - Whether there is another page to load. result.isFetchingNextPage {boolean} - True while the next page is loading. result.remoteSearchEnabled {boolean} - True when server-side search should be used (> 2 pages total).
Array
# useInventoryExport(optionsopt) → {object}
A hook encapsulating functionality to provide an export configuration for the InventoryTable to request an export.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
object
|
<optional> |
Options |
filters |
object
|
<optional> |
(unused) Filters currently active in the InventoryTable and passed along to the export request |
axios |
object
|
<optional> |
Axios instance |
[exportConfig] An object to pass to exportConfig
object