Inventory components for RedHat Cloud Services project.
npm install @redhat-cloud-services/frontend-components-inventoryThis package is hot loaded via insights-chrome and exports new components for inventory table and detail. It also exports redux reducers and actions so usage is as simple as possible.
This package is deprecated, please do not use it anymore! We are no longer supporting this package because we moved it to inventory application and exporting inventory components trough federated modules.
If you want to use inventory component, either use Async inventory components or use directly Async component
1) Usage with Async inventory component
``JS
import React from 'react';
import { InventoryTable } from '@redhat-cloud-services/frontend-components/Inventory';
const Cmp = () =>
export default Cmp;
`
2) Usage with Async component`JS
import React from 'react';
import { useHistory } from 'react-router-dom';
import { useStore } from 'react-redux';
import AsyncComponent from '@redhat-cloud-services/frontend-components/AsyncComponent';
const Cmp = () => {
const store = useStore();
const history = useHistory();
return (
history={history}
appName="inventory"
module={./InventoryTable}
fallback="Loading"
ref={innerRef}
{...props}
/>
);
}
export default Cmp;
``Installation
You shouldn't install this package directly to your project, but if you really have to install it either with npmbash`
npm i -S @redhat-cloud-services/frontend-components-inventory
or with yarn
`bash``
yarn add @redhat-cloud-services/frontend-components-inventory
This package is dependent on @redhat-cloud-services/frontend-components-utilities, @redhat-cloud-services/frontend-components and @redhat-cloud-services/host-inventory-client will automatically install them trough direct dependencies.
* Components
* inventory
* props
* custom fetch function
* hide filters
* inventory_header