diff --git a/package-lock.json b/package-lock.json index bf0906c52..dcc0e4026 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@redhat-cloud-services/frontend-components": "^3.11.8", "@redhat-cloud-services/frontend-components-notifications": "^3.2.16", "@redhat-cloud-services/frontend-components-utilities": "^3.7.6", - "@redhat-cloud-services/host-inventory-client": "1.2.3", + "@redhat-cloud-services/host-inventory-client": "1.2.11", "@unleash/proxy-client-react": "^3.5.0", "awesome-debounce-promise": "^2.1.0", "classnames": "^2.3.1", @@ -5059,9 +5059,9 @@ "integrity": "sha512-P50stc+mnWLycID46/AKmD/760r5N1eoam//O6MUVriqVorUdht7xkUL78aJZU1vw8WW6xlrDHwz3F6BM148qg==" }, "node_modules/@redhat-cloud-services/host-inventory-client": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/host-inventory-client/-/host-inventory-client-1.2.3.tgz", - "integrity": "sha512-Pq36Qa1upnbHH3XJhCT6aWxVQcNxKZcUHMnLn40viGdpCWqBcuC3UBRSVYUnXzdmkmAPx/Rp6D3s4ZYNGF5Isg==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/host-inventory-client/-/host-inventory-client-1.2.11.tgz", + "integrity": "sha512-mCwerpqXh4jUXMpu9Zd0JylWdJ/1T/BjBrDsUA6GLtPRj+RZVnDW+cy9R2DfddO2DjgKCDtjgw2oLK7V156qSg==", "dependencies": { "axios": "^0.27.2" } diff --git a/package.json b/package.json index 9f9b55f43..3ed862d35 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@redhat-cloud-services/frontend-components": "^3.11.8", "@redhat-cloud-services/frontend-components-notifications": "^3.2.16", "@redhat-cloud-services/frontend-components-utilities": "^3.7.6", - "@redhat-cloud-services/host-inventory-client": "1.2.3", + "@redhat-cloud-services/host-inventory-client": "1.2.11", "@unleash/proxy-client-react": "^3.5.0", "awesome-debounce-promise": "^2.1.0", "classnames": "^2.3.1", @@ -194,4 +194,4 @@ "config": { "api_schema_path": "https://raw.githubusercontent.com/RedHatInsights/insights-host-inventory/master/swagger/openapi.json" } -} +} \ No newline at end of file diff --git a/src/components/InventoryTable/EntityTable.js b/src/components/InventoryTable/EntityTable.js index 519decf54..1b568feb7 100644 --- a/src/components/InventoryTable/EntityTable.js +++ b/src/components/InventoryTable/EntityTable.js @@ -79,12 +79,14 @@ const EntityTable = ({ }; const tableSortBy = { - //Inventory API has different sortBy key than system_profile index: columns?.findIndex( (item) => sortBy?.key === item.key || - (sortBy?.key === 'operating_system' && item.key === 'system_profile') + // Inventory API has different sort key for some columns + (sortBy?.key === 'operating_system' && + item.key === 'system_profile') || + (sortBy?.key === 'group_name' && item.key === 'groups') ) + Boolean(hasCheckbox) + Boolean(expandable), diff --git a/src/store/entities.js b/src/store/entities.js index 82f820c64..23894fb3d 100644 --- a/src/store/entities.js +++ b/src/store/entities.js @@ -52,9 +52,9 @@ export const defaultColumns = (groupsEnabled = false) => [ ? [ { key: 'groups', - sortKey: 'groups', + sortKey: 'group_name', title: 'Group', - props: { width: 10, isStatic: true }, + props: { width: 10 }, // eslint-disable-next-line camelcase renderFunc: (groups) => (isEmpty(groups) ? 'N/A' : groups[0].name), // currently, one group at maximum is supported transforms: [fitContent],