diff --git a/package-lock.json b/package-lock.json index d1a425243..fab6b5645 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,7 +69,7 @@ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11", "@redhat-cloud-services/eslint-config-redhat-cloud-services": "^1.3.0", "@redhat-cloud-services/frontend-components-config-utilities": "^3.0.4", - "@redhat-cloud-services/types": "^1.0.9", + "@redhat-cloud-services/types": "^1.0.10", "@simonsmith/cypress-image-snapshot": "^8.1.2", "@swc/core": "^1.3.102", "@swc/jest": "^0.2.29", @@ -5225,9 +5225,9 @@ } }, "node_modules/@redhat-cloud-services/types": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/types/-/types-1.0.9.tgz", - "integrity": "sha512-dKYYSLU0cwNkOSq5kSvdKWzgwFGBk45uwAwoHGi44PMQdWkuz+tXhYLrKKAXoSXVahR6VFjBDONlaxok8Lzkcw==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/types/-/types-1.0.10.tgz", + "integrity": "sha512-4geiWnE60jYpRcNwxbx+dZBSv9Mh5VXPPcS0E9UGE4pszAsy25rgZvJ/C8tP9HymsH/Q1rn/3DKvBBulXAPGAg==", "dev": true }, "node_modules/@remix-run/router": { diff --git a/package.json b/package.json index 82de49353..078f32067 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11", "@redhat-cloud-services/eslint-config-redhat-cloud-services": "^1.3.0", "@redhat-cloud-services/frontend-components-config-utilities": "^3.0.4", - "@redhat-cloud-services/types": "^1.0.9", + "@redhat-cloud-services/types": "^1.0.10", "@simonsmith/cypress-image-snapshot": "^8.1.2", "@swc/core": "^1.3.102", "@swc/jest": "^0.2.29", diff --git a/src/components/AppFilter/useAppFilter.test.js b/src/components/AppFilter/useAppFilter.test.js index 9e7f2017d..a3ff799b8 100644 --- a/src/components/AppFilter/useAppFilter.test.js +++ b/src/components/AppFilter/useAppFilter.test.js @@ -91,7 +91,7 @@ describe('useAppFilter', () => { await act(async () => { result.current.setIsOpen(true); }); - expect(axiosGetSpy).toHaveBeenCalledTimes(10); + expect(axiosGetSpy).toHaveBeenCalledTimes(9); for (let index = 0; index < 8; index++) { expect(axiosGetSpy.mock.calls[index]).toEqual([ `/api/chrome-service/v1/static/stable/stage/navigation/${requiredBundles[index]}-navigation.json?ts=666`, diff --git a/src/components/AppFilter/useAppFilter.ts b/src/components/AppFilter/useAppFilter.ts index 56e79d90c..75defc33e 100644 --- a/src/components/AppFilter/useAppFilter.ts +++ b/src/components/AppFilter/useAppFilter.ts @@ -25,26 +25,13 @@ export const requiredBundles = [ 'settings', 'iam', 'quay', - 'business-services', 'subscriptions', ...(!isProd() ? previewBundles : isBeta() ? previewBundles : []), ].filter(Boolean); export const itLessBundles = ['openshift', 'insights', 'settings', 'iam']; -const bundlesOrder = [ - 'application-services', - 'openshift', - 'rhel', - 'edge', - 'ansible', - 'settings', - 'cost-management', - 'subscriptions', - 'iam', - 'quay', - 'business-services', -]; +const bundlesOrder = ['application-services', 'openshift', 'rhel', 'edge', 'ansible', 'settings', 'cost-management', 'subscriptions', 'iam', 'quay']; function findModuleByLink(href: string, { modules }: Pick = { modules: [] }) { const routes = (modules || []) diff --git a/src/components/Routes/Routes.tsx b/src/components/Routes/Routes.tsx index 6f8046460..dd30eb4b7 100644 --- a/src/components/Routes/Routes.tsx +++ b/src/components/Routes/Routes.tsx @@ -52,10 +52,6 @@ const redirects = [ path: '/subscriptions', to: '/subscriptions/overview', }, - { - path: '/business-services', - to: '/business-services/hybrid-committed-spend', - }, { path: '/docs', to: '/docs/api', diff --git a/src/pdf/requestPdf.ts b/src/pdf/requestPdf.ts index 90f3f0533..887937cca 100644 --- a/src/pdf/requestPdf.ts +++ b/src/pdf/requestPdf.ts @@ -1,3 +1,4 @@ +import { PDFRequestOptions } from '@redhat-cloud-services/types'; import axios from 'axios'; const downloadPDF = async (url: string, filename = 'report.pdf') => { @@ -42,12 +43,12 @@ const pollStatus = async (statusID: string) => { }); }; -const requestPdf = async (options: { service: string; template: string; filename?: string; [key: string]: any }) => { - const { filename, ...rest } = options; +const requestPdf = async (options: PDFRequestOptions) => { + const { filename, payload } = options; try { const { data: { statusID }, - } = await axios.post<{ statusID: string }>(`/api/crc-pdf-generator/v2/create`, rest); + } = await axios.post<{ statusID: string }>(`/api/crc-pdf-generator/v2/create`, { payload }); const { status } = await pollStatus(statusID); if (status === 'Generated') { return downloadPDF(`/api/crc-pdf-generator/v2/download/${statusID}`, filename);