diff --git a/package-lock.json b/package-lock.json index 34ae3c831..63ec7d425 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@data-driven-forms/react-form-renderer": "^3.20.4", "@patternfly/react-core": "^4.267.14", "@patternfly/react-icons": "^4.93.6", - "@patternfly/react-table": "^4.113.0", + "@patternfly/react-table": "^4.113.5", "@redhat-cloud-services/frontend-components": "3.9.27", "@redhat-cloud-services/frontend-components-notifications": "^3.2.14", "@redhat-cloud-services/frontend-components-remediations": "^3.2.10", @@ -3417,12 +3417,13 @@ "license": "MIT" }, "node_modules/@patternfly/react-core": { - "version": "4.267.14", - "license": "MIT", + "version": "4.277.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-4.277.0.tgz", + "integrity": "sha512-bA0hIYclQN7CebBahjTl8c1j1zEAa8uUY/KtFOq7aHBWQTZjf3+By0ue2GktHAUq8diseBj+8LirScDbzi1DvQ==", "dependencies": { - "@patternfly/react-icons": "^4.93.3", - "@patternfly/react-styles": "^4.92.3", - "@patternfly/react-tokens": "^4.94.3", + "@patternfly/react-icons": "^4.93.7", + "@patternfly/react-styles": "^4.92.8", + "@patternfly/react-tokens": "^4.94.7", "focus-trap": "6.9.2", "react-dropzone": "9.0.0", "tippy.js": "5.1.2", @@ -3434,25 +3435,28 @@ } }, "node_modules/@patternfly/react-icons": { - "version": "4.93.6", - "license": "MIT", + "version": "4.93.7", + "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.93.7.tgz", + "integrity": "sha512-3kr35dgba7Qz5CSzmfH0rIjSvBC5xkmiknf3SvVUVxaiVA7KRowID8viYHeZlf3v/Oa3sEewaH830Q0t+nWsZQ==", "peerDependencies": { "react": "^16.8 || ^17 || ^18", "react-dom": "^16.8 || ^17 || ^18" } }, "node_modules/@patternfly/react-styles": { - "version": "4.92.6", - "license": "MIT" + "version": "4.92.8", + "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.92.8.tgz", + "integrity": "sha512-K4lUU8O4HiCX9NeuNUIrPgN3wlGERCxJVio+PAjd8hpJD/PKnjFfOJ9u6/Cii3qLy/5ZviWPRNHbGiwA/+YUhg==" }, "node_modules/@patternfly/react-table": { - "version": "4.113.0", - "license": "MIT", - "dependencies": { - "@patternfly/react-core": "^4.276.8", - "@patternfly/react-icons": "^4.93.6", - "@patternfly/react-styles": "^4.92.6", - "@patternfly/react-tokens": "^4.94.6", + "version": "4.113.5", + "resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-4.113.5.tgz", + "integrity": "sha512-iBBY/81Md5pn4LQ72Ui+WZPnH6RZ/or+KqR7HxTYTE1b7HDbQ6kFAErcr5catEE54P/3kI9Ox5IhgdZOrsIt6w==", + "dependencies": { + "@patternfly/react-core": "^4.277.0", + "@patternfly/react-icons": "^4.93.7", + "@patternfly/react-styles": "^4.92.8", + "@patternfly/react-tokens": "^4.94.7", "lodash": "^4.17.19", "tslib": "^2.0.0" }, @@ -3461,26 +3465,10 @@ "react-dom": "^16.8 || ^17 || ^18" } }, - "node_modules/@patternfly/react-table/node_modules/@patternfly/react-core": { - "version": "4.276.8", - "license": "MIT", - "dependencies": { - "@patternfly/react-icons": "^4.93.6", - "@patternfly/react-styles": "^4.92.6", - "@patternfly/react-tokens": "^4.94.6", - "focus-trap": "6.9.2", - "react-dropzone": "9.0.0", - "tippy.js": "5.1.2", - "tslib": "^2.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17 || ^18", - "react-dom": "^16.8 || ^17 || ^18" - } - }, "node_modules/@patternfly/react-tokens": { - "version": "4.94.6", - "license": "MIT" + "version": "4.94.7", + "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.94.7.tgz", + "integrity": "sha512-h+ducOLDMSxcuec3+YY3x+stM5ZUSnrl/lC/eVmjypil2El08NuE2MNEPMQWdhrod6VRRZFMNqZw/m82iv6U1A==" }, "node_modules/@pmmmwh/react-refresh-webpack-plugin": { "version": "0.5.10", @@ -3646,9 +3634,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", @@ -30977,11 +30966,13 @@ "dev": true }, "@patternfly/react-core": { - "version": "4.267.14", + "version": "4.277.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-4.277.0.tgz", + "integrity": "sha512-bA0hIYclQN7CebBahjTl8c1j1zEAa8uUY/KtFOq7aHBWQTZjf3+By0ue2GktHAUq8diseBj+8LirScDbzi1DvQ==", "requires": { - "@patternfly/react-icons": "^4.93.3", - "@patternfly/react-styles": "^4.92.3", - "@patternfly/react-tokens": "^4.94.3", + "@patternfly/react-icons": "^4.93.7", + "@patternfly/react-styles": "^4.92.8", + "@patternfly/react-tokens": "^4.94.7", "focus-trap": "6.9.2", "react-dropzone": "9.0.0", "tippy.js": "5.1.2", @@ -30989,39 +30980,33 @@ } }, "@patternfly/react-icons": { - "version": "4.93.6", + "version": "4.93.7", + "resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.93.7.tgz", + "integrity": "sha512-3kr35dgba7Qz5CSzmfH0rIjSvBC5xkmiknf3SvVUVxaiVA7KRowID8viYHeZlf3v/Oa3sEewaH830Q0t+nWsZQ==", "requires": {} }, "@patternfly/react-styles": { - "version": "4.92.6" + "version": "4.92.8", + "resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.92.8.tgz", + "integrity": "sha512-K4lUU8O4HiCX9NeuNUIrPgN3wlGERCxJVio+PAjd8hpJD/PKnjFfOJ9u6/Cii3qLy/5ZviWPRNHbGiwA/+YUhg==" }, "@patternfly/react-table": { - "version": "4.113.0", - "requires": { - "@patternfly/react-core": "^4.276.8", - "@patternfly/react-icons": "^4.93.6", - "@patternfly/react-styles": "^4.92.6", - "@patternfly/react-tokens": "^4.94.6", + "version": "4.113.5", + "resolved": "https://registry.npmjs.org/@patternfly/react-table/-/react-table-4.113.5.tgz", + "integrity": "sha512-iBBY/81Md5pn4LQ72Ui+WZPnH6RZ/or+KqR7HxTYTE1b7HDbQ6kFAErcr5catEE54P/3kI9Ox5IhgdZOrsIt6w==", + "requires": { + "@patternfly/react-core": "^4.277.0", + "@patternfly/react-icons": "^4.93.7", + "@patternfly/react-styles": "^4.92.8", + "@patternfly/react-tokens": "^4.94.7", "lodash": "^4.17.19", "tslib": "^2.0.0" - }, - "dependencies": { - "@patternfly/react-core": { - "version": "4.276.8", - "requires": { - "@patternfly/react-icons": "^4.93.6", - "@patternfly/react-styles": "^4.92.6", - "@patternfly/react-tokens": "^4.94.6", - "focus-trap": "6.9.2", - "react-dropzone": "9.0.0", - "tippy.js": "5.1.2", - "tslib": "^2.0.0" - } - } } }, "@patternfly/react-tokens": { - "version": "4.94.6" + "version": "4.94.7", + "resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.94.7.tgz", + "integrity": "sha512-h+ducOLDMSxcuec3+YY3x+stM5ZUSnrl/lC/eVmjypil2El08NuE2MNEPMQWdhrod6VRRZFMNqZw/m82iv6U1A==" }, "@pmmmwh/react-refresh-webpack-plugin": { "version": "0.5.10", @@ -31752,7 +31737,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", diff --git a/package.json b/package.json index 778b16e58..2f0b46b47 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "@data-driven-forms/react-form-renderer": "^3.20.4", "@patternfly/react-core": "^4.267.14", "@patternfly/react-icons": "^4.93.6", - "@patternfly/react-table": "^4.113.0", + "@patternfly/react-table": "^4.113.5", "@redhat-cloud-services/frontend-components": "3.9.27", "@redhat-cloud-services/frontend-components-notifications": "^3.2.14", "@redhat-cloud-services/frontend-components-remediations": "^3.2.10", diff --git a/src/Utilities/Hooks.js b/src/Utilities/Hooks.js index c8c7c3cb7..456a6daa7 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 })),