diff --git a/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap b/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap index 24615c7fb..c734ed866 100644 --- a/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap +++ b/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap @@ -674,6 +674,10 @@ Array [ "key": "curiosity-inventory.measurement", "match": "translate('curiosity-inventory.measurement', { context: RHSM_API_PATH_METRIC_TYPES.INSTANCE_HOURS, total: helpers.numberDisplay(total?.value)", }, + Object { + "key": "", + "match": "translate(\`curiosity-inventory.measurement_\${SUBSCRIPTIONS_INVENTORY_TYPES.BILLING_PROVIDER}\`, { context: provider?.value || 'none' })", + }, Object { "key": "", "match": "translate(\`curiosity-inventory.label_\${SUBSCRIPTIONS_INVENTORY_META_TYPES.SUBSCRIPTION_TYPE}\`, { context: subscriptionType || EMPTY_CONTEXT })", diff --git a/src/config/__tests__/__snapshots__/product.rhosak.test.js.snap b/src/config/__tests__/__snapshots__/product.rhosak.test.js.snap index 443958dd4..e94034729 100644 --- a/src/config/__tests__/__snapshots__/product.rhosak.test.js.snap +++ b/src/config/__tests__/__snapshots__/product.rhosak.test.js.snap @@ -279,6 +279,9 @@ Object { Object { "title": "lorem", }, + Object { + "title": "t(curiosity-inventory.measurement_billing_provider, {\\"context\\":\\"none\\"})", + }, Object { "title": "hello world", }, @@ -297,6 +300,12 @@ Object { "title": "t(curiosity-inventory.header, {\\"context\\":\\"product_name\\"})", "transforms": Array [], }, + Object { + "title": "t(curiosity-inventory.header, {\\"context\\":\\"billing_provider\\"})", + "transforms": Array [ + [Function], + ], + }, Object { "title": "t(curiosity-inventory.header, {\\"context\\":\\"service_level\\"})", "transforms": Array [ @@ -353,6 +362,9 @@ Object { Object { "title": "lorem", }, + Object { + "title": "t(curiosity-inventory.measurement_billing_provider, {\\"context\\":\\"none\\"})", + }, Object { "title": "", }, @@ -371,6 +383,12 @@ Object { "title": "t(curiosity-inventory.header, {\\"context\\":\\"product_name\\"})", "transforms": Array [], }, + Object { + "title": "t(curiosity-inventory.header, {\\"context\\":\\"billing_provider\\"})", + "transforms": Array [ + [Function], + ], + }, Object { "title": "t(curiosity-inventory.header, {\\"context\\":\\"service_level\\"})", "transforms": Array [ diff --git a/src/config/product.rhosak.js b/src/config/product.rhosak.js index 0a3e26818..ff2ffe9f2 100644 --- a/src/config/product.rhosak.js +++ b/src/config/product.rhosak.js @@ -210,6 +210,16 @@ const config = { 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, diff --git a/src/services/rhsm/rhsmServices.js b/src/services/rhsm/rhsmServices.js index 98e992b97..e6d1fdfd4 100644 --- a/src/services/rhsm/rhsmServices.js +++ b/src/services/rhsm/rhsmServices.js @@ -2297,6 +2297,7 @@ const getInstancesInventory = (id, params = {}, options = {}) => { * { * "sku": "RH00011", * "product_name": "Red Hat Enterprise Linux Server, Premium (Physical and 4 Virtual Nodes)(L3 Only)", + * "billing_provider": "red hat", * "service_level": "Premium", * "usage": "Production", * "subscriptions": [ @@ -2316,6 +2317,7 @@ const getInstancesInventory = (id, params = {}, options = {}) => { * { * "sku": "RH00010", * "product_name": "Red Hat Enterprise Linux Server", + * "billing_provider": "azure", * "service_level": "Self-Support", * "usage": "Production", * "subscriptions": [], @@ -2331,6 +2333,7 @@ const getInstancesInventory = (id, params = {}, options = {}) => { * { * "sku": "RH00009", * "product_name": "Red Hat Enterprise Linux Server, Premium", + * "billing_provider": "Unknown", * "service_level": "Premium", * "usage": "Production", * "subscriptions": [