Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment Sync, Dev to Test #841

Merged
merged 28 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
086f5d2
chore(deps): bump actions/setup-node from 2.4.0 to 2.4.1 (#808)
dependabot[bot] Oct 4, 2021
e669acf
chore(deps): bump actions/github-script from 4.0.2 to 5 (#807)
dependabot[bot] Oct 5, 2021
85c69df
refactor(router): ent-4208 activate routeDetail context (#813)
cdcabrera Oct 11, 2021
c855bf1
refactor(productView): ent-4208 activate product, query context (#814)
cdcabrera Oct 15, 2021
b97ca2b
fix(useRhsmSelectors): import cleanup (#817)
cdcabrera Oct 19, 2021
d4b9523
refactor(graphCard): ent-4208 activate product hooks (#817)
cdcabrera Oct 18, 2021
705db1b
fix(routing): Use dynamic router basename (#821)
Hyperkid123 Oct 27, 2021
a45dc66
feat(toolbarFieldSla,Usage): ent-4208 standalone sla, usage (#820)
cdcabrera Oct 22, 2021
7ab781b
refactor(toolbar): ent-4208 activate product hooks (#820)
cdcabrera Oct 22, 2021
330223e
feat(rhsmServices,redux): ent-4366 tally refactor for metric id (#822)
cdcabrera Nov 8, 2021
7c08d29
fix(toolbarFields): ent-4208 left, right select positioning (#824)
cdcabrera Nov 4, 2021
1afe242
feat(productView,graphCard): ent-4366 rhosak multi-graph display (#824)
cdcabrera Nov 4, 2021
1e349e0
refactor(inventorySubscriptions): ent-4366 disable subscriptions (#825)
cdcabrera Nov 9, 2021
222bb4a
fix(graphCardMetricTotals): ent-4366 daily monthly displays (#827)
cdcabrera Nov 10, 2021
99c2581
fix(graphCardHelpers): ent-4510 allow product custom axes (#829)
cdcabrera Nov 10, 2021
81173fc
fix(routes): ent-4366 rhosak product path id (#826)
cdcabrera Nov 11, 2021
52d1648
fix(helpers): ent-4366 optional chaining for numbro (#832)
cdcabrera Nov 12, 2021
f58b073
feat(rhsmServices,redux): ent-4367 instances inventory (#830)
cdcabrera Nov 16, 2021
ff5b58e
feat(productView,inventoryList): ent-4367 rhosak inventory (#831)
cdcabrera Nov 17, 2021
499d06b
fix(productViewOpenShiftContainer): ent-4367 hosts inventory (#833)
cdcabrera Nov 17, 2021
bf004d2
fix(locales): ent-4367 string updates for rhosak (#835)
cdcabrera Nov 17, 2021
7aae4f0
fix(graphCardMetricTotals): ent-4366 data-test attributes (#836)
cdcabrera Nov 17, 2021
f65b0d2
fix(rhsmSchemas): ent-4366 graph total display mismatch (#837)
cdcabrera Nov 18, 2021
7980289
fix(chartHelpers): ent-4366 adjust yaxis domain for small values (#839)
cdcabrera Nov 19, 2021
6565813
fix(config): ent-4367 rhosak config checks (#840)
cdcabrera Nov 19, 2021
7e0b5c1
fix(graphCardMetricTotals): ent-4366 daily, monthly header copy (#840)
cdcabrera Nov 19, 2021
ad11879
fix(graphCardMetricTotals): ent-4366 total timestamp formats (#840)
cdcabrera Nov 19, 2021
6392c32
fix(graphCardMetricTotals): ent-4366 expand data-test (#838)
cdcabrera Nov 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ REACT_APP_UI_DISABLED_TOOLBAR=false
REACT_APP_UI_DISABLED_GRAPH=false
REACT_APP_UI_DISABLED_TABLE=false
REACT_APP_UI_DISABLED_TABLE_HOSTS=false
REACT_APP_UI_DISABLED_TABLE_INSTANCES=false
REACT_APP_UI_DISABLED_TABLE_SUBSCRIPTIONS=false
REACT_APP_UI_LOGGER_ID=curiosity
REACT_APP_UI_LOGGER_FILE=curiosity_debug_log_{0}.json
Expand All @@ -33,8 +34,10 @@ REACT_APP_CONFIG_SERVICE_LOCALES_EXPIRE=604800000

REACT_APP_SERVICES_RHSM_VERSION=/api/rhsm-subscriptions/v1/version
REACT_APP_SERVICES_RHSM_REPORT=/api/rhsm-subscriptions/v1/tally/products/
REACT_APP_SERVICES_RHSM_TALLY=/api/rhsm-subscriptions/v1/tally/products/{0}/{1}
REACT_APP_SERVICES_RHSM_CAPACITY=/api/rhsm-subscriptions/v1/capacity/products/
REACT_APP_SERVICES_RHSM_INVENTORY=/api/rhsm-subscriptions/v1/hosts/products/
REACT_APP_SERVICES_RHSM_INVENTORY_GUESTS=/api/rhsm-subscriptions/v1/hosts/{0}/guests
REACT_APP_SERVICES_RHSM_INVENTORY_INSTANCES=/api/rhsm-subscriptions/v1/instances/products/
REACT_APP_SERVICES_RHSM_INVENTORY_SUBSCRIPTIONS=/api/rhsm-subscriptions/v1/subscriptions/products/
REACT_APP_SERVICES_RHSM_OPTIN=/api/rhsm-subscriptions/v1/opt-in
4 changes: 3 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
DEV_PORT=3000
DEV_BRANCH=ci-beta
DEV_BRANCH=ci-stable

REACT_APP_ENV=development

REACT_APP_SERVICES_RHSM_VERSION=http://localhost:5000/api/rhsm-subscriptions/v1/version
REACT_APP_SERVICES_RHSM_REPORT=http://localhost:5000/api/rhsm-subscriptions/v1/tally/products/
REACT_APP_SERVICES_RHSM_TALLY=http://localhost:5000/api/rhsm-subscriptions/v1/tally/products/{0}/{1}
REACT_APP_SERVICES_RHSM_CAPACITY=http://localhost:5000/api/rhsm-subscriptions/v1/capacity/products/
REACT_APP_SERVICES_RHSM_INVENTORY=http://localhost:5000/api/rhsm-subscriptions/v1/hosts/products/
REACT_APP_SERVICES_RHSM_INVENTORY_GUESTS=//localhost:5000/api/rhsm-subscriptions/v1/hosts/{0}/guests
REACT_APP_SERVICES_RHSM_INVENTORY_INSTANCES=//localhost:5000/api/rhsm-subscriptions/v1/instances/products/
REACT_APP_SERVICES_RHSM_INVENTORY_SUBSCRIPTIONS=//localhost:5000/api/rhsm-subscriptions/v1/subscriptions/products/
REACT_APP_SERVICES_RHSM_OPTIN=http://localhost:5000/api/rhsm-subscriptions/v1/opt-in
2 changes: 1 addition & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REACT_APP_ENV=production
REACT_APP_UI_VERSION=${UI_VERSION}

REACT_APP_UI_DISABLED_TOOLBAR=false
REACT_APP_UI_DISABLED_TABLE_SUBSCRIPTIONS=true
4 changes: 2 additions & 2 deletions .github/workflows/commit_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
git cherry -v ssh-origin/${{ env.BRANCH }} | grep "+" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
node-version: ${{ matrix.node-version }}
- name: Lint
uses: actions/github-script@v4.0.2
uses: actions/github-script@v5
with:
script: |
const actionCommit = require(`${process.env.GITHUB_WORKSPACE}/scripts/actions.commit.js`)
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
node-version: ${{ matrix.node-version }}
cache: yarn
Expand All @@ -30,7 +30,7 @@ jobs:
if: ${{ steps.modules-cache.outputs.cache-hit != 'true' }}
run: yarn install
- name: Lint and test
uses: actions/github-script@v4.0.2
uses: actions/github-script@v5
with:
script: |
const { execSync } = require('child_process');
Expand All @@ -44,7 +44,7 @@ jobs:
uses: codecov/[email protected]
- name: Confirm beta integration
if: ${{ success() }}
uses: actions/github-script@v4.0.2
uses: actions/github-script@v5
with:
script: |
const { execSync } = require('child_process');
Expand All @@ -57,7 +57,7 @@ jobs:
BUILD_STAGE: Beta
- name: Confirm stable integration
if: ${{ success() }}
uses: actions/github-script@v4.0.2
uses: actions/github-script@v5
with:
script: |
const { execSync } = require('child_process');
Expand Down
4 changes: 4 additions & 0 deletions config/cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"dismissable",
"fadein",
"flyout",
"gibibyte",
"gibibytes",
"generatedid",
"HHmmss",
"hoverable",
Expand Down Expand Up @@ -44,10 +46,12 @@
"redhat",
"reselect's",
"rhel",
"rhosak",
"rhsm",
"select's",
"spandx",
"timeseries",
"tranformers",
"uxui",
"voronoi",
"wojtekmaj",
Expand Down
8 changes: 8 additions & 0 deletions config/jest.setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ jest.mock('i18next', () => {
*/
jest.mock('lodash/debounce', () => jest.fn);

/**
* We currently use a wrapper for useSelector, emulate for component checks
*/
jest.mock('react-redux', () => ({
...jest.requireActual('react-redux'),
useSelector: jest.fn()
}));

/**
* Add the displayName property to function based components. Makes sure that snapshot tests have named components
* instead of displaying a generic "<Component.../>".
Expand Down
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
collectCoverageFrom: [
'src/**/*.{js,jsx}',
'!src/**/.*/**',
'!src/appEntry.js',
'!src/AppEntry.js',
'!src/app.js',
'!src/bootstrap.js',
'!src/entry.js',
Expand All @@ -13,6 +13,7 @@ module.exports = {
'!src/redux/middleware/**',
'!src/redux/actions/index.js',
'!src/redux/common/index.js',
'!src/redux/hooks/index.js',
'!src/redux/reducers/index.js',
'!src/redux/selectors/index.js'
],
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"test:local": "jest --roots=./src --watch"
},
"dependencies": {
"@joi/date": "^2.1.0",
"@patternfly/patternfly": "4.135.2",
"@patternfly/react-charts": "6.15.23",
"@patternfly/react-core": "4.157.3",
Expand All @@ -89,6 +90,7 @@
"classnames": "^2.3.1",
"i18next": "^20.4.0",
"i18next-xhr-backend": "^3.2.2",
"joi": "^17.4.2",
"js-cookie": "^3.0.1",
"locale-code": "^2.0.2",
"lodash": "^4.17.21",
Expand Down
88 changes: 70 additions & 18 deletions public/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"cardHeading": "CPU usage",
"cardHeading_cores": "CPU core usage",
"cardHeading_sockets": "CPU socket usage",
"cardHeading_Instance-hours": "Instance hours",
"cardHeading_Storage-gibibytes": "Data storage",
"cardHeading_Transfer-gibibytes": "Data transfer",
"cardHeading_OpenShift Container Platform": "Annual subscriptions",
"cardHeading_OpenShift-metrics": "On-Demand subscriptions",
"cardHeading_OpenShift-dedicated-metrics": "On-Demand subscriptions",
Expand All @@ -26,12 +29,33 @@
"cardHeading_Satellite Capsule": "CPU socket usage",
"cardHeading_Satellite Server": "CPU socket usage",
"cardHeadingDescription": "...",
"cardHeadingDescription_Instance-hours": "Instance hours usage in gibibyte hours",
"cardHeadingDescription_Storage-gibibytes": "Data storage usage in gibibyte hours",
"cardHeadingDescription_Transfer-gibibytes": "Gibibyte hour usage per instance",
"cardHeadingDescription_OpenShift Container Platform": "A pre-paid subscription model that offers a designated maximum quota of units within a set time frame.",
"cardHeadingDescription_OpenShift-metrics": "A subscription model that offers purchasing options to match your usage patterns.",
"cardHeadingDescription_OpenShift-dedicated-metrics": "A subscription model that offers purchasing options to match your usage patterns.",
"cardHeadingMetric_dailyTotal": "Daily total",
"cardHeadingMetric_dailyTotal_Instance-hours": "Daily instance hours",
"cardHeadingMetric_dailyTotal_Storage-gibibytes": "Daily data storage",
"cardHeadingMetric_dailyTotal_Transfer-gibibytes": "Daily data transfer",
"cardHeadingMetric_monthlyTotal": "Monthly total",
"cardHeadingMetric_monthlyTotal_Instance-hours": "Monthly instance hours",
"cardHeadingMetric_monthlyTotal_Storage-gibibytes": "Monthly data storage",
"cardHeadingMetric_monthlyTotal_Transfer-gibibytes": "Monthly data transfer",
"cardBodyMetric_total": "No data",
"cardBodyMetric_total_Instance-hours": "<0>{{total}}</0> Gibibyte hours",
"cardBodyMetric_total_Storage-gibibytes": "<0>{{total}}</0> Gibibyte hours",
"cardBodyMetric_total_Transfer-gibibytes": "<0>{{total}}</0> Gibibytes",
"cardFooterMetric": "Last update {{date}}",
"label_axisX_Daily": "Day of the month",
"label_axisY_Instance-hours": "Instance hours",
"label_axisY_Storage-gibibytes": "Gibibyte hours",
"label_axisY_Transfer-gibibytes": "Gibibytes",
"label_cores": "Cores",
"label_coreHours": "Core hours",
"label_instanceHours": "Instance hours",
"label_Instance-hours": "Instance hours",
"label_sockets": "Sockets",
"label_cloudSockets": "Public cloud",
"label_hypervisorCores": "Virtualized cores",
Expand All @@ -41,11 +65,14 @@
"label_no": "Data",
"label_noData": "no data",
"label_noData_error": "No data",
"label_Storage-gibibytes": "Data storage",
"label_threshold": "Subscription threshold",
"label_threshold_infinite": "unlimited",
"label_Transfer-gibibytes": "Data transfer",
"legendTooltip_cores": "{{product}} CPU usage, per CPU core.",
"legendTooltip_coreHours": "{{product}} core hours usage.",
"legendTooltip_coreHours_OpenShift-dedicated-metrics": "OpenShift Dedicated <0>On-Demand</0> core hour usage.",
"legendTooltip_Instance-hours": "Instance hour usage",
"legendTooltip_instanceHours_OpenShift-dedicated-metrics": "OpenShift Dedicated <0>On-Demand</0> instance hour usage.",
"legendTooltip_coreHours_OpenShift-metrics": "OpenShift Container Platform <0>On-Demand</0> core hour usage.",
"legendTooltip_cloudSockets": "Public cloud {{product}} CPU usage, 1 CPU socket per instance.",
Expand All @@ -56,10 +83,12 @@
"legendTooltip_physicalSockets": "{{product}} CPU socket usage, per socket pair.",
"legendTooltip_physicalSockets_RHEL": "Physical {{product}} CPU usage, per socket pair. Each system's socket count is rounded upwards to the next even number.",
"legendTooltip_sockets": "{{product}} CPU usage, per CPU socket pair.",
"legendTooltip_Storage-gibibytes": "Data storage usage",
"legendTooltip_threshold": "Maximum capacity, based on total {{product}} subscriptions in this account.",
"legendTooltip_threshold_thresholdSockets_RHEL": "Maximum capacity, as CPU sockets, based on total {{product}} subscriptions in this account.",
"legendTooltip_threshold_thresholdCores_OpenShift Container Platform": "Maximum capacity, as CPU cores, based on total {{product}} Annual subscriptions in this account.",
"legendTooltip_threshold_thresholdSockets_OpenShift Container Platform": "Maximum capacity, as CPU sockets, based on total {{product}} Annual subscriptions in this account.",
"legendTooltip_Transfer-gibibytes": "Data transfer usage",
"tooltipSummary": "Your subscription data facets. With one level of column and row headers."
},
"curiosity-inventory": {
Expand All @@ -71,6 +100,7 @@
"tabHosts_noInstances_OpenShift-dedicated-metrics": "Current instances",
"tabHosts_OpenShift-dedicated-metrics": "{{count}} instance",
"tabHosts_OpenShift-dedicated-metrics_plural": "{{count}} instances",
"tabInstances": "Current monthly instances",
"tabSubscriptions": "Current subscriptions",
"tab_disabled": "The {{tabName}} display is currently disabled.",
"tableAriaLabel": "{{appName}} systems inventory table.",
Expand Down Expand Up @@ -98,23 +128,31 @@
"header_cores_OpenShift-dedicated-metrics": "Cores",
"header_coreHours": "Core hours",
"header_displayName": "Name",
"header_display_name": "Name",
"header_guestsDisplayName": "Guest name",
"header_hardwareType": "Type",
"header_instanceHours": "Instance hours",
"header_Instance-hours": "Instance hours",
"header_measurementType": "Type",
"header_inventoryId": "UUID",
"header_sockets": "Subscribed sockets",
"header_sockets_OpenShift Container Platform": "Sockets",
"header_sockets_OpenShift-metrics": "Sockets",
"header_sockets_OpenShift-dedicated-metrics": "Sockets",
"header_lastSeen": "Last seen",
"header_last_seen": "Last seen",
"header_nextEventDate": "Next renewal",
"header_productName": "Product",
"header_quantity": "Quantity",
"header_serviceLevel": "Service level",
"header_Storage-gibibytes": "Data storage",
"header_subscriptions": "Sockets",
"header_subscriptions_cores": "Cores",
"header_subscriptions_sockets": "Sockets",
"header_Transfer-gibibytes": "Data transfer",
"measurement_Instance-hours": "{{total}} GiB hours",
"measurement_Storage-gibibytes": "{{total}} GiB",
"measurement_Transfer-gibibytes": "{{total}} GiB",
"measurementType": "{{context}}",
"measurementType_cloud": "Public cloud",
"measurementType_alibaba": "Public cloud",
Expand All @@ -128,31 +166,42 @@
},
"curiosity-toolbar": {
"category": "Filter by",
"category_granularity": "Granularity",
"category_rangedMonthly": "Monthly",
"category_sla": "SLA",
"category_uom": "Unit of measure",
"category_usage": "Usage",
"clearFilters": "Reset filters",
"button_displayName": "Search button for name",
"placeholder": "Filter by",
"placeholder_displayName": "Filter by name",
"placeholder": "Select",
"placeholder_granularity": "Select date range",
"placeholder_sla": "Filter by SLA",
"placeholder_usage": "Filter by usage",
"granularity_daily": "Daily",
"granularity_weekly": "Weekly",
"granularity_monthly": "Monthly",
"granularity_quarterly": "Quarterly",
"granularityRange": "{{context}}",
"granularityRange_current": "This month",
"slaNone": "No SLA",
"slaPremium": "Premium",
"slaSelfSupport": "Self-Support",
"slaStandard": "Standard",
"placeholder_rangedMonthly": "Select a month",
"placeholder_sla": "Select SLA",
"placeholder_uom": "Select unit",
"placeholder_usage": "Select usage",
"placeholder_filter": "Filter by",
"placeholder_filter_displayName": "Filter by name",
"placeholder_filter_granularity": "Filter by date",
"placeholder_filter_rangedMonthly": "Filter by month",
"placeholder_filter_sla": "Filter by SLA",
"placeholder_filter_uom": "Filter by unit",
"placeholder_filter_usage": "Filter by usage",
"granularity_Daily": "Daily",
"granularity_Weekly": "Weekly",
"granularity_Monthly": "Monthly",
"granularity_Quarterly": "Quarterly",
"granularityRangedMonthly": "{{context}}",
"granularityRangedMonthly_current": "This month",
"sla_none": "No SLA",
"sla_Premium": "Premium",
"sla_Self-Support": "Self-Support",
"sla_Standard": "Standard",
"uom_cores": "Cores",
"uom_sockets": "Sockets",
"usageDevelopment": "Development/Test",
"usageDisaster": "Disaster Recovery",
"usageProduction": "Production",
"usageUnspecified": "Unspecified"
"usage_Development/Test": "Development/Test",
"usage_Disaster Recovery": "Disaster Recovery",
"usage_Production": "Production",
"usage_unspecified": "Unspecified"
},
"curiosity-optin": {
"buttonActivate": "Activate {{appName}}",
Expand Down Expand Up @@ -189,6 +238,9 @@
"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.",
"title_rhosak": "Red Hat OpenShift Streams for Apache Kafka",
"subtitle_rhosak": "Monitor your Apache Kafka usage for On-Demand subscriptions. <0>Learn more about {{appName}} reporting</0>",
"description_rhosak": "Monitor your Apache Kafka usage for On-Demand subscriptions.",
"title_RHEL for ARM": "Red Hat Enterprise Linux for ARM",
"title_RHEL for IBM Power": "Red Hat Enterprise Linux for IBM Power",
"title_RHEL for IBM z": "Red Hat Enterprise Linux for IBM z",
Expand Down
2 changes: 1 addition & 1 deletion src/AppEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '@patternfly/react-styles/css/components/Select/select.css';

const AppEntry = () => (
<Provider store={store}>
<BrowserRouter basename={routerHelpers.baseName}>
<BrowserRouter basename={routerHelpers.dynamicBaseName()}>
<App />
</BrowserRouter>
</Provider>
Expand Down
Loading