message: Bug split Disks and CD-ROMs in inventory card
diff: @@ -12,7 +12,11 @@ import { VMDashboardContext } from '../../vms/vm-dashboard-context';
  import { getVMLikeModel } from '../../../selectors/vm/vmlike';
  import { getNetworks, getDisks } from '../../../selectors/vm';
  import { getVMINetworks, getVMIDisks } from '../../../selectors/vmi';
  -import { VM_DETAIL_DISKS_HREF, VM_DETAIL_NETWORKS_HREF } from '../../../constants';
  +import {
  + VM_DETAIL_DETAILS_HREF,
  + VM_DETAIL_DISKS_HREF,
  + VM_DETAIL_NETWORKS_HREF,
  +} from '../../../constants';
  export const VMInventoryCard: React.FC<VMInventoryCardProps> = () => {
  const vmDashboardContext = React.useContext(VMDashboardContext);
  @@ -25,7 +29,9 @@ export const VMInventoryCard: React.FC<VMInventoryCardProps> = () => {
  // prefer vmi over vm if available (means: is running)
  const nicCount = vm ? getNetworks(vm).length : getVMINetworks(vmi).length;
  - const diskCount = vm ? getDisks(vm).length : getVMIDisks(vmi).length;
  + const disks = vm ? getDisks(vm) : getVMIDisks(vmi);
  + const diskCount = disks.filter((d) => d?.disk).length;
  + const cdromCount = disks.filter((d) => d?.cdrom).length;
  // TODO: per design, snapshots should be added here (snapshots are not implemented at all atm)
  const basePath = resourcePath(getVMLikeModel(vmiLike).kind, name, namespace);
  @@ -33,6 +39,10 @@ export const VMInventoryCard: React.FC<VMInventoryCardProps> = () => {
  ({ children }) => <Link to={`${basePath}/${VM_DETAIL_DISKS_HREF}`}>{children}</Link>,
  [basePath],
  );
  + const CDROMTitle = React.useCallback(
  + ({ children }) => <Link to={`${basePath}/${VM_DETAIL_DETAILS_HREF}`}>{children}</Link>,
  + [basePath],
  + );
  const NicsTitle = React.useCallback(
  ({ children }) => <Link to={`${basePath}/${VM_DETAIL_NETWORKS_HREF}`}>{children}</Link>,
  [basePath],
  @@ -56,6 +66,12 @@ export const VMInventoryCard: React.FC<VMInventoryCardProps> = () => {
  count={diskCount}
  TitleComponent={DisksTitle}
  />
  + <InventoryItem
  + isLoading={isLoading}
  + title="CD-ROM"
  + count={cdromCount}
  + TitleComponent={CDROMTitle}
  + />
  </DashboardCardBody>
  </DashboardCard>
  );
  