Skip to content

Commit

Permalink
feat(rhods): sw-270 activate product display (#980)
Browse files Browse the repository at this point in the history
* locale, rhacs strings
* config, rhacs config, routing
* rhsmConstants, product id
  • Loading branch information
cdcabrera committed Oct 14, 2022
1 parent 2ee64c5 commit 2ca0496
Show file tree
Hide file tree
Showing 15 changed files with 1,081 additions and 22 deletions.
1 change: 1 addition & 0 deletions config/cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"reselect's",
"rhel",
"rhacs",
"rhods",
"rhosak",
"rhsm",
"samesite",
Expand Down
3 changes: 3 additions & 0 deletions public/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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</0>",
"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</0>",
"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</0>",
"description_RHEL": "Monitor your Red Hat Enterprise Linux usage by physical, virtual, and public cloud sockets.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
41 changes: 41 additions & 0 deletions src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,42 @@ exports[`ProductViewMissing Component should render a non-connected component: n
</Button>
</CardFooter>
</Card>
<Card
isHoverable={true}
key="missingViewCard-rhods"
onClick={[Function]}
>
<CardTitle>
<Title
headingLevel="h2"
size="lg"
>
t(curiosity-view.title, {"appName":"Subscriptions","context":"rhods"})
</Title>
</CardTitle>
<CardBody
className="curiosity-missing-view__card-description"
>
t(curiosity-view.description, {"appName":"Subscriptions","context":"rhods"})
</CardBody>
<CardFooter>
<Button
icon={
<ArrowRightIcon
color="currentColor"
noVerticalAlign={false}
size="sm"
/>
}
iconPosition="right"
isInline={true}
onClick={[Function]}
variant="link"
>
Open
</Button>
</CardFooter>
</Card>
<Card
isHoverable={true}
key="missingViewCard-rhosak"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,15 @@ exports[`Redirect Component should render a basic component: basic 1`] = `
"path": "/rhacs",
"redirect": null,
},
{
"activateOnError": false,
"component": "productView/productView",
"disabled": false,
"exact": true,
"id": "rhods",
"path": "/rhods",
"redirect": null,
},
{
"activateOnError": false,
"component": "productView/productView",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ exports[`Router Component should render a basic component: basic 1`] = `
"path": "/rhacs",
"redirect": null,
},
{
"activateOnError": false,
"component": "productView/productView",
"disabled": false,
"exact": true,
"id": "rhods",
"path": "/rhods",
"redirect": null,
},
{
"activateOnError": false,
"component": "productView/productView",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ exports[`RouterHelpers should return specific properties: routerHelpers 1`] = `
"viewrhacs": [
"rhacs",
],
"viewrhods": [
"rhods",
],
"viewrhosak": [
"rhosak",
],
Expand Down Expand Up @@ -274,6 +277,15 @@ exports[`RouterHelpers should return specific properties: routerHelpers 1`] = `
"path": "/rhacs",
"redirect": null,
},
{
"activateOnError": false,
"component": "productView/productView",
"disabled": false,
"exact": true,
"id": "rhods",
"path": "/rhods",
"redirect": null,
},
{
"activateOnError": false,
"component": "productView/productView",
Expand Down
Loading

0 comments on commit 2ca0496

Please sign in to comment.