RedHat Cloud Services frontend components - inventory
This 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.
!!!Deprecated package!!!
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
- Usage with
Async inventory component
import React from 'react';
import { InventoryTable } from '@redhat-cloud-services/frontend-components/Inventory';
const Cmp = () => <InventoryTable />;
export default Cmp;
- Usage with
Async component
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 (
<AsyncComponent
store={store}
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 npm
npm i -S @redhat-cloud-services/frontend-components-inventory
or with yarn
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.