Skip to content

Commit

Permalink
feat(productView): issues/524 display satellite (#538)
Browse files Browse the repository at this point in the history
* locale, satellite strings
* productView, basic product display
* productViewSatellite, apply satellite to basic display
* routerTypes, satellite routing
* rhsmApiTypes, satellite products
  • Loading branch information
cdcabrera committed Feb 16, 2021
1 parent cc993b3 commit 266d3e0
Show file tree
Hide file tree
Showing 16 changed files with 1,363 additions and 42 deletions.
3 changes: 2 additions & 1 deletion public/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
"title_OpenShift": "Red Hat OpenShift",
"subtitle_OpenShift": "Monitor your Red Hat OpenShift usage by socket or core usage, based on your subscription terms. <0>Learn more about {{appName}} reporting</0>",
"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>"
"subtitle_RHEL": "Monitor your Red Hat Enterprise Linux usage by physical, virtual, and public cloud sockets. <0>Learn more about {{appName}} reporting</0>",
"title_Satellite 6": "Red Hat Satellite 6"
}
}
54 changes: 54 additions & 0 deletions src/components/i18n/__tests__/__snapshots__/i18n.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,48 @@ Array [
},
],
},
Object {
"file": "./src/components/productView/productView.js",
"keys": Array [
Object {
"key": "curiosity-view.title",
"match": "t(\`curiosity-view.title\`, { appName: helpers.UI_DISPLAY_NAME, context: productId })",
},
Object {
"key": "curiosity-graph.socketsHeading",
"match": "t('curiosity-graph.socketsHeading')",
},
Object {
"key": "curiosity-inventory.tab",
"match": "t('curiosity-inventory.tab', { context: 'hosts' })",
},
Object {
"key": "curiosity-inventory.tab",
"match": "t('curiosity-inventory.tab', { context: 'subscriptions' })",
},
],
},
Object {
"file": "./src/components/productView/productViewSatellite.js",
"keys": Array [
Object {
"key": "curiosity-inventory.header",
"match": "translate('curiosity-inventory.header', { context: 'guestsDisplayName' })",
},
Object {
"key": "curiosity-inventory.label",
"match": "translate('curiosity-inventory.label', { context: 'numberOfGuests', count: numberOfGuests.value }, [ <PfLabel color=\\"blue\\" /> ])",
},
Object {
"key": "curiosity-inventory.measurementType",
"match": "translate('curiosity-inventory.measurementType', { context: measurementType.value })",
},
Object {
"key": "curiosity-inventory.cloudProvider",
"match": "translate('curiosity-inventory.cloudProvider', { context: cloudProvider.value })",
},
],
},
Object {
"file": "./src/components/rhelView/rhelView.js",
"keys": Array [
Expand Down Expand Up @@ -547,6 +589,18 @@ Array [
"file": "./src/components/openshiftView/openshiftView.js",
"key": "curiosity-inventory.label",
},
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/productViewSatellite.js",
"key": "curiosity-inventory.label",
},
Object {
"file": "./src/components/rhelView/rhelView.js",
"key": "curiosity-inventory.tab",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ProductView Component should render a non-connected component: non-connected 1`] = `
<PageLayout>
<PageHeader
includeTour={true}
productLabel="lorem ipsum"
t={[Function]}
>
t(curiosity-view.title, {"appName":"Subscription Watch","context":"lorem ipsum"})
</PageHeader>
<PageMessages
className=""
>
<Connect(BannerMessages)
productId="lorem ipsum"
viewId="dolor sit"
/>
</PageMessages>
<PageToolbar
className=""
>
<Connect(Toolbar)
productId="lorem ipsum"
query={Object {}}
viewId="dolor sit"
/>
</PageToolbar>
<PageSection
className=""
>
<Connect(GraphCard)
cardTitle="t(curiosity-graph.socketsHeading)"
key="lorem ipsum"
productId="lorem ipsum"
productLabel="lorem ipsum"
query={Object {}}
viewId="dolor sit"
/>
</PageSection>
<PageSection
className=""
>
<Connect(InventoryTabs)
productId="lorem ipsum"
>
<InventoryTab
active={false}
key="hostsTab"
title="t(curiosity-inventory.tab, {\\"context\\":\\"hosts\\"})"
>
<Connect(InventoryList)
key="lorem ipsum"
productId="lorem ipsum"
query={Object {}}
viewId="dolor sit"
/>
</InventoryTab>
<InventoryTab
active={false}
key="subscriptionsTab"
title="t(curiosity-inventory.tab, {\\"context\\":\\"subscriptions\\"})"
>
<Connect(InventorySubscriptions)
key="lorem ipsum"
productId="lorem ipsum"
query={Object {}}
viewId="dolor sit"
/>
</InventoryTab>
</Connect(InventoryTabs)>
</PageSection>
</PageLayout>
`;

exports[`ProductView Component should render nothing if path and product parameters are empty: empty 1`] = `""`;
Loading

0 comments on commit 266d3e0

Please sign in to comment.