diff --git a/webpack/scenes/BootedContainerImages/BootedContainerImagesPage.js b/webpack/scenes/BootedContainerImages/BootedContainerImagesPage.js index e3836e9e751..cc634c0aee5 100644 --- a/webpack/scenes/BootedContainerImages/BootedContainerImagesPage.js +++ b/webpack/scenes/BootedContainerImages/BootedContainerImagesPage.js @@ -22,7 +22,7 @@ import BOOTED_CONTAINER_IMAGES_KEY, { BOOTED_CONTAINER_IMAGES_API_PATH } from '. const BootedContainerImagesPage = () => { const columns = { - image_name: { + bootc_booted_image: { title: __('Image name'), isSorted: true, }, @@ -32,8 +32,8 @@ const BootedContainerImagesPage = () => { }, hosts: { title: __('Hosts'), - wrapper: ({image_name, digests}) => ( - {digests.reduce((total, digest) => total + digest.host_count, 0)} + wrapper: ({bootc_booted_image, digests}) => ( + {digests.reduce((total, digest) => total + digest.host_count, 0)} ), }, }; @@ -59,13 +59,19 @@ const BootedContainerImagesPage = () => { columnsToSortParams[columns[key].title] = key; } }); + const onSort = (_event, index, direction) => { + setParamsAndAPI({ + ...params, + order: `${Object.keys(columns)[index]} ${direction}`, + }); + }; const { pfSortParams } = useTableSort({ allColumns: Object.keys(columns).map(k => columns[k].title), columnsToSortParams, onSort, }); const expandedImages = useSet([]); - const imageIsExpanded = image_name => expandedImages.has(image_name); + const imageIsExpanded = bootc_booted_image => expandedImages.has(bootc_booted_image); const STATUS = { PENDING: 'PENDING', RESOLVED: 'RESOLVED', @@ -91,12 +97,6 @@ const BootedContainerImagesPage = () => { }); const [columnNamesKeys, keysToColumnNames] = getColumnHelpers(columns); - const onSort = (_event, index, direction) => { - setParamsAndAPI({ - ...params, - order: `${Object.keys(columns)[index]} ${direction}`, - }); - }; const onPagination = newPagination => { setParamsAndAPI({ ...params, ...newPagination }); }; @@ -175,17 +175,17 @@ const BootedContainerImagesPage = () => { )} {results?.map((result, rowIndex) => { - const { image_name, digests } = result; - const isExpanded = imageIsExpanded(image_name); + const { bootc_booted_image, digests } = result; + const isExpanded = imageIsExpanded(bootc_booted_image); return ( - + <> 0 && { rowIndex, isExpanded, - onToggle: (_event, _rInx, isOpen,) => expandedImages.onToggle(isOpen, image_name), + onToggle: (_event, _rInx, isOpen,) => expandedImages.onToggle(isOpen, bootc_booted_image), expandId: 'booted-containers-expander' }} />