Skip to content

Commit

Permalink
feat(config): sw-1889 add rhel for x86 els payg (#1224)
Browse files Browse the repository at this point in the history
* config, use vcpu metric, base off rhosak
* locale, adjust rhel desc, subtitle for on-demand
* services, generic mock response, allow vcpus
  • Loading branch information
cdcabrera committed Nov 1, 2023
1 parent bb01d1a commit 74ae8d1
Show file tree
Hide file tree
Showing 11 changed files with 1,517 additions and 51 deletions.
1 change: 1 addition & 0 deletions config/cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"optin",
"ouia",
"patternfly",
"payg",
"pendo",
"perpage",
"qe's",
Expand Down
8 changes: 6 additions & 2 deletions public/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@
"label_groupVariant_RHEL for IBM Power": "RHEL for IBM Power",
"label_groupVariant_RHEL for IBM z": "RHEL for IBM z",
"label_groupVariant_RHEL for x86": "RHEL for x86",
"label_groupVariant_rhel-for-x86-els-payg": "RHEL for x86 ELS On-Demand",
"label_groupVariant_rhel-for-x86-eus": "RHEL for x86 EUS",
"label_groupVariant_rhel-for-x86-ha": "RHEL for x86 HA",
"label_groupVariant_rhel-for-sap-x86": "RHEL for SAP x86",
Expand Down Expand Up @@ -416,8 +417,8 @@
"subtitle_rhel": "$t(curiosity-view.subtitle_RHEL)",
"description_rhel": "$t(curiosity-view.description_RHEL)",
"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</0>",
"description_RHEL": "Monitor your Red Hat Enterprise Linux usage by physical, virtual, and public cloud sockets.",
"subtitle_RHEL": "Monitor your Red Hat Enterprise Linux usage for both Annual and On-Demand subscriptions. <0>Learn more about {{appName}} reporting</0>",
"description_RHEL": "Monitor your Red Hat Enterprise Linux usage for both Annual and On-Demand subscriptions.",
"title_RHEL for ARM": "$t(curiosity-view.title_RHEL)",
"subtitle_RHEL for ARM": "$t(curiosity-view.subtitle_RHEL)",
"description_RHEL for ARM": "$t(curiosity-view.description_RHEL)",
Expand All @@ -430,6 +431,9 @@
"title_RHEL for x86": "$t(curiosity-view.title_RHEL)",
"subtitle_RHEL for x86": "$t(curiosity-view.subtitle_RHEL)",
"description_RHEL for x86": "$t(curiosity-view.description_RHEL)",
"title_rhel-for-x86-els-payg": "Red Hat Enterprise Linux for x86 ELS On-Demand",
"subtitle_rhel-for-x86-els-payg": "$t(curiosity-view.subtitle_rhacs)",
"description_rhel-for-x86-els-payg": "$t(curiosity-view.description_rhacs)",
"title_rhel-for-x86-eus": "$t(curiosity-view.title_RHEL)",
"subtitle_rhel-for-x86-eus": "$t(curiosity-view.subtitle_RHEL)",
"description_rhel-for-x86-eus": "$t(curiosity-view.description_RHEL)",
Expand Down
105 changes: 105 additions & 0 deletions src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,79 @@ exports[`I18n Component should generate a predictable locale key output snapshot
},
],
},
{
"file": "src/config/product.rhelElsPayg.js",
"keys": [
{
"key": "curiosity-graph.label_axisY",
"match": "translate('curiosity-graph.label_axisY', { context: id })",
},
{
"key": "curiosity-graph.cardHeadingMetric",
"match": "translate('curiosity-graph.cardHeadingMetric', { context: ['dailyTotal', dataSets?.[0]?.display?.chartId], testId: 'graphDailyTotalCard-header' })",
},
{
"key": "curiosity-graph.cardBodyMetric",
"match": "translate( 'curiosity-graph.cardBodyMetric', { context: ['total', dataSets?.[0]?.display?.dailyHasData && dataSets?.[0]?.display?.chartId], testId: 'graphDailyTotalCard-body', total: helpers .numberDisplay(dataSets?.[0]?.display?.dailyValue)",
},
{
"key": "curiosity-graph.cardFooterMetric",
"match": "translate('curiosity-graph.cardFooterMetric', { date: moment .utc(dataSets?.[0]?.display?.dailyDate)",
},
{
"key": "curiosity-graph.cardHeadingMetric",
"match": "translate('curiosity-graph.cardHeadingMetric', { context: ['monthlyTotal', dataSets?.[0]?.display?.chartId], testId: 'graphMonthlyTotalCard-header' })",
},
{
"key": "curiosity-graph.cardBodyMetric",
"match": "translate( 'curiosity-graph.cardBodyMetric', { context: ['total', dataSets?.[0]?.display?.monthlyHasData && dataSets?.[0]?.display?.chartId], testId: 'graphMonthlyTotalCard-body', total: helpers .numberDisplay(dataSets?.[0]?.display?.monthlyValue)",
},
{
"key": "curiosity-graph.cardFooterMetric",
"match": "translate('curiosity-graph.cardFooterMetric', { date: moment .utc(dataSets?.[0]?.display?.monthlyDate)",
},
{
"key": "curiosity-graph.label_axisX",
"match": "translate('curiosity-graph.label_axisX', { context: GRANULARITY_TYPES.DAILY })",
},
{
"key": "curiosity-inventory.label",
"match": "translate('curiosity-inventory.label', { context: 'numberOfGuests', count: numberOfGuests }, [ <PfLabel color="blue" /> ])",
},
{
"key": "curiosity-inventory.label",
"match": "translate('curiosity-inventory.label', { context: [INVENTORY_TYPES.BILLING_PROVIDER, provider || 'none'] })",
},
{
"key": "curiosity-inventory.header",
"match": "translate('curiosity-inventory.header', { context: ['tooltip', RHSM_API_PATH_METRIC_TYPES.TRANSFER_GIBIBYTES] })",
},
{
"key": "curiosity-inventory.measurement",
"match": "translate('curiosity-inventory.measurement', { context: RHSM_API_PATH_METRIC_TYPES.TRANSFER_GIBIBYTES, total: helpers.numberDisplay(total)",
},
{
"key": "curiosity-inventory.header",
"match": "translate('curiosity-inventory.header', { context: ['tooltip', RHSM_API_PATH_METRIC_TYPES.STORAGE_GIBIBYTE_MONTHS] })",
},
{
"key": "curiosity-inventory.measurement",
"match": "translate('curiosity-inventory.measurement', { context: RHSM_API_PATH_METRIC_TYPES.STORAGE_GIBIBYTE_MONTHS, total: helpers.numberDisplay(total)",
},
{
"key": "curiosity-inventory.measurement",
"match": "translate('curiosity-inventory.measurement', { context: RHSM_API_PATH_METRIC_TYPES.INSTANCE_HOURS, total: helpers.numberDisplay(total)",
},
{
"key": "curiosity-inventory.label",
"match": "translate(\`curiosity-inventory.label\`, { context: [SUBSCRIPTIONS_INVENTORY_TYPES.BILLING_PROVIDER, provider || 'none'] })",
},
{
"key": "",
"match": "translate(\`curiosity-inventory.label_\${SUBSCRIPTIONS_INVENTORY_META_TYPES.SUBSCRIPTION_TYPE}\`, { context: subscriptionType || EMPTY_CONTEXT })",
},
],
},
{
"file": "src/config/product.rhods.js",
"keys": [
Expand Down Expand Up @@ -974,6 +1047,38 @@ 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.rhelElsPayg.js",
"key": "curiosity-graph.label_axisY",
},
{
"file": "src/config/product.rhelElsPayg.js",
"key": "curiosity-graph.label_axisX",
},
{
"file": "src/config/product.rhelElsPayg.js",
"key": "curiosity-inventory.label",
},
{
"file": "src/config/product.rhelElsPayg.js",
"key": "curiosity-inventory.label",
},
{
"file": "src/config/product.rhelElsPayg.js",
"key": "curiosity-inventory.measurement",
},
{
"file": "src/config/product.rhelElsPayg.js",
"key": "curiosity-inventory.measurement",
},
{
"file": "src/config/product.rhelElsPayg.js",
"key": "curiosity-inventory.measurement",
},
{
"file": "src/config/product.rhelElsPayg.js",
"key": "curiosity-inventory.label",
},
{
"file": "src/config/product.rhods.js",
"key": "curiosity-graph.label_axisY",
Expand Down
39 changes: 39 additions & 0 deletions src/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<dt><a href="#Products.module_RHEL">RHEL</a></dt>
<dd><p>RHEL</p>
</dd>
<dt><a href="#Products.module_RHEL-X86-ELS">RHEL-X86-ELS</a></dt>
<dd><p>RHEL X86 ELS</p>
</dd>
<dt><a href="#Products.module_RHODS">RHODS</a></dt>
<dd><p>RHODS</p>
</dd>
Expand Down Expand Up @@ -213,6 +216,42 @@ Product label. An identifier used for display strings.
RHEL product config

**Kind**: inner constant of [<code>RHEL</code>](#Products.module_RHEL)
<a name="Products.module_RHEL-X86-ELS"></a>

## RHEL-X86-ELS
RHEL X86 ELS


* [RHEL-X86-ELS](#Products.module_RHEL-X86-ELS)
* [~productGroup](#Products.module_RHEL-X86-ELS..productGroup) : <code>string</code>
* [~productId](#Products.module_RHEL-X86-ELS..productId) : <code>string</code>
* [~productLabel](#Products.module_RHEL-X86-ELS..productLabel) : <code>string</code>
* [~config](#Products.module_RHEL-X86-ELS..config) : <code>Object</code>

<a name="Products.module_RHEL-X86-ELS..productGroup"></a>

### RHEL-X86-ELS~productGroup : <code>string</code>
Product group. A variant and dissimilar product configuration grouping identifier.

**Kind**: inner constant of [<code>RHEL-X86-ELS</code>](#Products.module_RHEL-X86-ELS)
<a name="Products.module_RHEL-X86-ELS..productId"></a>

### RHEL-X86-ELS~productId : <code>string</code>
Product ID. The identifier used when querying the API.

**Kind**: inner constant of [<code>RHEL-X86-ELS</code>](#Products.module_RHEL-X86-ELS)
<a name="Products.module_RHEL-X86-ELS..productLabel"></a>

### RHEL-X86-ELS~productLabel : <code>string</code>
Product label. An identifier used for display strings.

**Kind**: inner constant of [<code>RHEL-X86-ELS</code>](#Products.module_RHEL-X86-ELS)
<a name="Products.module_RHEL-X86-ELS..config"></a>

### RHEL-X86-ELS~config : <code>Object</code>
Product configuration

**Kind**: inner constant of [<code>RHEL-X86-ELS</code>](#Products.module_RHEL-X86-ELS)
<a name="Products.module_RHODS"></a>

## RHODS
Expand Down
Loading

0 comments on commit 74ae8d1

Please sign in to comment.