diff --git a/public/locales/en-US.json b/public/locales/en-US.json index 8a26f222c..3c2e3c3a2 100644 --- a/public/locales/en-US.json +++ b/public/locales/en-US.json @@ -39,6 +39,8 @@ "coreHoursLabel": "Core hours", "coreHoursLegendTooltip": "{{product}} core hours usage.", "coreHoursLegendTooltip_OpenShift-dedicated-metrics": "OpenShift Dedicated core hours usage.", + "instanceHoursLabel": "Instance hours", + "instanceHoursLegendTooltip_OpenShift-dedicated-metrics": "OpenShift Dedicated instance hours usage.", "socketsLabel": "Sockets", "socketsLegendTooltip": "{{product}} CPU usage, per CPU socket pair.", "cloudSocketsLabel": "Public cloud", @@ -64,8 +66,11 @@ "cardHeading": "Current systems", "tabHeading": "Inventory listing", "tabHeading_plural": "Inventory listings", - "tab_hosts": "Current systems", - "tab_subscriptions": "Current subscriptions", + "tabHosts": "Current systems", + "tabHosts_noInstances_OpenShift-dedicated-metrics": "Current instances", + "tabHosts_OpenShift-dedicated-metrics": "{{count}} instance", + "tabHosts_OpenShift-dedicated-metrics_plural": "{{count}} instances", + "tabSubscriptions": "Current subscriptions", "tab_disabled": "The {{tabName}} display is currently disabled.", "tableAriaLabel": "{{appName}} systems inventory table.", "tableSummary": "A generated table with one level of column headers.", diff --git a/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap b/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap index 1846b93dc..541c4205c 100644 --- a/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap +++ b/src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap @@ -253,12 +253,12 @@ Array [ "match": "t(\`curiosity-view.title\`, { appName: helpers.UI_DISPLAY_NAME, context: productLabel })", }, Object { - "key": "curiosity-inventory.tab", - "match": "t('curiosity-inventory.tab', { context: 'hosts' })", + "key": "curiosity-inventory.tabHosts", + "match": "t('curiosity-inventory.tabHosts', { context: ['noInstances', productId] })", }, Object { - "key": "curiosity-inventory.tab", - "match": "t('curiosity-inventory.tab', { context: 'subscriptions' })", + "key": "curiosity-inventory.tabSubscriptions", + "match": "t('curiosity-inventory.tabSubscriptions', { context: productId })", }, ], }, @@ -291,12 +291,12 @@ Array [ "match": "t('curiosity-graph.cardHeadingDescription', { context: productId })", }, Object { - "key": "curiosity-inventory.tab", - "match": "t('curiosity-inventory.tab', { context: 'hosts' })", + "key": "curiosity-inventory.tabHosts", + "match": "t('curiosity-inventory.tabHosts', { context: ['noInstances', productId] })", }, Object { - "key": "curiosity-inventory.tab", - "match": "t('curiosity-inventory.tab', { context: 'subscriptions' })", + "key": "curiosity-inventory.tabSubscriptions", + "match": "t('curiosity-inventory.tabSubscriptions', { context: productId })", }, Object { "key": "curiosity-view.title", @@ -589,22 +589,6 @@ Array [ "file": "./src/components/inventorySubscriptions/inventorySubscriptions.js", "key": "curiosity-inventory.tab", }, - Object { - "file": "./src/components/productView/productView.js", - "key": "curiosity-inventory.tab", - }, - Object { - "file": "./src/components/productView/productView.js", - "key": "curiosity-inventory.tab", - }, - Object { - "file": "./src/components/productView/productViewOpenShiftContainer.js", - "key": "curiosity-inventory.tab", - }, - Object { - "file": "./src/components/productView/productViewOpenShiftContainer.js", - "key": "curiosity-inventory.tab", - }, Object { "file": "./src/components/productView/productViewOpenShiftContainer.js", "key": "curiosity-inventory.label", diff --git a/src/components/productView/__tests__/__snapshots__/productView.test.js.snap b/src/components/productView/__tests__/__snapshots__/productView.test.js.snap index e7de136e9..4b13d9a5c 100644 --- a/src/components/productView/__tests__/__snapshots__/productView.test.js.snap +++ b/src/components/productView/__tests__/__snapshots__/productView.test.js.snap @@ -107,7 +107,7 @@ exports[`ProductView Component should allow custom product views: custom graphCa - + { { {!helpers.UI_DISABLED_TABLE_SUBSCRIPTIONS && initialSubscriptionsInventoryFilters && ( { * "hypervisor_sockets": 0, * "has_data": true, * "cloud_sockets": 80, - * "core_hours": 0 + * "core_hours": 0, + * "instance_hours": 3 * }, * { * "date": "2020-07-02T00:00:00Z", @@ -107,7 +108,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": true, * "cloud_sockets": 80, - * "core_hours": 10 + * "core_hours": 10, + * "instance_hours": 2 * }, * { * "date": "2020-07-03T00:00:00Z", @@ -116,7 +118,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": true, * "cloud_sockets": 80, - * "core_hours": 10 + * "core_hours": 10, + * "instance_hours": 12 * }, * { * "date": "2020-07-04T00:00:00Z", @@ -125,7 +128,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": true, * "cloud_sockets": 80, - * "core_hours": 10 + * "core_hours": 10, + * "instance_hours": 4 * }, * { * "date": "2020-07-05T00:00:00Z", @@ -134,7 +138,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 20, - * "core_hours": 10 + * "core_hours": 10, + * "instance_hours": 1 * }, * { * "date": "2020-07-06T00:00:00Z", @@ -143,7 +148,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": true, * "cloud_sockets": 20, - * "core_hours": 1000.057890 + * "core_hours": 1000.057890, + * "instance_hours": 2 * }, * { * "date": "2020-07-07T00:00:00Z", @@ -152,7 +158,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 20, - * "core_hours": 1000 + * "core_hours": 1000, + * "instance_hours": 2 * }, * { * "date": "2020-07-08T00:00:00Z", @@ -161,7 +168,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 20, - * "core_hours": 1000 + * "core_hours": 1000, + * "instance_hours": 3 * }, * { * "date": "2020-07-09T00:00:00Z", @@ -170,7 +178,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 20, - * "core_hours": 1000 + * "core_hours": 1000, + * "instance_hours": 3 * }, * { * "date": "2020-07-10T00:00:00Z", @@ -179,7 +188,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 20, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 3 * }, * { * "date": "2020-07-11T00:00:00Z", @@ -197,7 +207,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 20, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-13T00:00:00Z", @@ -206,7 +217,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 20, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-14T00:00:00Z", @@ -215,7 +227,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 20, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-15T00:00:00Z", @@ -224,7 +237,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 20, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-16T00:00:00Z", @@ -233,7 +247,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 20, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-17T00:00:00Z", @@ -242,7 +257,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 20, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-18T00:00:00Z", @@ -251,7 +267,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": true, * "cloud_sockets": 20, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-19T00:00:00Z", @@ -260,7 +277,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": true, * "cloud_sockets": 20, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-20T00:00:00Z", @@ -269,7 +287,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": true, * "cloud_sockets": 20, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-21T00:00:00Z", @@ -278,7 +297,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": true, * "cloud_sockets": 20, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-22T00:00:00Z", @@ -287,7 +307,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 0, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-23T00:00:00Z", @@ -296,7 +317,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 0, * "has_data": false, * "cloud_sockets": 0, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-24T00:00:00Z", @@ -305,7 +327,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 40, * "has_data": true, * "cloud_sockets": 0, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-25T00:00:00Z", @@ -314,7 +337,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 50, * "has_data": true, * "cloud_sockets": 0, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-26T00:00:00Z", @@ -323,7 +347,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 60, * "has_data": true, * "cloud_sockets": 0, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-27T00:00:00Z", @@ -332,7 +357,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 0, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-28T00:00:00Z", @@ -341,7 +367,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 0, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-29T00:00:00Z", @@ -350,7 +377,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-30T00:00:00Z", @@ -359,7 +387,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 40, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-31T00:00:00Z", @@ -370,7 +399,8 @@ const getApiVersion = (options = {}) => { * "cloud_sockets": 40, * "core_hours": null, * "has_cloudigrade_data": true, - * "has_cloudigrade_mismatch": true + * "has_cloudigrade_mismatch": true, + * "instance_hours": 0 * } * ], * "links": { @@ -381,7 +411,8 @@ const getApiVersion = (options = {}) => { * "count": 12, * "product": "RHEL", * "granularity": "daily", - * "total_core_hours": 30500.04 + * "total_core_hours": 30500.04, + * "total_instance_hours": 35 * } * } * @@ -396,7 +427,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": 10.20 + * "core_hours": 10.20, + * "instance_hours": 1 * }, * { * "date": "2020-05-26T00:00:00Z", @@ -405,7 +437,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": 10.15 + * "core_hours": 10.15, + * "instance_hours": 1 * }, * { * "date": "2020-06-02T00:00:00Z", @@ -414,7 +447,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": 10.11 + * "core_hours": 10.11, + * "instance_hours": 1 * }, * { * "date": "2020-06-09T00:00:00Z", @@ -423,7 +457,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": 2000.32 + * "core_hours": 2000.32, + * "instance_hours": 23 * }, * { * "date": "2020-06-16T00:00:00Z", @@ -432,7 +467,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": 2000.42 + * "core_hours": 2000.42, + * "instance_hours": 0 * }, * { * "date": "2020-06-23T00:00:00Z", @@ -441,7 +477,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": 999.06 + * "core_hours": 999.06, + * "instance_hours": 0 * }, * { * "date": "2020-06-30T00:00:00Z", @@ -450,7 +487,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-07T00:00:00Z", @@ -459,7 +497,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-14T00:00:00Z", @@ -468,7 +507,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-21T00:00:00Z", @@ -477,7 +517,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-07-28T00:00:00Z", @@ -486,7 +527,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * }, * { * "date": "2020-08-04T00:00:00Z", @@ -495,7 +537,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 30, * "has_data": true, * "cloud_sockets": 60, - * "core_hours": null + * "core_hours": null, + * "instance_hours": 0 * } * ], * "links": { @@ -506,7 +549,8 @@ const getApiVersion = (options = {}) => { * "count": 10, * "product": "RHEL", * "granularity": "weekly", - * "total_core_hours": 200.03 + * "total_core_hours": 200.03, + * "total_instance_hours": 26 * } * } * @@ -521,7 +565,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 50, * "has_data": true, * "cloud_sockets": 25, - * "core_hours": 200 + * "core_hours": 200, + * "instance_hours": 0 * }, * { * "date": "2019-09-01T00:00:00Z", @@ -530,7 +575,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 50, * "has_data": true, * "cloud_sockets": 25, - * "core_hours": 200 + * "core_hours": 200, + * "instance_hours": 0 * }, * { * "date": "2019-10-01T00:00:00Z", @@ -539,7 +585,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": 50, * "has_data": true, * "cloud_sockets": 25, - * "core_hours": 400 + * "core_hours": 400, + * "instance_hours": 0 * }, * { * "date": "2019-11-01T00:00:00Z", @@ -548,7 +595,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": null, * "has_data": false, * "cloud_sockets": 0, - * "core_hours": 0 + * "core_hours": 0, + * "instance_hours": 0 * }, * { * "date": "2019-12-01T00:00:00Z", @@ -557,7 +605,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": null, * "has_data": false, * "cloud_sockets": 0, - * "core_hours": 0 + * "core_hours": 0, + * "instance_hours": 0 * }, * { * "date": "2020-01-01T00:00:00Z", @@ -566,7 +615,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": null, * "has_data": false, * "cloud_sockets": 0, - * "core_hours": 0 + * "core_hours": 0, + * "instance_hours": 0 * }, * { * "date": "2020-02-01T00:00:00Z", @@ -575,7 +625,8 @@ const getApiVersion = (options = {}) => { * "hypervisor_sockets": null, * "has_data": false, * "cloud_sockets": 0, - * "core_hours": 0 + * "core_hours": 0, + * "instance_hours": 0 * }, * { * "date": "2020-03-01T00:00:00Z", diff --git a/src/types/__tests__/__snapshots__/index.test.js.snap b/src/types/__tests__/__snapshots__/index.test.js.snap index afbf15f00..ef6070265 100644 --- a/src/types/__tests__/__snapshots__/index.test.js.snap +++ b/src/types/__tests__/__snapshots__/index.test.js.snap @@ -222,6 +222,7 @@ Object { "RHSM_API_RESPONSE_META_TYPES": Object { "COUNT": "count", "TOTAL_CORE_HOURS": "total_core_hours", + "TOTAL_INSTANCE_HOURS": "total_instance_hours", }, "RHSM_API_RESPONSE_PRODUCTS_DATA": "data", "RHSM_API_RESPONSE_PRODUCTS_DATA_TYPES": Object { @@ -236,6 +237,7 @@ Object { "HAS_DATA": "has_data", "HYPERVISOR_CORES": "hypervisor_cores", "HYPERVISOR_SOCKETS": "hypervisor_sockets", + "INSTANCE_HOURS": "instance_hours", "PHYSICAL_CORES": "physical_cores", "PHYSICAL_SOCKETS": "physical_sockets", "SOCKETS": "sockets", @@ -462,6 +464,7 @@ Object { "RHSM_API_RESPONSE_META_TYPES": Object { "COUNT": "count", "TOTAL_CORE_HOURS": "total_core_hours", + "TOTAL_INSTANCE_HOURS": "total_instance_hours", }, "RHSM_API_RESPONSE_PRODUCTS_DATA": "data", "RHSM_API_RESPONSE_PRODUCTS_DATA_TYPES": Object { @@ -476,6 +479,7 @@ Object { "HAS_DATA": "has_data", "HYPERVISOR_CORES": "hypervisor_cores", "HYPERVISOR_SOCKETS": "hypervisor_sockets", + "INSTANCE_HOURS": "instance_hours", "PHYSICAL_CORES": "physical_cores", "PHYSICAL_SOCKETS": "physical_sockets", "SOCKETS": "sockets", @@ -701,6 +705,7 @@ Object { "RHSM_API_RESPONSE_META_TYPES": Object { "COUNT": "count", "TOTAL_CORE_HOURS": "total_core_hours", + "TOTAL_INSTANCE_HOURS": "total_instance_hours", }, "RHSM_API_RESPONSE_PRODUCTS_DATA": "data", "RHSM_API_RESPONSE_PRODUCTS_DATA_TYPES": Object { @@ -715,6 +720,7 @@ Object { "HAS_DATA": "has_data", "HYPERVISOR_CORES": "hypervisor_cores", "HYPERVISOR_SOCKETS": "hypervisor_sockets", + "INSTANCE_HOURS": "instance_hours", "PHYSICAL_CORES": "physical_cores", "PHYSICAL_SOCKETS": "physical_sockets", "SOCKETS": "sockets", @@ -944,6 +950,7 @@ Object { "RHSM_API_RESPONSE_META_TYPES": Object { "COUNT": "count", "TOTAL_CORE_HOURS": "total_core_hours", + "TOTAL_INSTANCE_HOURS": "total_instance_hours", }, "RHSM_API_RESPONSE_PRODUCTS_DATA": "data", "RHSM_API_RESPONSE_PRODUCTS_DATA_TYPES": Object { @@ -958,6 +965,7 @@ Object { "HAS_DATA": "has_data", "HYPERVISOR_CORES": "hypervisor_cores", "HYPERVISOR_SOCKETS": "hypervisor_sockets", + "INSTANCE_HOURS": "instance_hours", "PHYSICAL_CORES": "physical_cores", "PHYSICAL_SOCKETS": "physical_sockets", "SOCKETS": "sockets", diff --git a/src/types/rhsmApiTypes.js b/src/types/rhsmApiTypes.js index 62c3c26cb..ffec59672 100644 --- a/src/types/rhsmApiTypes.js +++ b/src/types/rhsmApiTypes.js @@ -57,11 +57,12 @@ const RHSM_API_RESPONSE_META = 'meta'; * RHSM response META types. * Schema/map of expected META response properties. * - * @type {{COUNT: string, TOTAL_CORE_HOURS: string}} + * @type {{COUNT: string, TOTAL_INSTANCE_HOURS: string, TOTAL_CORE_HOURS: string}} */ const RHSM_API_RESPONSE_META_TYPES = { COUNT: 'count', - TOTAL_CORE_HOURS: 'total_core_hours' + TOTAL_CORE_HOURS: 'total_core_hours', + TOTAL_INSTANCE_HOURS: 'total_instance_hours' }; /** @@ -167,9 +168,10 @@ const RHSM_API_RESPONSE_PRODUCTS_DATA = 'data'; * RHSM response Reporting/Tally DATA types. * Schema/map of expected Reporting/Tally DATA response properties. * - * @type {{HYPERVISOR_SOCKETS: string, CORES: string, SOCKETS: string, CLOUD_CORES: string, HAS_DATA: string, - * PHYSICAL_SOCKETS: string, PHYSICAL_CORES: string, CLOUD_INSTANCES: string, DATE: string, CORE_HOURS: string, - * CLOUD_SOCKETS: string, HAS_CLOUDIGRADE_DATA: string, HAS_CLOUDIGRADE_MISMATCH: string, HYPERVISOR_CORES: string}} + * @type {{HYPERVISOR_SOCKETS: string, CORES: string, INSTANCE_HOURS: string, SOCKETS: string, CLOUD_CORES: string, + * HAS_DATA: string, PHYSICAL_SOCKETS: string, PHYSICAL_CORES: string, CLOUD_INSTANCES: string, DATE: string, + * CORE_HOURS: string, CLOUD_SOCKETS: string, HAS_CLOUDIGRADE_DATA: string, HAS_CLOUDIGRADE_MISMATCH: string, + * HYPERVISOR_CORES: string}} */ const RHSM_API_RESPONSE_PRODUCTS_DATA_TYPES = { CLOUD_CORES: 'cloud_cores', @@ -180,6 +182,7 @@ const RHSM_API_RESPONSE_PRODUCTS_DATA_TYPES = { DATE: 'date', HYPERVISOR_CORES: 'hypervisor_cores', HYPERVISOR_SOCKETS: 'hypervisor_sockets', + INSTANCE_HOURS: 'instance_hours', PHYSICAL_CORES: 'physical_cores', PHYSICAL_SOCKETS: 'physical_sockets', SOCKETS: 'sockets', @@ -387,41 +390,46 @@ const RHSM_API_QUERY_TYPES = { /** * RHSM API types. * - * @type {{RHSM_API_QUERY_SET_INVENTORY_SUBSCRIPTIONS_TYPES: {UOM: string, USAGE: string, DIRECTION: string, - * SORT: string, OFFSET: string, SLA: string, LIMIT: string}, - * RHSM_API_RESPONSE_INVENTORY_SUBSCRIPTIONS_DATA_TYPES: {UOM: string, PHYSICAL_CAPACITY: string, USAGE: string, - * UPCOMING_EVENT_TYPE: string, UPCOMING_EVENT_DATE: string, SUBSCRIPTION_NUMBERS: string, - * VIRTUAL_CAPACITY: string, TOTAL_CAPACITY: string, SKU: string, SERVICE_LEVEL: string}, - * RHSM_API_RESPONSE_ERROR_DATA_CODE_TYPES: {GENERIC: string, OPTIN: string}, RHSM_API_RESPONSE_INVENTORY_DATA: string, - * RHSM_API_RESPONSE_CAPACITY_DATA: string, RHSM_API_RESPONSE_ERROR_DATA_TYPES: {CODE: string, DETAIL: string}, + * @type {{RHSM_API_QUERY_SET_INVENTORY_SUBSCRIPTIONS_TYPES: {UOM: string, USAGE: string, DIRECTION: string, SORT: string, + * OFFSET: string, SLA: string, LIMIT: string}, RHSM_API_RESPONSE_INVENTORY_SUBSCRIPTIONS_DATA_TYPES: {UOM: string, + * PHYSICAL_CAPACITY: string, USAGE: string, UPCOMING_EVENT_TYPE: string, UPCOMING_EVENT_DATE: string, + * SUBSCRIPTION_NUMBERS: string, VIRTUAL_CAPACITY: string, TOTAL_CAPACITY: string, SKU: string, + * SERVICE_LEVEL: string}, RHSM_API_RESPONSE_ERROR_DATA_CODE_TYPES: {GENERIC: string, OPTIN: string}, + * RHSM_API_RESPONSE_INVENTORY_DATA: string, RHSM_API_RESPONSE_CAPACITY_DATA: string, + * RHSM_API_RESPONSE_ERROR_DATA_TYPES: {CODE: string, DETAIL: string}, * RHSM_API_RESPONSE_CAPACITY_DATA_TYPES: {HYPERVISOR_SOCKETS: string, CORES: string, DATE: string, SOCKETS: string, * PHYSICAL_SOCKETS: string, HYPERVISOR_CORES: string, HAS_INFINITE: string, PHYSICAL_CORES: string}, - * RHSM_API_QUERY_SUBSCRIPTIONS_SORT_TYPES: {UOM: string, PHYSICAL_CAPACITY: string, USAGE: string, UPCOMING_EVENT_DATE: string, - * VIRTUAL_CAPACITY: string, TOTAL_CAPACITY: string, SKU: string, PRODUCT_NAME: string, SERVICE_LEVEL: string}, - * RHSM_API_RESPONSE_META_TYPES: {COUNT: string, TOTAL_CORE_HOURS: string}, RHSM_API_QUERY_GRANULARITY_TYPES: {WEEKLY: string, - * QUARTERLY: string, DAILY: string, MONTHLY: string}, RHSM_API_QUERY_SORT_DIRECTION_TYPES: {ASCENDING: string, DESCENDING: string}, - * RHSM_API_RESPONSE_PRODUCTS_DATA: string, RHSM_API_QUERY_TYPES: {GRANULARITY: string, TALLY_SYNC: string, DIRECTION: string, - * END_DATE: string, SLA: string, START_DATE: string, LIMIT: string, UOM: string, TALLY_REPORT: string, USAGE: string, - * SORT: string, OFFSET: string, CONDUIT_SYNC: string}, RHSM_API_RESPONSE_LINKS: string, - * RHSM_API_QUERY_SET_INVENTORY_GUESTS_TYPES: {OFFSET: string, LIMIT: string}, RHSM_API_PATH_ID_TYPES: {RHEL_ARM: string, - * OPENSHIFT_METRICS: string, SATELLITE: string, RHEL_WORKSTATION: 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, RHEL_IBM_POWER: string}, + * RHSM_API_QUERY_SUBSCRIPTIONS_SORT_TYPES: {UOM: string, PHYSICAL_CAPACITY: string, USAGE: string, + * UPCOMING_EVENT_DATE: string, VIRTUAL_CAPACITY: string, TOTAL_CAPACITY: string, SKU: string, PRODUCT_NAME: string, + * SERVICE_LEVEL: string}, RHSM_API_RESPONSE_META_TYPES: {COUNT: string, TOTAL_INSTANCE_HOURS: string, + * TOTAL_CORE_HOURS: string}, RHSM_API_QUERY_GRANULARITY_TYPES: {WEEKLY: string, QUARTERLY: string, + * DAILY: string, MONTHLY: string}, RHSM_API_QUERY_SORT_DIRECTION_TYPES: {ASCENDING: string, DESCENDING: string}, + * RHSM_API_RESPONSE_PRODUCTS_DATA: string, RHSM_API_QUERY_TYPES: {GRANULARITY: string, TALLY_SYNC: string, + * DIRECTION: string, END_DATE: string, SLA: string, START_DATE: string, LIMIT: string, UOM: string, + * TALLY_REPORT: string, USAGE: string, SORT: string, OFFSET: string, CONDUIT_SYNC: string}, + * RHSM_API_RESPONSE_LINKS: string, RHSM_API_QUERY_SET_INVENTORY_GUESTS_TYPES: {OFFSET: string, LIMIT: string}, + * RHSM_API_PATH_ID_TYPES: {RHEL_ARM: string, OPENSHIFT_METRICS: string, SATELLITE: string, RHEL_WORKSTATION: 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, RHEL_IBM_POWER: string}, * RHSM_API_QUERY_SET_OPTIN_TYPES: {TALLY_SYNC: string, TALLY_REPORT: string, CONDUIT_SYNC: 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, USAGE: string, DIRECTION: string, SORT: string, OFFSET: string, SLA: string, - * LIMIT: string}, RHSM_API_QUERY_SORT_TYPES: {CORES: string, CORE_HOURS: string, HARDWARE: string, SOCKETS: string, - * MEASUREMENT: string, LAST_SEEN: string, NAME: string}, RHSM_API_RESPONSE_PRODUCTS_DATA_TYPES: {HYPERVISOR_SOCKETS: string, - * CORES: string, SOCKETS: string, CLOUD_CORES: string, HAS_DATA: string, PHYSICAL_SOCKETS: string, PHYSICAL_CORES: string, + * RHSM_API_QUERY_SET_INVENTORY_TYPES: {UOM: string, USAGE: string, DIRECTION: string, SORT: string, OFFSET: string, + * SLA: string, LIMIT: string}, RHSM_API_QUERY_SORT_TYPES: {CORES: string, CORE_HOURS: string, HARDWARE: string, + * SOCKETS: string, MEASUREMENT: string, LAST_SEEN: string, NAME: string}, + * RHSM_API_RESPONSE_PRODUCTS_DATA_TYPES: {HYPERVISOR_SOCKETS: string, CORES: string, INSTANCE_HOURS: string, + * SOCKETS: string, CLOUD_CORES: string, HAS_DATA: string, PHYSICAL_SOCKETS: string, PHYSICAL_CORES: string, * CLOUD_INSTANCES: string, DATE: string, CORE_HOURS: string, CLOUD_SOCKETS: string, HAS_CLOUDIGRADE_DATA: string, - * HAS_CLOUDIGRADE_MISMATCH: string, HYPERVISOR_CORES: string}, RHSM_API_QUERY_UOM_TYPES: {CORES: string, SOCKETS: string}, - * RHSM_API_RESPONSE_LINKS_TYPES: string, RHSM_API_RESPONSE_INVENTORY_GUESTS_DATA_TYPES: {SUBSCRIPTION_ID: string, ID: string, - * NAME: string, LAST_SEEN: string}, RHSM_API_RESPONSE_ERROR_DATA: string, RHSM_API_RESPONSE_META: string, + * HAS_CLOUDIGRADE_MISMATCH: string, HYPERVISOR_CORES: string}, RHSM_API_QUERY_UOM_TYPES: {CORES: string, + * SOCKETS: string}, RHSM_API_RESPONSE_LINKS_TYPES: string, + * RHSM_API_RESPONSE_INVENTORY_GUESTS_DATA_TYPES: {SUBSCRIPTION_ID: string, ID: string, NAME: string, + * LAST_SEEN: string}, RHSM_API_RESPONSE_ERROR_DATA: string, RHSM_API_RESPONSE_META: string, * RHSM_API_RESPONSE_INVENTORY_DATA_TYPES: {CORES: string, CORE_HOURS: string, HARDWARE: string, SOCKETS: string, - * SUBSCRIPTION_ID: string, INVENTORY_ID: string, MEASUREMENT: string, ID: string, GUESTS: string, CLOUD_PROVIDER: string, - * LAST_SEEN: string, NAME: string}, RHSM_API_QUERY_SET_REPORT_CAPACITY_TYPES: {GRANULARITY: string, USAGE: string, - * END_DATE: string, SLA: string, START_DATE: string}}} + * SUBSCRIPTION_ID: string, INVENTORY_ID: string, MEASUREMENT: string, ID: string, GUESTS: string, + * CLOUD_PROVIDER: string, LAST_SEEN: string, NAME: string}, + * RHSM_API_QUERY_SET_REPORT_CAPACITY_TYPES: {GRANULARITY: string, USAGE: string, END_DATE: string, SLA: string, + * START_DATE: string}}} */ const rhsmApiTypes = { RHSM_API_RESPONSE_ERROR_DATA,