From 2ca0496a88618343c2bc1f17fd955a8544f268b3 Mon Sep 17 00:00:00 2001 From: CD Cabrera Date: Fri, 7 Oct 2022 11:58:24 -0400 Subject: [PATCH] feat(rhods): sw-270 activate product display (#980) * locale, rhacs strings * config, rhacs config, routing * rhsmConstants, product id --- config/cspell.config.json | 1 + public/locales/en-US.json | 3 + .../__snapshots__/authentication.test.js.snap | 27 + .../__tests__/__snapshots__/i18n.test.js.snap | 41 ++ .../productViewMissing.test.js.snap | 36 ++ .../__snapshots__/redirect.test.js.snap | 9 + .../__snapshots__/router.test.js.snap | 9 + .../__snapshots__/routerHelpers.test.js.snap | 12 + .../__snapshots__/product.rhods.test.js.snap | 562 ++++++++++++++++++ src/config/__tests__/product.rhods.test.js | 125 ++++ src/config/product.rhods.js | 208 +++++++ src/config/routes.js | 15 + .../__snapshots__/rhsmConstants.test.js.snap | 4 + src/services/rhsm/rhsmConstants.js | 47 +- .../__snapshots__/index.test.js.snap | 4 + 15 files changed, 1081 insertions(+), 22 deletions(-) create mode 100644 src/config/__tests__/__snapshots__/product.rhods.test.js.snap create mode 100644 src/config/__tests__/product.rhods.test.js create mode 100644 src/config/product.rhods.js diff --git a/config/cspell.config.json b/config/cspell.config.json index a77be8fd6..7171222da 100644 --- a/config/cspell.config.json +++ b/config/cspell.config.json @@ -49,6 +49,7 @@ "reselect's", "rhel", "rhacs", + "rhods", "rhosak", "rhsm", "samesite", diff --git a/public/locales/en-US.json b/public/locales/en-US.json index 9eb028a91..00c13598b 100644 --- a/public/locales/en-US.json +++ b/public/locales/en-US.json @@ -291,6 +291,9 @@ "title_rhacs": "Red Hat Advanced Cluster Security for Kubernetes", "subtitle_rhacs": "Monitor your usage for On-Demand subscriptions. <0>Learn more about {{appName}} reporting", "description_rhacs": "Monitor your usage for On-Demand subscriptions.", + "title_rhods": "Red Hat OpenShift Data Science", + "subtitle_rhods": "Monitor your usage for On-Demand subscriptions. <0>Learn more about {{appName}} reporting", + "description_rhods": "Monitor your usage for On-Demand subscriptions.", "title_RHEL": "Red Hat Enterprise Linux", "subtitle_RHEL": "Monitor your Red Hat Enterprise Linux usage by physical, virtual, and public cloud sockets. <0>Learn more about {{appName}} reporting", "description_RHEL": "Monitor your Red Hat Enterprise Linux usage by physical, virtual, and public cloud sockets.", diff --git a/src/components/authentication/__tests__/__snapshots__/authentication.test.js.snap b/src/components/authentication/__tests__/__snapshots__/authentication.test.js.snap index a8dbca8b2..16e9b3169 100644 --- a/src/components/authentication/__tests__/__snapshots__/authentication.test.js.snap +++ b/src/components/authentication/__tests__/__snapshots__/authentication.test.js.snap @@ -394,6 +394,15 @@ exports[`Authentication Component should return a redirect on 418 error: 418 err "path": "/rhacs", "redirect": null, }, + { + "activateOnError": false, + "component": "productView/productView", + "disabled": false, + "exact": true, + "id": "rhods", + "path": "/rhods", + "redirect": null, + }, { "activateOnError": false, "component": "productView/productView", @@ -544,6 +553,15 @@ exports[`Authentication Component should return a redirect on a specific 403 err "path": "/rhacs", "redirect": null, }, + { + "activateOnError": false, + "component": "productView/productView", + "disabled": false, + "exact": true, + "id": "rhods", + "path": "/rhods", + "redirect": null, + }, { "activateOnError": false, "component": "productView/productView", @@ -694,6 +712,15 @@ exports[`Authentication Component should return a redirect on a specific 403 err "path": "/rhacs", "redirect": null, }, + { + "activateOnError": false, + "component": "productView/productView", + "disabled": false, + "exact": true, + "id": "rhods", + "path": "/rhods", + "redirect": null, + }, { "activateOnError": false, "component": "productView/productView", diff --git a/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap b/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap index 72b330be0..64c50db1f 100644 --- a/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap +++ b/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap @@ -660,6 +660,35 @@ exports[`I18n Component should generate a predictable locale key output snapshot }, ], }, + { + "file": "./src/config/product.rhods.js", + "keys": [ + { + "key": "curiosity-graph.label_axisY", + "match": "translate('curiosity-graph.label_axisY', { context: id })", + }, + { + "key": "curiosity-graph.label_axisX", + "match": "translate('curiosity-graph.label_axisX', { context: GRANULARITY_TYPES.DAILY })", + }, + { + "key": "", + "match": "translate(\`curiosity-inventory.measurement_\${INVENTORY_TYPES.BILLING_PROVIDER}\`, { context: provider?.value || 'none' })", + }, + { + "key": "curiosity-inventory.measurement", + "match": "translate('curiosity-inventory.measurement', { context: RHSM_API_PATH_METRIC_TYPES.CORES, total: helpers.numberDisplay(total?.value)", + }, + { + "key": "", + "match": "translate(\`curiosity-inventory.measurement_\${SUBSCRIPTIONS_INVENTORY_TYPES.BILLING_PROVIDER}\`, { context: provider?.value || 'none' })", + }, + { + "key": "", + "match": "translate(\`curiosity-inventory.label_\${SUBSCRIPTIONS_INVENTORY_META_TYPES.SUBSCRIPTION_TYPE}\`, { context: subscriptionType || EMPTY_CONTEXT })", + }, + ], + }, { "file": "./src/config/product.rhosak.js", "keys": [ @@ -816,6 +845,18 @@ exports[`I18n Component should have locale keys that exist in the default langua "file": "./src/config/product.rhel.js", "key": "curiosity-inventory.label", }, + { + "file": "./src/config/product.rhods.js", + "key": "curiosity-graph.label_axisY", + }, + { + "file": "./src/config/product.rhods.js", + "key": "curiosity-graph.label_axisX", + }, + { + "file": "./src/config/product.rhods.js", + "key": "curiosity-inventory.measurement", + }, { "file": "./src/config/product.rhosak.js", "key": "curiosity-graph.label_axisY", diff --git a/src/components/productView/__tests__/__snapshots__/productViewMissing.test.js.snap b/src/components/productView/__tests__/__snapshots__/productViewMissing.test.js.snap index 3dd632c5c..70538a3cb 100644 --- a/src/components/productView/__tests__/__snapshots__/productViewMissing.test.js.snap +++ b/src/components/productView/__tests__/__snapshots__/productViewMissing.test.js.snap @@ -176,6 +176,42 @@ exports[`ProductViewMissing Component should render a non-connected component: n + + + + t(curiosity-view.title, {"appName":"Subscriptions","context":"rhods"}) + + + + t(curiosity-view.description, {"appName":"Subscriptions","context":"rhods"}) + + + + + , + }, + ], + "columnHeaders": [ + { + "title": "t(curiosity-inventory.header, {"context":"display_name"})", + "transforms": [], + }, + { + "title": "t(curiosity-inventory.header, {"context":"billing_provider"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"Cores"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"last_seen"})", + "transforms": [ + [Function], + ], + }, + ], + "data": { + "Cores": { + "title": "t(curiosity-inventory.header, {"context":"Cores"})", + "value": 200, + }, + "display_name": { + "title": "t(curiosity-inventory.header, {"context":"display_name"})", + "value": "lorem ipsum", + }, + "last_seen": { + "title": "t(curiosity-inventory.header, {"context":"last_seen"})", + "value": "2022-01-01T00:00:00.000Z", + }, + }, +} +`; + +exports[`Product RHODS config should apply an instances inventory configuration under hosts: filtered, authorized 1`] = ` +{ + "cells": [ + { + "title": , + }, + { + "title": "t(curiosity-inventory.measurement_billing_provider, {"context":"none"})", + }, + { + "title": "t(curiosity-inventory.measurement, {"context":"Cores","total":"200"})", + }, + { + "title": , + }, + ], + "columnHeaders": [ + { + "title": "t(curiosity-inventory.header, {"context":"display_name"})", + "transforms": [], + }, + { + "title": "t(curiosity-inventory.header, {"context":"billing_provider"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"Cores"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"last_seen"})", + "transforms": [ + [Function], + ], + }, + ], + "data": { + "Cores": { + "title": "t(curiosity-inventory.header, {"context":"Cores"})", + "value": 200, + }, + "display_name": { + "title": "t(curiosity-inventory.header, {"context":"display_name"})", + "value": "lorem ipsum", + }, + "inventory_id": { + "title": "t(curiosity-inventory.header, {"context":"inventory_id"})", + "value": "XXXX-XXXX-XXXXX-XXXXX", + }, + "last_seen": { + "title": "t(curiosity-inventory.header, {"context":"last_seen"})", + "value": "2022-01-01T00:00:00.000Z", + }, + }, +} +`; + +exports[`Product RHODS config should apply graph configuration: filters 1`] = ` +{ + "groupedFilters": [], + "standaloneFilters": [ + { + "chartType": "line", + "color": "#06c", + "fill": "#8bc1f7", + "id": "Cores", + "isStacked": false, + "isStandalone": true, + "isThreshold": false, + "stroke": "#06c", + "strokeWidth": 2, + "yAxisChartLabel": [Function], + }, + ], +} +`; + +exports[`Product RHODS config should apply graph configuration: settings 1`] = ` +{ + "isCardTitleDescription": true, + "xAxisChartLabel": [Function], + "yAxisTickFormat": [Function], +} +`; + +exports[`Product RHODS config should apply subscriptions inventory configuration: filtered 1`] = ` +{ + "cells": [ + { + "title": "lorem", + }, + { + "title": "t(curiosity-inventory.measurement_billing_provider, {"context":"none"})", + }, + { + "title": "hello world", + }, + { + "title": "", + }, + { + "title": "t(curiosity-inventory.label_subscription_type, {"context":"dolor"})", + }, + { + "title": "2022-01-01T00:00:00.000Z", + }, + ], + "columnHeaders": [ + { + "title": "t(curiosity-inventory.header, {"context":"product_name"})", + "transforms": [], + }, + { + "title": "t(curiosity-inventory.header, {"context":"billing_provider"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"service_level"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"quantity"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"subscription_type"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"next_event_date"})", + "transforms": [ + [Function], + ], + }, + ], + "data": { + "has_infinite_quantity": { + "title": "t(curiosity-inventory.header, {"context":"has_infinite_quantity"})", + "value": true, + }, + "next_event_date": { + "title": "t(curiosity-inventory.header, {"context":"next_event_date"})", + "value": "2022-01-01T00:00:00.000Z", + }, + "product_name": { + "title": "t(curiosity-inventory.header, {"context":"product_name"})", + "value": "lorem", + }, + "service_level": { + "title": "t(curiosity-inventory.header, {"context":"service_level"})", + "value": "hello world", + }, + "total_capacity": { + "title": "t(curiosity-inventory.header, {"context":"total_capacity"})", + "value": 2000, + }, + }, +} +`; + +exports[`Product RHODS config should apply subscriptions inventory configuration: filtered, fallback display 1`] = ` +{ + "cells": [ + { + "title": "lorem", + }, + { + "title": "t(curiosity-inventory.measurement_billing_provider, {"context":"none"})", + }, + { + "title": "", + }, + { + "title": "", + }, + { + "title": "t(curiosity-inventory.label_subscription_type, {"context":" "})", + }, + { + "title": "", + }, + ], + "columnHeaders": [ + { + "title": "t(curiosity-inventory.header, {"context":"product_name"})", + "transforms": [], + }, + { + "title": "t(curiosity-inventory.header, {"context":"billing_provider"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"service_level"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"quantity"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"subscription_type"})", + "transforms": [ + [Function], + ], + }, + { + "title": "t(curiosity-inventory.header, {"context":"next_event_date"})", + "transforms": [ + [Function], + ], + }, + ], + "data": { + "has_infinite_quantity": { + "title": "t(curiosity-inventory.header, {"context":"has_infinite_quantity"})", + "value": true, + }, + "next_event_date": { + "title": "t(curiosity-inventory.header, {"context":"next_event_date"})", + "value": null, + }, + "product_name": { + "title": "t(curiosity-inventory.header, {"context":"product_name"})", + "value": "lorem", + }, + "service_level": { + "title": "t(curiosity-inventory.header, {"context":"service_level"})", + "value": null, + }, + "total_capacity": { + "title": "t(curiosity-inventory.header, {"context":"total_capacity"})", + "value": 2000, + }, + }, +} +`; + +exports[`Product RHODS config should handle a custom yAxisTickFormat for floating points: yAxisTickFormat 1`] = ` +{ + "0.00001345": "0.00001", + "0.0000269": "0.00003", + "0.00004035": "0.00004", + "0.0000538": "0.00005", + "0.00006725": "0.00007", + "0.0000807": "0.00008", + "0.00009415": "0.00009", + "0.0001076": "0.00011", + "0.00012105": "0.00012", + "0.0001345": "0.00013", + "0.00014795": "0.00015", + "0.0001614": "0.00016", + "0.00017485": "0.00017", + "0.0001883": "0.00019", + "0.00020175": "0.0002", + "0.0002152": "0.00022", + "0.00022865": "0.00023", + "0.0002421": "0.00024", + "0.00025555": "0.00026", + "0.000269": "0.00027", + "0.00028245": "0.00028", + "0.0002959": "0.0003", + "0.00030935": "0.00031", + "0.0003228": "0.00032", + "0.00033625": "0.00034", + "0.001": "0.001", + "0.002": "0.002", + "0.003": "0.003", + "0.004": "0.004", + "0.005": "0.005", + "0.006": "0.006", + "0.007": "0.007", + "0.008": "0.008", + "0.009000000000000001": "0.009", + "0.01": "0.01", + "0.011": "0.011", + "0.012": "0.012", + "0.013000000000000001": "0.013", + "0.014": "0.014", + "0.015": "0.015", + "0.016": "0.016", + "0.017": "0.017", + "0.018000000000000002": "0.018", + "0.019": "0.019", + "0.02": "0.02", + "0.021": "0.021", + "0.022": "0.022", + "0.023": "0.023", + "0.024": "0.024", + "0.025": "0.025", + "1": "1", + "10": "10", + "100": "100", + "1000": "1K", + "10000": "10K", + "100000": "100K", + "1000000": "1M", + "10000000": "10M", + "100000000": "100M", + "1000000000": "1B", + "10000000000": "10B", + "100000000000": "100B", + "1000000000000": "1T", + "10000000000000": "10T", + "11": "11", + "110": "110", + "1100": "1.1K", + "11000": "11K", + "110000": "110K", + "1100000": "1.1M", + "11000000": "11M", + "110000000": "110M", + "1100000000": "1.1B", + "11000000000": "11B", + "110000000000": "110B", + "1100000000000": "1.1T", + "11000000000000": "11T", + "12": "12", + "120": "120", + "1200": "1.2K", + "12000": "12K", + "120000": "120K", + "1200000": "1.2M", + "12000000": "12M", + "120000000": "120M", + "1200000000": "1.2B", + "12000000000": "12B", + "120000000000": "120B", + "1200000000000": "1.2T", + "12000000000000": "12T", + "13": "13", + "130": "130", + "1300": "1.3K", + "13000": "13K", + "130000": "130K", + "1300000": "1.3M", + "13000000": "13M", + "130000000": "130M", + "1300000000": "1.3B", + "13000000000": "13B", + "130000000000": "130B", + "1300000000000": "1.3T", + "13000000000000": "13T", + "14": "14", + "140": "140", + "1400": "1.4K", + "14000": "14K", + "140000": "140K", + "1400000": "1.4M", + "14000000": "14M", + "140000000": "140M", + "1400000000": "1.4B", + "14000000000": "14B", + "140000000000": "140B", + "1400000000000": "1.4T", + "14000000000000": "14T", + "15": "15", + "150": "150", + "1500": "1.5K", + "15000": "15K", + "150000": "150K", + "1500000": "1.5M", + "15000000": "15M", + "150000000": "150M", + "1500000000": "1.5B", + "15000000000": "15B", + "150000000000": "150B", + "1500000000000": "1.5T", + "15000000000000": "15T", + "2": "2", + "20": "20", + "200": "200", + "2000": "2K", + "20000": "20K", + "200000": "200K", + "2000000": "2M", + "20000000": "20M", + "200000000": "200M", + "2000000000": "2B", + "20000000000": "20B", + "200000000000": "200B", + "2000000000000": "2T", + "3": "3", + "30": "30", + "300": "300", + "3000": "3K", + "30000": "30K", + "300000": "300K", + "3000000": "3M", + "30000000": "30M", + "300000000": "300M", + "3000000000": "3B", + "30000000000": "30B", + "300000000000": "300B", + "3000000000000": "3T", + "4": "4", + "40": "40", + "400": "400", + "4000": "4K", + "40000": "40K", + "400000": "400K", + "4000000": "4M", + "40000000": "40M", + "400000000": "400M", + "4000000000": "4B", + "40000000000": "40B", + "400000000000": "400B", + "4000000000000": "4T", + "5": "5", + "50": "50", + "500": "500", + "5000": "5K", + "50000": "50K", + "500000": "500K", + "5000000": "5M", + "50000000": "50M", + "500000000": "500M", + "5000000000": "5B", + "50000000000": "50B", + "500000000000": "500B", + "5000000000000": "5T", + "6": "6", + "60": "60", + "600": "600", + "6000": "6K", + "60000": "60K", + "600000": "600K", + "6000000": "6M", + "60000000": "60M", + "600000000": "600M", + "6000000000": "6B", + "60000000000": "60B", + "600000000000": "600B", + "6000000000000": "6T", + "7": "7", + "70": "70", + "700": "700", + "7000": "7K", + "70000": "70K", + "700000": "700K", + "7000000": "7M", + "70000000": "70M", + "700000000": "700M", + "7000000000": "7B", + "70000000000": "70B", + "700000000000": "700B", + "7000000000000": "7T", + "8": "8", + "80": "80", + "800": "800", + "8000": "8K", + "80000": "80K", + "800000": "800K", + "8000000": "8M", + "80000000": "80M", + "800000000": "800M", + "8000000000": "8B", + "80000000000": "80B", + "800000000000": "800B", + "8000000000000": "8T", + "9": "9", + "90": "90", + "900": "900", + "9000": "9K", + "90000": "90K", + "900000": "900K", + "9000000": "9M", + "90000000": "90M", + "900000000": "900M", + "9000000000": "9B", + "90000000000": "90B", + "900000000000": "900B", + "9000000000000": "9T", +} +`; diff --git a/src/config/__tests__/product.rhods.test.js b/src/config/__tests__/product.rhods.test.js new file mode 100644 index 000000000..f6011e36b --- /dev/null +++ b/src/config/__tests__/product.rhods.test.js @@ -0,0 +1,125 @@ +import { config } from '../product.rhods'; +import { generateChartSettings } from '../../components/graphCard/graphCardHelpers'; +import { parseRowCellsListData } from '../../components/inventoryCard/inventoryCardHelpers'; +import { + RHSM_API_QUERY_INVENTORY_SORT_DIRECTION_TYPES as SORT_DIRECTION_TYPES, + RHSM_API_RESPONSE_INSTANCES_DATA_TYPES as INVENTORY_TYPES, + RHSM_API_RESPONSE_SUBSCRIPTIONS_DATA_TYPES as SUBSCRIPTIONS_INVENTORY_TYPES, + RHSM_API_RESPONSE_SUBSCRIPTIONS_META_TYPES as SUBSCRIPTIONS_INVENTORY_META_TYPES, + RHSM_API_QUERY_SET_TYPES, + RHSM_API_PATH_METRIC_TYPES +} from '../../services/rhsm/rhsmConstants'; + +describe('Product RHODS config', () => { + it('should apply graph configuration', () => { + const { initialGraphFilters, initialGraphSettings } = config; + + expect(generateChartSettings(initialGraphFilters)).toMatchSnapshot('filters'); + expect(initialGraphSettings).toMatchSnapshot('settings'); + }); + + it('should handle a custom yAxisTickFormat for floating points', () => { + const generateTicks = (method = config.initialGraphSettings.yAxisTickFormat) => { + const ticks = {}; + + for (let i = 0.00001345; i < 1; i++) { + for (let k = 1; k < 26; k++) { + const incrementMultiplier = k * i; + ticks[incrementMultiplier] = method({ tick: incrementMultiplier }); + } + } + + for (let i = 0.001; i < 1; i++) { + for (let k = 1; k < 26; k++) { + const incrementMultiplier = k * i; + ticks[incrementMultiplier] = method({ tick: incrementMultiplier }); + } + } + + for (let i = 0; i < 13; i++) { + const multiplier = Math.pow(10, i); + for (let k = 1; k < 16; k++) { + const incrementMultiplier = k * multiplier; + ticks[incrementMultiplier] = method({ tick: incrementMultiplier }); + } + } + return ticks; + }; + + expect(generateTicks()).toMatchSnapshot('yAxisTickFormat'); + }); + + /** + * FixMe: this test needs to be updated as part of the refactor towards instances vs hosts + */ + it('should apply an instances inventory configuration under hosts', () => { + const { initialInventoryFilters: initialFilters, inventoryHostsQuery: inventoryQuery } = config; + + const inventoryData = { + [INVENTORY_TYPES.DISPLAY_NAME]: 'lorem ipsum', + [RHSM_API_PATH_METRIC_TYPES.CORES]: 200, + [INVENTORY_TYPES.LAST_SEEN]: '2022-01-01T00:00:00.000Z' + }; + + const filteredInventoryData = parseRowCellsListData({ + filters: initialFilters, + cellData: inventoryData + }); + + expect(filteredInventoryData).toMatchSnapshot('filtered'); + + const filteredInventoryDataAuthorized = parseRowCellsListData({ + filters: initialFilters, + cellData: { + ...inventoryData, + [INVENTORY_TYPES.INVENTORY_ID]: 'XXXX-XXXX-XXXXX-XXXXX' + }, + session: { authorized: { inventory: true } } + }); + + expect(filteredInventoryDataAuthorized).toMatchSnapshot('filtered, authorized'); + + expect(inventoryQuery[RHSM_API_QUERY_SET_TYPES.DIRECTION] === SORT_DIRECTION_TYPES.DESCENDING).toBe(true); + }); + + it('should apply subscriptions inventory configuration', () => { + const { initialSubscriptionsInventoryFilters: initialFilters, inventorySubscriptionsQuery: inventoryQuery } = + config; + + const inventoryData = { + [SUBSCRIPTIONS_INVENTORY_TYPES.PRODUCT_NAME]: 'lorem', + [SUBSCRIPTIONS_INVENTORY_TYPES.SERVICE_LEVEL]: 'hello world', + [SUBSCRIPTIONS_INVENTORY_TYPES.NEXT_EVENT_DATE]: '2022-01-01T00:00:00.000Z', + [SUBSCRIPTIONS_INVENTORY_TYPES.TOTAL_CAPACITY]: 2000, + [SUBSCRIPTIONS_INVENTORY_TYPES.HAS_INFINITE_QUANTITY]: true + }; + + const inventoryMeta = { + [SUBSCRIPTIONS_INVENTORY_META_TYPES.SUBSCRIPTION_TYPE]: 'dolor' + }; + + const filteredInventoryData = parseRowCellsListData({ + filters: initialFilters, + cellData: inventoryData, + meta: inventoryMeta + }); + + expect(filteredInventoryData).toMatchSnapshot('filtered'); + + const fallbackInventoryData = { + ...inventoryData, + [SUBSCRIPTIONS_INVENTORY_TYPES.SERVICE_LEVEL]: null, + [SUBSCRIPTIONS_INVENTORY_TYPES.NEXT_EVENT_DATE]: null + }; + + const fallbackFilteredInventoryData = parseRowCellsListData({ + filters: initialFilters, + cellData: fallbackInventoryData, + meta: {} + }); + + expect(fallbackFilteredInventoryData).toMatchSnapshot('filtered, fallback display'); + + expect(inventoryQuery[RHSM_API_QUERY_SET_TYPES.DIRECTION] === SORT_DIRECTION_TYPES.DESCENDING).toBe(true); + }); +}); diff --git a/src/config/product.rhods.js b/src/config/product.rhods.js new file mode 100644 index 000000000..6124cdb0d --- /dev/null +++ b/src/config/product.rhods.js @@ -0,0 +1,208 @@ +import React from 'react'; +import { + chart_color_blue_100 as chartColorBlueLight, + chart_color_blue_300 as chartColorBlueDark +} from '@patternfly/react-tokens'; +import { Button } from '@patternfly/react-core'; +import { DateFormat } from '@redhat-cloud-services/frontend-components/DateFormat'; +import moment from 'moment'; +import { + RHSM_API_QUERY_INVENTORY_SORT_DIRECTION_TYPES as SORT_DIRECTION_TYPES, + RHSM_API_QUERY_INVENTORY_SORT_TYPES, + RHSM_API_QUERY_INVENTORY_SUBSCRIPTIONS_SORT_TYPES, + RHSM_API_RESPONSE_SUBSCRIPTIONS_DATA_TYPES as SUBSCRIPTIONS_INVENTORY_TYPES, + RHSM_API_RESPONSE_SUBSCRIPTIONS_META_TYPES as SUBSCRIPTIONS_INVENTORY_META_TYPES, + RHSM_API_RESPONSE_INSTANCES_DATA_TYPES as INVENTORY_TYPES, + RHSM_API_QUERY_GRANULARITY_TYPES as GRANULARITY_TYPES, + RHSM_API_QUERY_SET_TYPES, + RHSM_API_PATH_PRODUCT_TYPES, + RHSM_API_PATH_METRIC_TYPES, + RHSM_INTERNAL_PRODUCT_DISPLAY_TYPES as DISPLAY_TYPES +} from '../services/rhsm/rhsmConstants'; +import { dateHelpers, helpers } from '../common'; +import { translate, EMPTY_CONTEXT } from '../components/i18n/i18n'; + +const productGroup = RHSM_API_PATH_PRODUCT_TYPES.RHODS; + +const productId = RHSM_API_PATH_PRODUCT_TYPES.RHODS; + +const productLabel = RHSM_API_PATH_PRODUCT_TYPES.RHODS; + +const config = { + productGroup, + productId, + productLabel, + productDisplay: DISPLAY_TYPES.HOURLY, + viewId: `view${productGroup}`, + query: { + [RHSM_API_QUERY_SET_TYPES.START_DATE]: dateHelpers.getRangedMonthDateTime('current').value.startDate.toISOString(), + [RHSM_API_QUERY_SET_TYPES.END_DATE]: dateHelpers.getRangedMonthDateTime('current').value.endDate.toISOString() + }, + graphTallyQuery: { + [RHSM_API_QUERY_SET_TYPES.GRANULARITY]: GRANULARITY_TYPES.DAILY + }, + inventoryHostsQuery: { + [RHSM_API_QUERY_SET_TYPES.SORT]: RHSM_API_QUERY_INVENTORY_SORT_TYPES.LAST_SEEN, + [RHSM_API_QUERY_SET_TYPES.DIRECTION]: SORT_DIRECTION_TYPES.DESCENDING, + [RHSM_API_QUERY_SET_TYPES.LIMIT]: 100, + [RHSM_API_QUERY_SET_TYPES.OFFSET]: 0 + }, + inventorySubscriptionsQuery: { + [RHSM_API_QUERY_SET_TYPES.SORT]: RHSM_API_QUERY_INVENTORY_SUBSCRIPTIONS_SORT_TYPES.NEXT_EVENT_DATE, + [RHSM_API_QUERY_SET_TYPES.DIRECTION]: SORT_DIRECTION_TYPES.DESCENDING, + [RHSM_API_QUERY_SET_TYPES.LIMIT]: 100, + [RHSM_API_QUERY_SET_TYPES.OFFSET]: 0 + }, + initialGraphFilters: [ + { + id: RHSM_API_PATH_METRIC_TYPES.CORES, + fill: chartColorBlueLight.value, + stroke: chartColorBlueDark.value, + color: chartColorBlueDark.value, + chartType: 'line', + isStacked: false, + isStandalone: true, + yAxisChartLabel: ({ id }) => translate('curiosity-graph.label_axisY', { context: id }) + } + ], + initialGraphSettings: { + isCardTitleDescription: true, + xAxisChartLabel: () => translate('curiosity-graph.label_axisX', { context: GRANULARITY_TYPES.DAILY }), + yAxisTickFormat: ({ tick }) => { + if (tick > 1) { + return helpers + .numberDisplay(tick) + ?.format({ average: true, mantissa: 1, trimMantissa: true, lowPrecision: false }) + ?.toUpperCase(); + } + return helpers + .numberDisplay(tick) + ?.format({ average: true, mantissa: 5, trimMantissa: true, lowPrecision: true }) + ?.toUpperCase(); + } + }, + initialInventoryFilters: [ + { + id: INVENTORY_TYPES.DISPLAY_NAME, + cell: ( + { [INVENTORY_TYPES.DISPLAY_NAME]: displayName = {}, [INVENTORY_TYPES.INVENTORY_ID]: inventoryId = {} }, + session + ) => { + const { inventory: authorized } = session?.authorized || {}; + + if (!inventoryId.value) { + return displayName.value; + } + + let updatedDisplayName = displayName.value || inventoryId.value; + + if (authorized) { + updatedDisplayName = ( + + ); + } + + return updatedDisplayName; + }, + isSortable: true + }, + { + id: INVENTORY_TYPES.BILLING_PROVIDER, + cell: ({ [INVENTORY_TYPES.BILLING_PROVIDER]: provider }) => + translate(`curiosity-inventory.measurement_${INVENTORY_TYPES.BILLING_PROVIDER}`, { + context: provider?.value || 'none' + }), + isSortable: true, + isWrappable: false, + cellWidth: 15 + }, + { + id: RHSM_API_PATH_METRIC_TYPES.CORES, + cell: ({ [RHSM_API_PATH_METRIC_TYPES.CORES]: total }) => + translate('curiosity-inventory.measurement', { + context: RHSM_API_PATH_METRIC_TYPES.CORES, + total: helpers.numberDisplay(total?.value)?.format({ mantissa: 5, trimMantissa: true }) || 0 + }), + isSortable: true, + isWrappable: true, + cellWidth: 15 + }, + { + id: INVENTORY_TYPES.LAST_SEEN, + cell: ({ [INVENTORY_TYPES.LAST_SEEN]: lastSeen }) => + (lastSeen?.value && ) || '', + isSortable: true, + isWrappable: true, + cellWidth: 15 + } + ], + initialSubscriptionsInventoryFilters: [ + { + id: SUBSCRIPTIONS_INVENTORY_TYPES.PRODUCT_NAME, + isSortable: true, + isWrappable: true + }, + { + id: SUBSCRIPTIONS_INVENTORY_TYPES.BILLING_PROVIDER, + cell: ({ [SUBSCRIPTIONS_INVENTORY_TYPES.BILLING_PROVIDER]: provider }) => + translate(`curiosity-inventory.measurement_${SUBSCRIPTIONS_INVENTORY_TYPES.BILLING_PROVIDER}`, { + context: provider?.value || 'none' + }), + isSortable: true, + isWrappable: false, + cellWidth: 15 + }, + { + id: SUBSCRIPTIONS_INVENTORY_TYPES.SERVICE_LEVEL, + isSortable: true, + isWrappable: true, + cellWidth: 15 + }, + { + id: SUBSCRIPTIONS_INVENTORY_TYPES.QUANTITY, + isSortable: true, + cellWidth: 10, + isWrappable: true + }, + { + id: SUBSCRIPTIONS_INVENTORY_META_TYPES.SUBSCRIPTION_TYPE, + cell: (data, session, { [SUBSCRIPTIONS_INVENTORY_META_TYPES.SUBSCRIPTION_TYPE]: subscriptionType } = {}) => + translate(`curiosity-inventory.label_${SUBSCRIPTIONS_INVENTORY_META_TYPES.SUBSCRIPTION_TYPE}`, { + context: subscriptionType || EMPTY_CONTEXT + }), + isSortable: false, + cellWidth: 15, + isWrappable: true + }, + { + id: SUBSCRIPTIONS_INVENTORY_TYPES.NEXT_EVENT_DATE, + cell: ({ [SUBSCRIPTIONS_INVENTORY_TYPES.NEXT_EVENT_DATE]: nextEventDate } = {}) => + (nextEventDate?.value && + helpers.isDate(nextEventDate?.value) && + moment.utc(nextEventDate?.value).format('YYYY-MM-DD')) || + '', + isSortable: true, + isWrappable: true, + cellWidth: 15 + } + ], + initialToolbarFilters: [ + { + id: RHSM_API_QUERY_SET_TYPES.BILLING_PROVIDER + } + ], + initialSecondaryToolbarFilters: [ + { + id: 'rangedMonthly' + } + ] +}; + +export { config as default, config, productGroup, productId }; diff --git a/src/config/routes.js b/src/config/routes.js index ec16005fb..0f8971b67 100644 --- a/src/config/routes.js +++ b/src/config/routes.js @@ -3,6 +3,7 @@ import { config as openshiftContainerConfig } from './product.openshiftContainer import { config as openshiftMetricsConfig } from './product.openshiftMetrics'; import { config as openshiftDedicatedConfig } from './product.openshiftDedicated'; import { config as rhacsConfig } from './product.rhacs'; +import { config as rhodsConfig } from './product.rhods'; import { config as rhosakConfig } from './product.rhosak'; import { config as satelliteProductConfig } from './product.satellite'; import { RHSM_API_PATH_ID_TYPES } from '../types/rhsmApiTypes'; @@ -121,6 +122,20 @@ const routes = [ default: false, component: 'productView/productView' }, + { + id: 'rhods', + path: '/rhods', + pathParameter: [rhodsConfig.productId], + productParameter: [rhodsConfig.productGroup], + productConfig: [rhodsConfig], + redirect: null, + isSearchable: true, + aliases: ['rhods'], + activateOnError: false, + disabled: helpers.UI_DISABLED, + default: false, + component: 'productView/productView' + }, { id: 'rhosak', path: '/streams', diff --git a/src/services/rhsm/__tests__/__snapshots__/rhsmConstants.test.js.snap b/src/services/rhsm/__tests__/__snapshots__/rhsmConstants.test.js.snap index bb1cee420..a32d72501 100644 --- a/src/services/rhsm/__tests__/__snapshots__/rhsmConstants.test.js.snap +++ b/src/services/rhsm/__tests__/__snapshots__/rhsmConstants.test.js.snap @@ -25,6 +25,7 @@ exports[`RHSM Constants should have specific properties: all exported constants "RHEL_SERVER": "RHEL Server", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHODS": "rhods", "RHOSAK": "rhosak", "SATELLITE": "Satellite", "SATELLITE_CAPSULE": "Satellite Capsule", @@ -245,6 +246,7 @@ exports[`RHSM Constants should have specific properties: all exported constants "RHEL_SERVER": "RHEL Server", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHODS": "rhods", "RHOSAK": "rhosak", "SATELLITE": "Satellite", "SATELLITE_CAPSULE": "Satellite Capsule", @@ -466,6 +468,7 @@ exports[`RHSM Constants should have specific properties: all exported constants "RHEL_SERVER": "RHEL Server", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHODS": "rhods", "RHOSAK": "rhosak", "SATELLITE": "Satellite", "SATELLITE_CAPSULE": "Satellite Capsule", @@ -691,6 +694,7 @@ exports[`RHSM Constants should have specific properties: specific constants 1`] "RHEL_SERVER": "RHEL Server", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHODS": "rhods", "RHOSAK": "rhosak", "SATELLITE": "Satellite", "SATELLITE_CAPSULE": "Satellite Capsule", diff --git a/src/services/rhsm/rhsmConstants.js b/src/services/rhsm/rhsmConstants.js index 9bb3cabfd..e92c6d569 100644 --- a/src/services/rhsm/rhsmConstants.js +++ b/src/services/rhsm/rhsmConstants.js @@ -6,7 +6,7 @@ /** * RHSM path IDs for products. * - * @type {{RHEL_ARM: string, OPENSHIFT_METRICS: string, SATELLITE: string, RHEL_WORKSTATION: string, RHOSAK: string, + * @type {{RHEL_ARM: string, OPENSHIFT_METRICS: string, SATELLITE: string, RHEL_WORKSTATION: string, RHODS: string, RHOSAK: string, * RHEL_COMPUTE_NODE: string, RHEL_X86: string, OPENSHIFT: string, SATELLITE_SERVER: string, OPENSHIFT_DEDICATED_METRICS: string, * RHEL_DESKTOP: string, RHEL: string, SATELLITE_CAPSULE: string, RHEL_SERVER: string, RHEL_IBM_Z: string, RHACS: string, * RHEL_IBM_POWER: string}} @@ -22,6 +22,7 @@ const RHSM_API_PATH_PRODUCT_TYPES = { RHEL_IBM_POWER: 'RHEL for IBM Power', RHEL_IBM_Z: 'RHEL for IBM z', RHEL_X86: 'RHEL for x86', + RHODS: 'rhods', RHOSAK: 'rhosak', OPENSHIFT: 'OpenShift Container Platform', OPENSHIFT_METRICS: 'OpenShift-metrics', @@ -379,8 +380,8 @@ const RHSM_INTERNAL_PRODUCT_DISPLAY_TYPES = { * * @type {{RHSM_API_QUERY_SET_TALLY_CAPACITY_TYPES: {GRANULARITY: string, USAGE: string, END_DATE: string, SLA: string, START_DATE: string, * BILLING_PROVIDER: string}, RHSM_API_RESPONSE_DATA: string, RHSM_API_RESPONSE_SUBSCRIPTIONS_META_TYPES: {PRODUCT: string, - * SUBSCRIPTION_TYPE: string, COUNT: string}, RHSM_API_PATH_METRIC_TYPES: {CORES: string, STORAGE_GIBIBYTES: string, - * SOCKETS: string, INSTANCE_HOURS: string, TRANSFER_GIBIBYTES: string, CORE_SECONDS: string, STORAGE_GIBIBYTE_MONTHS: string}, + * SUBSCRIPTION_TYPE: string, COUNT: string}, RHSM_API_PATH_METRIC_TYPES: {CORES: string, STORAGE_GIBIBYTES: string, SOCKETS: string, + * INSTANCE_HOURS: string, TRANSFER_GIBIBYTES: string, CORE_SECONDS: string, STORAGE_GIBIBYTE_MONTHS: string}, * RHSM_API_RESPONSE_TALLY_DATA_TYPES: {DATE: string, HAS_DATA: string, VALUE: string}, * RHSM_API_RESPONSE_INSTANCES_META_TYPES: {MEASUREMENTS: string, PRODUCT: string, COUNT: string}, * RHSM_API_RESPONSE_INSTANCES_DATA_TYPES: {MEASUREMENTS: string, BILLING_ACCOUNT_ID: string, SUBSCRIPTION_MANAGER_ID: string, @@ -391,28 +392,30 @@ const RHSM_INTERNAL_PRODUCT_DISPLAY_TYPES = { * RHSM_API_RESPONSE_UOM_TYPES: {CORES: string, SOCKETS: string}, RHSM_API_RESPONSE_SUBSCRIPTIONS_DATA_TYPES: {BILLING_ACCOUNT_ID: string, * QUANTITY: string, SUBSCRIPTION_MANAGER_ID: string, INVENTORY_ID: string, NUMBER_OF_GUESTS: string, HAS_INFINITE_QUANTITY: string, * TOTAL_CAPACITY: string, PRODUCT_NAME: string, SERVICE_LEVEL: string, DISPLAY_NAME: string, MEASUREMENTS: string, UOM: string, - * NEXT_EVENT_DATE: string, BILLING_PROVIDER: string, LAST_SEEN: string}, RHSM_API_QUERY_INVENTORY_SORT_DIRECTION_TYPES: {ASCENDING: string, - * DESCENDING: string}, RHSM_API_RESPONSE_SUBSCRIPTION_TYPES: {ANNUAL: string, ON_DEMAND: string}, - * RHSM_API_QUERY_INVENTORY_SORT_TYPES: {CORES: string, STORAGE_GIBIBYTES: string, SOCKETS: string, INSTANCE_HOURS: string, - * TRANSFER_GIBIBYTES: string, BILLING_PROVIDER: string, CORE_SECONDS: string, LAST_SEEN: string, NAME: string}, - * RHSM_API_PATH_PRODUCT_TYPES: {RHEL_ARM: string, OPENSHIFT_METRICS: string, SATELLITE: string, RHEL_WORKSTATION: string, RHOSAK: string, - * RHEL_COMPUTE_NODE: string, RHEL_X86: string, OPENSHIFT: string, SATELLITE_SERVER: string, OPENSHIFT_DEDICATED_METRICS: string, - * RHEL_DESKTOP: string, RHEL: string, SATELLITE_CAPSULE: string, RHEL_SERVER: string, RHEL_IBM_Z: string, RHACS: string, - * RHEL_IBM_POWER: string}, RHSM_API_RESPONSE_BILLING_PROVIDER_TYPES: {AZURE: string, GCP: string, RED_HAT: string, NONE: string, - * AWS: string, ORACLE: string}, RHSM_API_RESPONSE_ERRORS_TYPES: {CODE: string}, RHSM_API_QUERY_BILLING_PROVIDER_TYPES: {AZURE: string, - * GCP: string, RED_HAT: string, NONE: string, AWS: string, ORACLE: string}, RHSM_API_QUERY_USAGE_TYPES: {UNSPECIFIED: string, - * DISASTER: string, DEVELOPMENT: string, PRODUCTION: string}, RHSM_API_QUERY_SLA_TYPES: {PREMIUM: string, SELF: string, NONE: string, - * STANDARD: string}, RHSM_API_QUERY_SET_INVENTORY_TYPES: {UOM: string, BILLING_ACCOUNT_ID: string, USAGE: string, DIRECTION: string, - * SORT: string, END_DATE: string, OFFSET: string, SLA: string, LIMIT: string, START_DATE: string, BILLING_PROVIDER: string, - * DISPLAY_NAME: string}, RHSM_API_RESPONSE_ERRORS: string, RHSM_API_RESPONSE_TALLY_META_TYPES: {TOTAL_MONTHLY: string, DATE: string, - * PRODUCT: string, HAS_CLOUDIGRADE_DATA: string, HAS_CLOUDIGRADE_MISMATCH: string, HAS_DATA: string, METRIC_ID: string, COUNT: string, - * VALUE: string}, RHSM_API_QUERY_UOM_TYPES: {CORES: string, SOCKETS: string}, RHSM_API_RESPONSE_META: string, + * NEXT_EVENT_DATE: string, BILLING_PROVIDER: string, LAST_SEEN: string}, + * RHSM_API_QUERY_INVENTORY_SORT_DIRECTION_TYPES: {ASCENDING: string, DESCENDING: string}, + * RHSM_API_RESPONSE_SUBSCRIPTION_TYPES: {ANNUAL: string, ON_DEMAND: string}, RHSM_API_QUERY_INVENTORY_SORT_TYPES: {CORES: string, + * STORAGE_GIBIBYTES: string, SOCKETS: string, INSTANCE_HOURS: string, TRANSFER_GIBIBYTES: string, BILLING_PROVIDER: string, + * CORE_SECONDS: string, LAST_SEEN: string, NAME: string}, RHSM_API_PATH_PRODUCT_TYPES: {RHEL_ARM: string, OPENSHIFT_METRICS: string, + * SATELLITE: string, RHEL_WORKSTATION: string, RHODS: string, RHOSAK: string, RHEL_COMPUTE_NODE: string, RHEL_X86: string, + * OPENSHIFT: string, SATELLITE_SERVER: string, OPENSHIFT_DEDICATED_METRICS: string, RHEL_DESKTOP: string, RHEL: string, + * SATELLITE_CAPSULE: string, RHEL_SERVER: string, RHEL_IBM_Z: string, RHACS: string, RHEL_IBM_POWER: string}, + * RHSM_API_RESPONSE_BILLING_PROVIDER_TYPES: {AZURE: string, GCP: string, RED_HAT: string, NONE: string, AWS: string, ORACLE: string}, + * RHSM_API_RESPONSE_ERRORS_TYPES: {CODE: string}, RHSM_API_QUERY_BILLING_PROVIDER_TYPES: {AZURE: string, GCP: string, RED_HAT: string, + * NONE: string, AWS: string, ORACLE: string}, RHSM_API_QUERY_USAGE_TYPES: {UNSPECIFIED: string, DISASTER: string, DEVELOPMENT: string, + * PRODUCTION: string}, RHSM_API_QUERY_SLA_TYPES: {PREMIUM: string, SELF: string, NONE: string, STANDARD: string}, + * RHSM_API_QUERY_SET_INVENTORY_TYPES: {UOM: string, BILLING_ACCOUNT_ID: string, USAGE: string, DIRECTION: string, SORT: string, + * END_DATE: string, OFFSET: string, SLA: string, LIMIT: string, START_DATE: string, BILLING_PROVIDER: string, DISPLAY_NAME: string}, + * RHSM_API_RESPONSE_ERRORS: string, RHSM_API_RESPONSE_TALLY_META_TYPES: {TOTAL_MONTHLY: string, DATE: string, PRODUCT: string, + * HAS_CLOUDIGRADE_DATA: string, HAS_CLOUDIGRADE_MISMATCH: string, HAS_DATA: string, METRIC_ID: string, COUNT: string, VALUE: string}, + * RHSM_API_QUERY_UOM_TYPES: {CORES: string, SOCKETS: string}, RHSM_API_RESPONSE_META: string, * RHSM_API_RESPONSE_GRANULARITY_TYPES: {WEEKLY: string, QUARTERLY: string, DAILY: string, MONTHLY: string}, * RHSM_API_QUERY_SET_TYPES: {UOM: string, GRANULARITY: string, USAGE: string, DIRECTION: string, SORT: string, END_DATE: string, * OFFSET: string, SLA: string, LIMIT: string, START_DATE: string, DISPLAY_NAME: string}, - * RHSM_API_QUERY_INVENTORY_SUBSCRIPTIONS_SORT_TYPES: {QUANTITY: string, USAGE: string, NEXT_EVENT_TYPE: string, NEXT_EVENT_DATE: string, - * TOTAL_CAPACITY: string, PRODUCT_NAME: string, SKU: string, SERVICE_LEVEL: string}, RHSM_INTERNAL_PRODUCT_DISPLAY_TYPES: {DUAL_AXES: string, - * LEGACY: string, HOURLY: string}, RHSM_API_RESPONSE_USAGE_TYPES: {UNSPECIFIED: string, DISASTER: string, DEVELOPMENT: string, PRODUCTION: string}}} + * RHSM_API_QUERY_INVENTORY_SUBSCRIPTIONS_SORT_TYPES: {QUANTITY: string, USAGE: string, NEXT_EVENT_TYPE: string, + * NEXT_EVENT_DATE: string, TOTAL_CAPACITY: string, PRODUCT_NAME: string, SKU: string, SERVICE_LEVEL: string}, + * RHSM_INTERNAL_PRODUCT_DISPLAY_TYPES: {DUAL_AXES: string, LEGACY: string, HOURLY: string}, + * RHSM_API_RESPONSE_USAGE_TYPES: {UNSPECIFIED: string, DISASTER: string, DEVELOPMENT: string, PRODUCTION: string}}} */ const rhsmConstants = { RHSM_API_PATH_PRODUCT_TYPES, diff --git a/src/types/__tests__/__snapshots__/index.test.js.snap b/src/types/__tests__/__snapshots__/index.test.js.snap index 9f2ab1d7f..43be92346 100644 --- a/src/types/__tests__/__snapshots__/index.test.js.snap +++ b/src/types/__tests__/__snapshots__/index.test.js.snap @@ -18,6 +18,7 @@ exports[`ApiTypes should have specific API properties: all exported api types 1` "RHEL_SERVER": "RHEL Server", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHODS": "rhods", "RHOSAK": "rhosak", "SATELLITE": "Satellite", "SATELLITE_CAPSULE": "Satellite Capsule", @@ -225,6 +226,7 @@ exports[`ApiTypes should have specific API properties: all exported api types 1` "RHEL_SERVER": "RHEL Server", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHODS": "rhods", "RHOSAK": "rhosak", "SATELLITE": "Satellite", "SATELLITE_CAPSULE": "Satellite Capsule", @@ -431,6 +433,7 @@ exports[`ApiTypes should have specific API properties: all exported api types 1` "RHEL_SERVER": "RHEL Server", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHODS": "rhods", "RHOSAK": "rhosak", "SATELLITE": "Satellite", "SATELLITE_CAPSULE": "Satellite Capsule", @@ -641,6 +644,7 @@ exports[`ApiTypes should have specific API properties: specific types 1`] = ` "RHEL_SERVER": "RHEL Server", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHODS": "rhods", "RHOSAK": "rhosak", "SATELLITE": "Satellite", "SATELLITE_CAPSULE": "Satellite Capsule",