diff --git a/package-lock.json b/package-lock.json index 34ae3c83..806d6c59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@patternfly/react-core": "^4.267.14", "@patternfly/react-icons": "^4.93.6", "@patternfly/react-table": "^4.113.0", - "@redhat-cloud-services/frontend-components": "3.9.27", + "@redhat-cloud-services/frontend-components": "3.11.5", "@redhat-cloud-services/frontend-components-notifications": "^3.2.14", "@redhat-cloud-services/frontend-components-remediations": "^3.2.10", "@redhat-cloud-services/frontend-components-translations": "^3.2.6", @@ -3574,13 +3574,14 @@ "license": "MIT" }, "node_modules/@redhat-cloud-services/frontend-components": { - "version": "3.9.27", - "license": "Apache-2.0", + "version": "3.11.5", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components/-/frontend-components-3.11.5.tgz", + "integrity": "sha512-QQz3l1GJ5R1QdcsCabRhf+1EXomW/Nz5UA6dkj4/tYoMaDX1eAFnOzemaLfmymOAF/aMsIDkBOCJlfSrNyxp1A==", "dependencies": { "@redhat-cloud-services/frontend-components-utilities": "^3.2.25", - "@redhat-cloud-services/types": "^0.0.17", - "@scalprum/core": "^0.2.3", - "@scalprum/react-core": "^0.2.4", + "@redhat-cloud-services/types": "^0.0.24", + "@scalprum/core": "^0.5.1", + "@scalprum/react-core": "^0.5.1", "sanitize-html": "^2.7.2" }, "peerDependencies": { @@ -3590,9 +3591,9 @@ "classnames": "^2.2.5", "lodash": "^4.17.15", "prop-types": "^15.6.2", - "react": "^16.14.0 || ^17.0.0", + "react": "^16.14.0 || ^17.0.0 || ^18.0.0", "react-content-loader": "^6.2.0", - "react-dom": "^16.14.0 || ^17.0.0", + "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0", "react-redux": ">=7.0.0", "react-router-dom": "^5.0.0 || ^6.0.0" } @@ -3646,9 +3647,10 @@ } }, "node_modules/@redhat-cloud-services/frontend-components-config-utilities": { - "version": "2.0.3", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-config-utilities/-/frontend-components-config-utilities-2.1.0.tgz", + "integrity": "sha512-RQcXn+0WEVzBk98XHHOA3SIatT7qw30h/7UW/oWAYfGGceXeE5/5IjdRIZmuUaNym9v24nv1F4M9+RTdvXrWPA==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@openshift/dynamic-plugin-sdk-webpack": "^3.0.0", "chalk": "^4.1.2", @@ -4717,90 +4719,6 @@ "react-dom": ">=16.13.1" } }, - "node_modules/@redhat-cloud-services/frontend-components-remediations/node_modules/@openshift/dynamic-plugin-sdk": { - "version": "3.0.0", - "license": "Apache-2.0", - "dependencies": { - "lodash-es": "^4.17.21", - "semver": "^7.3.7", - "uuid": "^8.3.2", - "yup": "^0.32.11" - }, - "peerDependencies": { - "react": "^17 || ^18" - } - }, - "node_modules/@redhat-cloud-services/frontend-components-remediations/node_modules/@redhat-cloud-services/frontend-components": { - "version": "3.9.34", - "license": "Apache-2.0", - "dependencies": { - "@redhat-cloud-services/frontend-components-utilities": "^3.2.25", - "@redhat-cloud-services/types": "^0.0.17", - "@scalprum/core": "^0.5.1", - "@scalprum/react-core": "^0.5.1", - "sanitize-html": "^2.7.2" - }, - "peerDependencies": { - "@patternfly/react-core": "^4.18.5", - "@patternfly/react-icons": "^4.53.16", - "@patternfly/react-table": "^4.5.7", - "classnames": "^2.2.5", - "lodash": "^4.17.15", - "prop-types": "^15.6.2", - "react": "^16.14.0 || ^17.0.0 || ^18.0.0", - "react-content-loader": "^6.2.0", - "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0", - "react-redux": ">=7.0.0", - "react-router-dom": "^5.0.0 || ^6.0.0" - } - }, - "node_modules/@redhat-cloud-services/frontend-components-remediations/node_modules/@scalprum/core": { - "version": "0.5.1", - "license": "Apache-2.0", - "dependencies": { - "@openshift/dynamic-plugin-sdk": "^3.0.0" - } - }, - "node_modules/@redhat-cloud-services/frontend-components-remediations/node_modules/@scalprum/react-core": { - "version": "0.5.1", - "license": "Apache-2.0", - "dependencies": { - "@openshift/dynamic-plugin-sdk": "^3.0.0", - "@scalprum/core": "^0.5.1", - "lodash": "^4.17.0" - }, - "peerDependencies": { - "react": ">=16.8.0 || >=17.0.0", - "react-dom": ">=16.8.0 || >=17.0.0" - } - }, - "node_modules/@redhat-cloud-services/frontend-components-remediations/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@redhat-cloud-services/frontend-components-remediations/node_modules/semver": { - "version": "7.3.8", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@redhat-cloud-services/frontend-components-remediations/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/@redhat-cloud-services/frontend-components-translations": { "version": "3.2.6", "license": "Apache-2.0", @@ -4861,11 +4779,32 @@ "node": ">= 6" } }, + "node_modules/@redhat-cloud-services/frontend-components/node_modules/@openshift/dynamic-plugin-sdk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@openshift/dynamic-plugin-sdk/-/dynamic-plugin-sdk-3.0.0.tgz", + "integrity": "sha512-HHVjKxlssDS92DwfPGmeDbnZN+zR96juDTBEJEUluWwvyIqwgopx9GD5YrDGPDv8XvrG5TajJ/yJ9j2Wt4ap4g==", + "dependencies": { + "lodash-es": "^4.17.21", + "semver": "^7.3.7", + "uuid": "^8.3.2", + "yup": "^0.32.11" + }, + "peerDependencies": { + "react": "^17 || ^18" + } + }, + "node_modules/@redhat-cloud-services/frontend-components/node_modules/@redhat-cloud-services/types": { + "version": "0.0.24", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/types/-/types-0.0.24.tgz", + "integrity": "sha512-P50stc+mnWLycID46/AKmD/760r5N1eoam//O6MUVriqVorUdht7xkUL78aJZU1vw8WW6xlrDHwz3F6BM148qg==" + }, "node_modules/@redhat-cloud-services/frontend-components/node_modules/@scalprum/react-core": { - "version": "0.2.11", - "license": "Apache-2.0", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@scalprum/react-core/-/react-core-0.5.1.tgz", + "integrity": "sha512-S3R/cSA9Dlrf4REwDIH80d5M+lEzzYhYHCPOFzmt1Zm3v4sFkFAUx9ZARfyrWK0UOYfXUE/L6D6R1lGgTWm54Q==", "dependencies": { - "@scalprum/core": "^0.2.6", + "@openshift/dynamic-plugin-sdk": "^3.0.0", + "@scalprum/core": "^0.5.1", "lodash": "^4.17.0" }, "peerDependencies": { @@ -4873,6 +4812,36 @@ "react-dom": ">=16.8.0 || >=17.0.0" } }, + "node_modules/@redhat-cloud-services/frontend-components/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@redhat-cloud-services/frontend-components/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@redhat-cloud-services/frontend-components/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/@redhat-cloud-services/host-inventory-client": { "version": "1.2.2", "license": "Apache-2.0", @@ -5116,8 +5085,56 @@ } }, "node_modules/@scalprum/core": { - "version": "0.2.6", - "license": "Apache-2.0" + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@scalprum/core/-/core-0.5.1.tgz", + "integrity": "sha512-xYj9GRXleYMo2bsbdHN9fJmmwPkUHI9sjEoJU7jWoKzfTZTQWnhHVGjW53XOhtz4NO4lAZGPID7dbuJksNyvuA==", + "dependencies": { + "@openshift/dynamic-plugin-sdk": "^3.0.0" + } + }, + "node_modules/@scalprum/core/node_modules/@openshift/dynamic-plugin-sdk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@openshift/dynamic-plugin-sdk/-/dynamic-plugin-sdk-3.0.0.tgz", + "integrity": "sha512-HHVjKxlssDS92DwfPGmeDbnZN+zR96juDTBEJEUluWwvyIqwgopx9GD5YrDGPDv8XvrG5TajJ/yJ9j2Wt4ap4g==", + "dependencies": { + "lodash-es": "^4.17.21", + "semver": "^7.3.7", + "uuid": "^8.3.2", + "yup": "^0.32.11" + }, + "peerDependencies": { + "react": "^17 || ^18" + } + }, + "node_modules/@scalprum/core/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@scalprum/core/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@scalprum/core/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@scalprum/react-core": { "version": "0.4.1", @@ -31069,21 +31086,63 @@ "dev": true }, "@redhat-cloud-services/frontend-components": { - "version": "3.9.27", + "version": "3.11.5", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components/-/frontend-components-3.11.5.tgz", + "integrity": "sha512-QQz3l1GJ5R1QdcsCabRhf+1EXomW/Nz5UA6dkj4/tYoMaDX1eAFnOzemaLfmymOAF/aMsIDkBOCJlfSrNyxp1A==", "requires": { "@redhat-cloud-services/frontend-components-utilities": "^3.2.25", - "@redhat-cloud-services/types": "^0.0.17", - "@scalprum/core": "^0.2.3", - "@scalprum/react-core": "^0.2.4", + "@redhat-cloud-services/types": "^0.0.24", + "@scalprum/core": "^0.5.1", + "@scalprum/react-core": "^0.5.1", "sanitize-html": "^2.7.2" }, "dependencies": { + "@openshift/dynamic-plugin-sdk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@openshift/dynamic-plugin-sdk/-/dynamic-plugin-sdk-3.0.0.tgz", + "integrity": "sha512-HHVjKxlssDS92DwfPGmeDbnZN+zR96juDTBEJEUluWwvyIqwgopx9GD5YrDGPDv8XvrG5TajJ/yJ9j2Wt4ap4g==", + "requires": { + "lodash-es": "^4.17.21", + "semver": "^7.3.7", + "uuid": "^8.3.2", + "yup": "^0.32.11" + } + }, + "@redhat-cloud-services/types": { + "version": "0.0.24", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/types/-/types-0.0.24.tgz", + "integrity": "sha512-P50stc+mnWLycID46/AKmD/760r5N1eoam//O6MUVriqVorUdht7xkUL78aJZU1vw8WW6xlrDHwz3F6BM148qg==" + }, "@scalprum/react-core": { - "version": "0.2.11", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@scalprum/react-core/-/react-core-0.5.1.tgz", + "integrity": "sha512-S3R/cSA9Dlrf4REwDIH80d5M+lEzzYhYHCPOFzmt1Zm3v4sFkFAUx9ZARfyrWK0UOYfXUE/L6D6R1lGgTWm54Q==", "requires": { - "@scalprum/core": "^0.2.6", + "@openshift/dynamic-plugin-sdk": "^3.0.0", + "@scalprum/core": "^0.5.1", "lodash": "^4.17.0" } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, @@ -31752,7 +31811,9 @@ } }, "@redhat-cloud-services/frontend-components-config-utilities": { - "version": "2.0.3", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-config-utilities/-/frontend-components-config-utilities-2.1.0.tgz", + "integrity": "sha512-RQcXn+0WEVzBk98XHHOA3SIatT7qw30h/7UW/oWAYfGGceXeE5/5IjdRIZmuUaNym9v24nv1F4M9+RTdvXrWPA==", "dev": true, "requires": { "@openshift/dynamic-plugin-sdk-webpack": "^3.0.0", @@ -31837,54 +31898,6 @@ "react-final-form": "^6.5.0", "react-final-form-arrays": "^3.1.1" } - }, - "@openshift/dynamic-plugin-sdk": { - "version": "3.0.0", - "requires": { - "lodash-es": "^4.17.21", - "semver": "^7.3.7", - "uuid": "^8.3.2", - "yup": "^0.32.11" - } - }, - "@redhat-cloud-services/frontend-components": { - "version": "3.9.34", - "requires": { - "@redhat-cloud-services/frontend-components-utilities": "^3.2.25", - "@redhat-cloud-services/types": "^0.0.17", - "@scalprum/core": "^0.5.1", - "@scalprum/react-core": "^0.5.1", - "sanitize-html": "^2.7.2" - } - }, - "@scalprum/core": { - "version": "0.5.1", - "requires": { - "@openshift/dynamic-plugin-sdk": "^3.0.0" - } - }, - "@scalprum/react-core": { - "version": "0.5.1", - "requires": { - "@openshift/dynamic-plugin-sdk": "^3.0.0", - "@scalprum/core": "^0.5.1", - "lodash": "^4.17.0" - } - }, - "lru-cache": { - "version": "6.0.0", - "requires": { - "yallist": "^4.0.0" - } - }, - "semver": { - "version": "7.3.8", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0" } } }, @@ -32105,7 +32118,46 @@ } }, "@scalprum/core": { - "version": "0.2.6" + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@scalprum/core/-/core-0.5.1.tgz", + "integrity": "sha512-xYj9GRXleYMo2bsbdHN9fJmmwPkUHI9sjEoJU7jWoKzfTZTQWnhHVGjW53XOhtz4NO4lAZGPID7dbuJksNyvuA==", + "requires": { + "@openshift/dynamic-plugin-sdk": "^3.0.0" + }, + "dependencies": { + "@openshift/dynamic-plugin-sdk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@openshift/dynamic-plugin-sdk/-/dynamic-plugin-sdk-3.0.0.tgz", + "integrity": "sha512-HHVjKxlssDS92DwfPGmeDbnZN+zR96juDTBEJEUluWwvyIqwgopx9GD5YrDGPDv8XvrG5TajJ/yJ9j2Wt4ap4g==", + "requires": { + "lodash-es": "^4.17.21", + "semver": "^7.3.7", + "uuid": "^8.3.2", + "yup": "^0.32.11" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } }, "@scalprum/react-core": { "version": "0.4.1", diff --git a/package.json b/package.json index 778b16e5..e82f3298 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@patternfly/react-core": "^4.267.14", "@patternfly/react-icons": "^4.93.6", "@patternfly/react-table": "^4.113.0", - "@redhat-cloud-services/frontend-components": "3.9.27", + "@redhat-cloud-services/frontend-components": "3.11.5", "@redhat-cloud-services/frontend-components-notifications": "^3.2.14", "@redhat-cloud-services/frontend-components-remediations": "^3.2.10", "@redhat-cloud-services/frontend-components-translations": "^3.2.6", diff --git a/src/Utilities/Hooks.js b/src/Utilities/Hooks.js index c8c7c3cb..456a6daa 100644 --- a/src/Utilities/Hooks.js +++ b/src/Utilities/Hooks.js @@ -19,470 +19,6 @@ import { createSystemsSortBy } from './SystemsHelpers'; // eslint-disable-next-line no-unused-vars import { useFlag, useFlagsStatus } from '@unleash/proxy-client-react'; -/*const mockedSystems1 = { - data: [ - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Applicable', - tags: [] - }, - id: '1234', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Applicable', - tags: [] - }, - id: '5678', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '9101', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '2131', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '4151', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '6171', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '8192', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '0212', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '2232', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '4252', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '6272', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '8293', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '0313', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '2333', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '4353', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '6373', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '8394', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '0414', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '2434', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '4454', - type: 'system' - }, - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '6474', - type: 'system' - } - ], - meta: { - filter: { - stale: { - op: 'eq', - values: ['false'] - }, - status: { - op: 'in', - values: ['Applicable', 'Installable'] - } - }, - has_systems: true, - limit: 20, - offset: 0, - sort: ['-last_upload'], - total_items: 21 - }, - status: 200 -}; - -const mockedSystems2 = { - data: [ - { - attributes: { - baseline_id: 0, - baseline_name: '', - created: '2023-05-31T18:34:25.073767Z', - culled_timestamp: '2023-06-15T23:34:24.83586Z', - display_name: 'rhel8-rhui-test.aig1lzmjp4mejkbwrqwbe45sre.cx.internal.cloudapp.net', - last_upload: '2023-05-31T18:34:25.228098Z', - os: 'RHEL 8.6', - rhsm: '', - stale: false, - stale_timestamp: '2023-06-01T23:34:24.83586Z', - stale_warning_timestamp: '2023-06-08T23:34:24.83586Z', - status: 'Installable', - tags: [] - }, - id: '6474', - type: 'system' - } - ], - meta: { - filter: { - stale: { - op: 'eq', - values: ['false'] - }, - status: { - op: 'in', - values: ['Applicable', 'Installable'] - } - }, - has_systems: true, - limit: 20, - offset: 1, - sort: ['-last_upload'], - total_items: 21 - }, - status: 200 -};*/ - export const useSetPage = (limit, callback) => { const onSetPage = React.useCallback((_, page) => callback({ offset: getOffsetFromPageLimit(page, limit) }) @@ -669,7 +205,6 @@ export const useGetEntities = (fetchApi, apply, config, history, applyMetadata, ...id && { id } || {}, ...packageName && { package_name: packageName } || {} }); - //const items = page === 1 ? mockedSystems1 : mockedSystems2; apply({ page, @@ -680,12 +215,12 @@ export const useGetEntities = (fetchApi, apply, config, history, applyMetadata, applyMetadata && applyMetadata(items.meta); applyGlobalFilter && applyGlobalFilter(selectedTags); - history.push(encodeURLParams({ + history.search = encodeURLParams({ page, perPage, sort, ...patchParams - })); + }); return { results: items.data.map(row => ({ ...row, ...row.attributes, id: row.id ?? row.inventory_id })),