diff --git a/src/components/actionKebab/index.tsx b/archive/components/actionKebab/index.tsx similarity index 100% rename from src/components/actionKebab/index.tsx rename to archive/components/actionKebab/index.tsx diff --git a/koku-ui-manifest b/koku-ui-manifest index 7c43d65b2..ebc8c10b9 100644 --- a/koku-ui-manifest +++ b/koku-ui-manifest @@ -112,17 +112,13 @@ mgmt_services/cost-mgmt:koku-ui/@nodelib/fs.scandir:2.1.5.yarnlock mgmt_services/cost-mgmt:koku-ui/@nodelib/fs.stat:2.0.5.yarnlock mgmt_services/cost-mgmt:koku-ui/@nodelib/fs.stat:2.0.5.yarnlock mgmt_services/cost-mgmt:koku-ui/@nodelib/fs.walk:1.2.8.yarnlock -mgmt_services/cost-mgmt:koku-ui/@patternfly/patternfly:4.171.1.yarnlock -mgmt_services/cost-mgmt:koku-ui/@patternfly/react-charts:6.45.15.yarnlock -mgmt_services/cost-mgmt:koku-ui/@patternfly/react-core:4.192.15.yarnlock -mgmt_services/cost-mgmt:koku-ui/@patternfly/react-core:4.192.15.yarnlock -mgmt_services/cost-mgmt:koku-ui/@patternfly/react-icons:4.43.15.yarnlock -mgmt_services/cost-mgmt:koku-ui/@patternfly/react-icons:4.43.15.yarnlock -mgmt_services/cost-mgmt:koku-ui/@patternfly/react-styles:4.42.15.yarnlock -mgmt_services/cost-mgmt:koku-ui/@patternfly/react-styles:4.42.15.yarnlock -mgmt_services/cost-mgmt:koku-ui/@patternfly/react-table:4.61.15.yarnlock -mgmt_services/cost-mgmt:koku-ui/@patternfly/react-tokens:4.44.15.yarnlock -mgmt_services/cost-mgmt:koku-ui/@patternfly/react-tokens:4.44.15.yarnlock +mgmt_services/cost-mgmt:koku-ui/@patternfly/patternfly:4.179.1.yarnlock +mgmt_services/cost-mgmt:koku-ui/@patternfly/react-charts:6.51.5.yarnlock +mgmt_services/cost-mgmt:koku-ui/@patternfly/react-core:4.198.5.yarnlock +mgmt_services/cost-mgmt:koku-ui/@patternfly/react-icons:4.49.5.yarnlock +mgmt_services/cost-mgmt:koku-ui/@patternfly/react-styles:4.48.5.yarnlock +mgmt_services/cost-mgmt:koku-ui/@patternfly/react-table:4.67.5.yarnlock +mgmt_services/cost-mgmt:koku-ui/@patternfly/react-tokens:4.50.5.yarnlock mgmt_services/cost-mgmt:koku-ui/@popperjs/core:2.11.2.yarnlock mgmt_services/cost-mgmt:koku-ui/@react-aria/ssr:3.1.0.yarnlock mgmt_services/cost-mgmt:koku-ui/@redhat-cloud-services/frontend-components-config-utilities:1.5.11.yarnlock @@ -1305,32 +1301,31 @@ mgmt_services/cost-mgmt:koku-ui/v8-compile-cache:2.3.0.yarnlock mgmt_services/cost-mgmt:koku-ui/v8-to-istanbul:8.1.1.yarnlock mgmt_services/cost-mgmt:koku-ui/value-equal:1.0.1.yarnlock mgmt_services/cost-mgmt:koku-ui/vary:1.1.2.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-area:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-axis:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-axis:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-bar:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-brush-container:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-chart:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-core:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-core:35.11.4.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-area:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-axis:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-axis:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-bar:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-brush-container:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-chart:36.3.0.yarnlock mgmt_services/cost-mgmt:koku-ui/victory-core:36.3.0.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-create-container:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-cursor-container:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-group:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-legend:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-line:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-pie:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-polar-axis:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-scatter:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-selection-container:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-shared-events:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-stack:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-tooltip:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-tooltip:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-voronoi-container:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-voronoi-container:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-zoom-container:35.11.4.yarnlock -mgmt_services/cost-mgmt:koku-ui/victory-zoom-container:35.11.4.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-core:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-create-container:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-cursor-container:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-group:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-legend:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-line:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-pie:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-polar-axis:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-scatter:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-selection-container:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-shared-events:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-stack:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-tooltip:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-tooltip:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-voronoi-container:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-voronoi-container:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-zoom-container:36.3.0.yarnlock +mgmt_services/cost-mgmt:koku-ui/victory-zoom-container:36.3.0.yarnlock mgmt_services/cost-mgmt:koku-ui/vue:3.2.31.yarnlock mgmt_services/cost-mgmt:koku-ui/w3c-hr-time:1.0.2.yarnlock mgmt_services/cost-mgmt:koku-ui/w3c-xmlserializer:2.0.0.yarnlock diff --git a/locales/data.json b/locales/data.json index d1c9de127..2330111fd 100644 --- a/locales/data.json +++ b/locales/data.json @@ -197,22 +197,6 @@ } ] }, - "instance_type": { - "value": [ - { - "type": 0, - "value": "Back to " - }, - { - "type": 1, - "value": "value" - }, - { - "type": 0, - "value": " instance type details" - } - ] - }, "node": { "value": [ { @@ -493,14 +477,6 @@ } ] }, - "instance_type": { - "value": [ - { - "type": 0, - "value": "Cost by instance types" - } - ] - }, "node": { "value": [ { @@ -10856,22 +10832,6 @@ } ] }, - "instance_type": { - "value": [ - { - "type": 0, - "value": "instance type " - }, - { - "type": 1, - "value": "name" - }, - { - "type": 0, - "value": " clusters" - } - ] - }, "node": { "value": [ { @@ -11087,14 +11047,6 @@ } ] }, - "instance_type": { - "value": [ - { - "type": 0, - "value": "Instance type names" - } - ] - }, "node": { "value": [ { @@ -11214,18 +11166,6 @@ } ] }, - "instance_type": { - "value": [ - { - "type": 1, - "value": "name" - }, - { - "type": 0, - "value": " instance types" - } - ] - }, "node": { "value": [ { @@ -11471,14 +11411,6 @@ } ] }, - "instance_type": { - "value": [ - { - "type": 0, - "value": "View all instance types" - } - ] - }, "node": { "value": [ { @@ -11601,6 +11533,12 @@ "value": "https://access.redhat.com/documentation/en-us/cost_management_service/2021/html-single/using_cost_models" } ], + "Download": [ + { + "type": 0, + "value": "Download" + } + ], "Edit": [ { "type": 0, @@ -11679,6 +11617,12 @@ "value": "Examples" } ], + "ExpiresOn": [ + { + "type": 0, + "value": "Expires on" + } + ], "ExplorerChartTitle": [ { "options": { @@ -12005,25 +11949,21 @@ "ExportAggregateType": [ { "type": 0, - "value": "Select aggregate type" + "value": "Aggregate type" } ], "ExportAll": [ { "type": 0, - "value": "Export all" - } - ], - "ExportAllExports": [ + "value": "The active selections from the table plus the values here will be used to generate an export file. When the file is available, download it from the " + }, { - "type": 0, - "value": "All exports" - } - ], - "ExportDownload": [ + "type": 1, + "value": "value" + }, { "type": 0, - "value": "Generate and download" + "value": " view." } ], "ExportError": [ @@ -12218,67 +12158,6 @@ } ] }, - "instance_type": { - "value": [ - { - "options": { - "daily": { - "value": [ - { - "type": 1, - "value": "provider" - }, - { - "type": 0, - "value": "_instances_daily_" - }, - { - "type": 1, - "value": "startDate" - }, - { - "type": 0, - "value": "_" - }, - { - "type": 1, - "value": "endDate" - } - ] - }, - "monthly": { - "value": [ - { - "type": 1, - "value": "provider" - }, - { - "type": 0, - "value": "_instances_monthly_" - }, - { - "type": 1, - "value": "startDate" - }, - { - "type": 0, - "value": "_" - }, - { - "type": 1, - "value": "endDate" - } - ] - }, - "other": { - "value": [] - } - }, - "type": 5, - "value": "resolution" - } - ] - }, "node": { "value": [ { @@ -12836,6 +12715,45 @@ "value": "groupBy" } ], + "ExportFormatType": [ + { + "options": { + "csv": { + "value": [ + { + "type": 0, + "value": "CSV" + } + ] + }, + "json": { + "value": [ + { + "type": 0, + "value": "JSON" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "value" + } + ], + "ExportFormatTypeTitle": [ + { + "type": 0, + "value": "Format type" + } + ], + "ExportGenerate": [ + { + "type": 0, + "value": "Generate export" + } + ], "ExportHeading": [ { "options": { @@ -12863,14 +12781,6 @@ } ] }, - "instance_type": { - "value": [ - { - "type": 0, - "value": "Aggregates of the following instance types will be exported to a .csv file." - } - ] - }, "node": { "value": [ { @@ -12951,27 +12861,1166 @@ "value": "groupBy" } ], - "ExportResolution": [ + "ExportName": [ { "options": { - "daily": { + "account": { "value": [ { - "type": 0, - "value": "Daily" + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by Account" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by Account" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by Account" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by Account" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by Account" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by Account" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by Account" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by Account" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by Account" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by Account" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" } ] }, - "monthly": { + "cluster": { "value": [ { - "type": 0, - "value": "Monthly" - } - ] - }, - "other": { - "value": [] + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by Cluster" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by Cluster" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by Cluster" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by Cluster" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by Cluster" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by Cluster" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by Cluster" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by Cluster" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by Cluster" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by Cluster" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" + } + ] + }, + "gcp_project": { + "value": [ + { + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by GCP Project" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by GCP Project" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by GCP Project" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by GCP Project" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by GCP Project" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by GCP Project" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by GCP Project" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by GCP Project" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by GCP Project" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by GCP Project" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" + } + ] + }, + "node": { + "value": [ + { + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by Node" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by Node" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by Node" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by Node" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by Node" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by Node" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by Node" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by Node" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by Node" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by Node" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" + } + ] + }, + "org_unit_id": { + "value": [ + { + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by Organizational unit" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by Organizational unit" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by Organizational unit" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by Organizational unit" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by Organizational unit" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by Organizational unit" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by Organizational unit" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by Organizational unit" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by Organizational unit" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by Organizational unit" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" + } + ] + }, + "other": { + "value": [] + }, + "project": { + "value": [ + { + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by Project" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by Project" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by Project" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by Project" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by Project" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by Project" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by Project" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by Project" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by Project" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by Project" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" + } + ] + }, + "region": { + "value": [ + { + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by Region" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by Region" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by Region" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by Region" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by Region" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by Region" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by Region" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by Region" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by Region" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by Region" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" + } + ] + }, + "resource_location": { + "value": [ + { + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by Region" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by Region" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by Region" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by Region" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by Region" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by Region" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by Region" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by Region" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by Region" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by Region" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" + } + ] + }, + "service": { + "value": [ + { + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by Service" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by Service" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by Service" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by Service" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by Service" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by Service" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by Service" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by Service" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by Service" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by Service" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" + } + ] + }, + "service_name": { + "value": [ + { + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by Service" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by Service" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by Service" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by Service" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by Service" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by Service" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by Service" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by Service" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by Service" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by Service" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" + } + ] + }, + "subscription_guid": { + "value": [ + { + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by Account" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by Account" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by Account" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by Account" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by Account" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by Account" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by Account" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by Account" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by Account" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by Account" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" + } + ] + }, + "tag": { + "value": [ + { + "options": { + "aws": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services grouped by Tag" + } + ] + }, + "aws_ocp": { + "value": [ + { + "type": 0, + "value": "Amazon Web Services filtered by OpenShift grouped by Tag" + } + ] + }, + "azure": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure grouped by Tag" + } + ] + }, + "azure_ocp": { + "value": [ + { + "type": 0, + "value": "Microsoft Azure filtered by OpenShift grouped by Tag" + } + ] + }, + "gcp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform grouped by Tag" + } + ] + }, + "gcp_ocp": { + "value": [ + { + "type": 0, + "value": "Google Cloud Platform filtered by OpenShift grouped by Tag" + } + ] + }, + "ibm": { + "value": [ + { + "type": 0, + "value": "IBM Cloud grouped by Tag" + } + ] + }, + "ibm_ocp": { + "value": [ + { + "type": 0, + "value": "IBM Cloud filtered by OpenShift grouped by Tag" + } + ] + }, + "ocp": { + "value": [ + { + "type": 0, + "value": "OpenShift grouped by Tag" + } + ] + }, + "ocp_cloud": { + "value": [ + { + "type": 0, + "value": "All cloud filtered by OpenShift grouped by Tag" + } + ] + }, + "other": { + "value": [] + } + }, + "type": 5, + "value": "provider" + } + ] + } + }, + "type": 5, + "value": "groupBy" + } + ], + "ExportNameRequired": [ + { + "type": 0, + "value": "Please enter a name for the export" + } + ], + "ExportNameTooLong": [ + { + "type": 0, + "value": "Should not exceed 50 characters" + } + ], + "ExportResolution": [ + { + "options": { + "daily": { + "value": [ + { + "type": 0, + "value": "Daily" + } + ] + }, + "monthly": { + "value": [ + { + "type": 0, + "value": "Monthly" + } + ] + }, + "other": { + "value": [] } }, "type": 5, @@ -12985,7 +14034,15 @@ "value": [ { "type": 0, - "value": "Selected accounts" + "value": "Selected accounts (" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": ")" } ] }, @@ -12993,7 +14050,15 @@ "value": [ { "type": 0, - "value": "Selected clusters" + "value": "Selected clusters (" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": ")" } ] }, @@ -13001,15 +14066,15 @@ "value": [ { "type": 0, - "value": "Selected GCP projects" - } - ] - }, - "instance_type": { - "value": [ + "value": "Selected GCP projects (" + }, + { + "type": 1, + "value": "count" + }, { "type": 0, - "value": "Selected instance types" + "value": ")" } ] }, @@ -13017,7 +14082,15 @@ "value": [ { "type": 0, - "value": "Selected nodes" + "value": "Selected nodes (" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": ")" } ] }, @@ -13025,7 +14098,15 @@ "value": [ { "type": 0, - "value": "Selected organizational units" + "value": "Selected organizational units (" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": ")" } ] }, @@ -13036,7 +14117,15 @@ "value": [ { "type": 0, - "value": "Selected projects" + "value": "Selected projects (" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": ")" } ] }, @@ -13044,7 +14133,15 @@ "value": [ { "type": 0, - "value": "Selected regions" + "value": "Selected regions (" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": ")" } ] }, @@ -13052,7 +14149,15 @@ "value": [ { "type": 0, - "value": "Selected regions" + "value": "Selected regions (" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": ")" } ] }, @@ -13060,7 +14165,15 @@ "value": [ { "type": 0, - "value": "Selected services" + "value": "Selected services (" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": ")" } ] }, @@ -13068,7 +14181,15 @@ "value": [ { "type": 0, - "value": "Selected services" + "value": "Selected services (" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": ")" } ] }, @@ -13076,7 +14197,15 @@ "value": [ { "type": 0, - "value": "Selected accounts" + "value": "Selected accounts (" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": ")" } ] }, @@ -13084,7 +14213,15 @@ "value": [ { "type": 0, - "value": "Selected tags" + "value": "Selected tags (" + }, + { + "type": 1, + "value": "count" + }, + { + "type": 0, + "value": ")" } ] } @@ -13100,11 +14237,15 @@ "value": [ { "type": 0, - "value": "Current " + "value": "Current (" }, { "type": 1, "value": "date" + }, + { + "type": 0, + "value": ")" } ] }, @@ -13115,11 +14256,15 @@ "value": [ { "type": 0, - "value": "Previous " + "value": "Previous (" }, { "type": 1, "value": "date" + }, + { + "type": 0, + "value": ")" } ] } @@ -13131,7 +14276,7 @@ "ExportTimeScopeTitle": [ { "type": 0, - "value": "Select month" + "value": "Month" } ], "ExportTitle": [ @@ -13140,6 +14285,66 @@ "value": "Export" } ], + "ExportsDesc": [ + { + "type": 0, + "value": "Exports are available for download from the time that they are generated up to 7 days later. After 7 days, the export file will be removed." + } + ], + "ExportsFailed": [ + { + "type": 0, + "value": "Could not create export file" + } + ], + "ExportsFailedDesc": [ + { + "type": 0, + "value": "Something went wrong with the generation of this export file. Try exporting again." + } + ], + "ExportsSuccess": [ + { + "type": 0, + "value": "Export preparing for download" + } + ], + "ExportsSuccessDesc": [ + { + "type": 0, + "value": "The export is preparing for download. It will be accessible from " + }, + { + "type": 1, + "value": "value" + }, + { + "type": 0, + "value": " view. " + }, + { + "type": 1, + "value": "link" + } + ], + "ExportsTableAriaLabel": [ + { + "type": 0, + "value": "Available exports table" + } + ], + "ExportsTitle": [ + { + "type": 0, + "value": "All exports" + } + ], + "ExportsUnavailable": [ + { + "type": 0, + "value": "Export cannot be generated" + } + ], "FilterByButtonAriaLabel": [ { "options": { @@ -14450,34 +15655,6 @@ } ] }, - "instance_type": { - "value": [ - { - "offset": 0, - "options": { - "one": { - "value": [ - { - "type": 0, - "value": "All instance type" - } - ] - }, - "other": { - "value": [ - { - "type": 0, - "value": "All instance types" - } - ] - } - }, - "pluralType": "cardinal", - "type": 6, - "value": "count" - } - ] - }, "node": { "value": [ { @@ -14831,34 +16008,6 @@ } ] }, - "instance_type": { - "value": [ - { - "offset": 0, - "options": { - "one": { - "value": [ - { - "type": 0, - "value": "Top instance type" - } - ] - }, - "other": { - "value": [ - { - "type": 0, - "value": "Top instance types" - } - ] - } - }, - "pluralType": "cardinal", - "type": 6, - "value": "count" - } - ] - }, "node": { "value": [ { @@ -15146,14 +16295,6 @@ } ] }, - "instance_type": { - "value": [ - { - "type": 0, - "value": "Instance type names" - } - ] - }, "node": { "value": [ { @@ -15321,34 +16462,6 @@ } ] }, - "instance_type": { - "value": [ - { - "offset": 0, - "options": { - "one": { - "value": [ - { - "type": 0, - "value": "instance type" - } - ] - }, - "other": { - "value": [ - { - "type": 0, - "value": "instance types" - } - ] - } - }, - "pluralType": "cardinal", - "type": 6, - "value": "count" - } - ] - }, "node": { "value": [ { @@ -15696,34 +16809,6 @@ } ] }, - "instance_type": { - "value": [ - { - "offset": 0, - "options": { - "one": { - "value": [ - { - "type": 0, - "value": "Instance type" - } - ] - }, - "other": { - "value": [ - { - "type": 0, - "value": "Instance types" - } - ] - } - }, - "pluralType": "cardinal", - "type": 6, - "value": "count" - } - ] - }, "node": { "value": [ { @@ -16023,14 +17108,6 @@ } ] }, - "instance_type": { - "value": [ - { - "type": 0, - "value": "Compute usage comparison" - } - ] - }, "memory": { "value": [ { @@ -18479,6 +19556,47 @@ "value": "Sources" } ], + "Status": [ + { + "options": { + "failed": { + "value": [ + { + "type": 0, + "value": "Failed" + } + ] + }, + "other": { + "value": [] + }, + "pending": { + "value": [ + { + "type": 0, + "value": "Pending" + } + ] + }, + "running": { + "value": [ + { + "type": 0, + "value": "Running" + } + ] + } + }, + "type": 5, + "value": "value" + } + ], + "StatusActions": [ + { + "type": 0, + "value": "Status/Actions" + } + ], "Suggestions": [ { "type": 0, @@ -18523,6 +19641,12 @@ "value": "Tag names" } ], + "TimeOfExport": [ + { + "type": 0, + "value": "Time of export" + } + ], "ToolBarBulkSelectAll": [ { "type": 0, diff --git a/locales/translations.json b/locales/translations.json index 708e6abe2..b10604548 100644 --- a/locales/translations.json +++ b/locales/translations.json @@ -18,7 +18,7 @@ "AzureDetailsTitle": "Microsoft Azure details", "AzureOcpDashboardCostTitle": "Microsoft Azure filtered by OpenShift cost", "Back": "Back", - "BreakdownBackToDetails": "{groupBy, select, account {Back to {value} account details} cluster {Back to {value} cluster details} gcp_project {Back to {value} GCP project details} instance_type {Back to {value} instance type details} node {Back to {value} node details} org_unit_id {Back to {value} organizational unit details} project {Back to {value} project details} region {Back to {value} region details} resource_location {Back to {value} region details} service {Back to {value} service details} service_name {Back to {value} service details} subscription_guid {Back to {value} account details} tag {Back to {value} tag details} other {}}", + "BreakdownBackToDetails": "{groupBy, select, account {Back to {value} account details} cluster {Back to {value} cluster details} gcp_project {Back to {value} GCP project details} node {Back to {value} node details} org_unit_id {Back to {value} organizational unit details} project {Back to {value} project details} region {Back to {value} region details} resource_location {Back to {value} region details} service {Back to {value} service details} service_name {Back to {value} service details} subscription_guid {Back to {value} account details} tag {Back to {value} tag details} other {}}", "BreakdownBackToDetailsAriaLabel": "Back to details", "BreakdownBackToTitles": "{value, select, aws {Amazon Web Services} azure {Microsoft Azure} gcp {Google Cloud Platform} ibm {IBM Cloud - Top 5 Costliest} ocp {OpenShift} other {}}", "BreakdownCostBreakdownAriaLabel": "A description of markup, raw cost and usage cost", @@ -27,7 +27,7 @@ "BreakdownCostChartTooltip": "{name}: {value}", "BreakdownCostOverviewTitle": "Cost overview", "BreakdownHistoricalDataTitle": "Historical data", - "BreakdownSummaryTitle": "{value, select, account {Cost by accounts} cluster {Cost by clusters} gcp_project {Cost by GCP projects} instance_type {Cost by instance types} node {Cost by Node} org_unit_id {Cost by organizational units} project {Cost by projects} region {Cost by regions} resource_location {Cost by regions} service {Cost by services} service_name {Cost by services} subscription_guid {Cost by accounts} tag {Cost by tags} other {}}", + "BreakdownSummaryTitle": "{value, select, account {Cost by accounts} cluster {Cost by clusters} gcp_project {Cost by GCP projects} node {Cost by Node} org_unit_id {Cost by organizational units} project {Cost by projects} region {Cost by regions} resource_location {Cost by regions} service {Cost by services} service_name {Cost by services} subscription_guid {Cost by accounts} tag {Cost by tags} other {}}", "BreakdownTitle": "{value}", "BreakdownTotalCostDate": "{month, select, 0 {{count, plural, one {{value} total cost (January {startDate})} other {{value} total cost (January {startDate}-{endDate})}}} 1 {{count, plural, one {{value} total cost (February {startDate})} other {{value} total cost (February {startDate}-{endDate})}}} 2 {{count, plural, one {{value} total cost (March {startDate})} other {{value} total cost (March {startDate}-{endDate})}}} 3 {{count, plural, one {{value} total cost (April {startDate})} other {{value} total cost (April {startDate}-{endDate})}}} 4 {{count, plural, one {{value} total cost (May {startDate})} other {{value} total cost (May {startDate}-{endDate})}}} 5 {{count, plural, one {{value} total cost (June {startDate})} other {{value} total cost (June {startDate}-{endDate})}}} 6 {{count, plural, one {{value} total cost (July {startDate})} other {{value} total cost (July {startDate}-{endDate})}}} 7 {{count, plural, one {{value} total cost (August {startDate})} other {{value} total cost (August {startDate}-{endDate})}}} 8 {{count, plural, one {{value} total cost (September {startDate})} other {{value} total cost (September {startDate}-{endDate})}}} 9 {{count, plural, one {{value} total cost (October {startDate})} other {{value} total cost (October {startDate}-{endDate})}}} 10 {{count, plural, one {{value} total cost (November {startDate})} other {{value} total cost (November {startDate}-{endDate})}}} 11 {{count, plural, one {{value} total cost (December {startDate})} other {{value} total cost (December {startDate}-{endDate})}}} other {}}", "CPUTitle": "CPU", @@ -189,13 +189,13 @@ "Description": "Description", "DetailsActionsExport": "Export data", "DetailsActionsPriceList": "View all price lists", - "DetailsClustersModalTitle": "{groupBy, select, account {account {name} clusters} cluster {cluster {name} clusters} gcp_project {GCP project {name} clusters} instance_type {instance type {name} clusters} node {node {name} clusters} org_unit_id {organizational unit {name} clusters} project {project {name} clusters} region {region {name} clusters} resource_location {region {name} clusters} service {service {name} clusters} service_name {service {name} clusters} subscription_guid {account {name} clusters} tag {tags {name} clusters} other {}}", + "DetailsClustersModalTitle": "{groupBy, select, account {account {name} clusters} cluster {cluster {name} clusters} gcp_project {GCP project {name} clusters} node {node {name} clusters} org_unit_id {organizational unit {name} clusters} project {project {name} clusters} region {region {name} clusters} resource_location {region {name} clusters} service {service {name} clusters} service_name {service {name} clusters} subscription_guid {account {name} clusters} tag {tags {name} clusters} other {}}", "DetailsColumnManagementTitle": "Manage columns", "DetailsCostValue": "Cost: {value}", "DetailsEmptyState": "Processing data to generate a list of all services that sums to a total cost...", "DetailsMoreClusters": ", {value} more...", - "DetailsResourceNames": "{value, select, account {Account names} cluster {Cluster names} gcp_project {GCP project names} instance_type {Instance type names} node {Node names} org_unit_id {Organizational unit names} project {Project names} region {Region names} resource_location {Region names} service {Service names} service_name {Service names} subscription_guid {Account names} tag {Tag names} other {}}", - "DetailsSummaryModalTitle": "{groupBy, select, account {{name} accounts} cluster {{name} clusters} gcp_project {{name} GCP projects} instance_type {{name} instance types} node {{name} nodes} org_unit_id {{name} organizational units} project {{name} projects} region {{name} regions} resource_location {{name} regions} service {{name} services} service_name {{name} services} subscription_guid {{name} accounts} tag {{name} tags} other {}}", + "DetailsResourceNames": "{value, select, account {Account names} cluster {Cluster names} gcp_project {GCP project names} node {Node names} org_unit_id {Organizational unit names} project {Project names} region {Region names} resource_location {Region names} service {Service names} service_name {Service names} subscription_guid {Account names} tag {Tag names} other {}}", + "DetailsSummaryModalTitle": "{groupBy, select, account {{name} accounts} cluster {{name} clusters} gcp_project {{name} GCP projects} node {{name} nodes} org_unit_id {{name} organizational units} project {{name} projects} region {{name} regions} resource_location {{name} regions} service {{name} services} service_name {{name} services} subscription_guid {{name} accounts} tag {{name} tags} other {}}", "DetailsUnusedRequestsLabel": "Unrequested capacity", "DetailsUnusedUsageLabel": "Unused capacity", "DetailsUnusedUsageUnits": "{units} ({percentage}% of capacity)", @@ -203,7 +203,7 @@ "DetailsUsageLimit": "Limit - {value} {units}", "DetailsUsageRequests": "Requests - {value} {units}", "DetailsUsageUsage": "Usage - {value} {units}", - "DetailsViewAll": "{value, select, account {View all accounts} cluster {View all clusters} gcp_project {View all GCP projects} instance_type {View all instance types} node {View all nodes} org_unit_id {View all organizational units} project {View all projects} region {View all regions} resource_location {View all regions} service {View all Services} service_name {View all services} subscription_guid {View all accounts} tag {View all tags} other {}}", + "DetailsViewAll": "{value, select, account {View all accounts} cluster {View all clusters} gcp_project {View all GCP projects} node {View all nodes} org_unit_id {View all organizational units} project {View all projects} region {View all regions} resource_location {View all regions} service {View all Services} service_name {View all services} subscription_guid {View all accounts} tag {View all tags} other {}}", "DiscountMinus": "Discount (-)", "DistributionModelDesc": "This choice is for users to direct how their raw costs are distributed either by CPU or Memory on the project level breakdowns.", "DistributionType": "Distribution type", @@ -211,6 +211,7 @@ "DocsConfigCostModels": "https://access.redhat.com/documentation/en-us/cost_management_service/2021/html-single/using_cost_models/index#assembly-setting-up-cost-models", "DocsCostModelTerminology": "https://access.redhat.com/documentation/en-us/cost_management_service/2021/html-single/using_cost_models/index#cost-model-terminology", "DocsUsingCostModels": "https://access.redhat.com/documentation/en-us/cost_management_service/2021/html-single/using_cost_models", + "Download": "Download", "Edit": "Edit", "EditCostModel": "Edit cost model", "EditMarkup": "Edit markup", @@ -224,24 +225,37 @@ "ErrorStateUnexpectedDesc": "We encountered an unexpected error. Contact your administrator.", "ErrorStateUnexpectedTitle": "Oops!", "ExamplesTitle": "Examples", + "ExpiresOn": "Expires on", "ExplorerChartTitle": "{value, select, aws {Amazon Web Services - Top 5 Costliest} aws_ocp {Amazon Web Services filtered by OpenShift - Top 5 Costliest} azure {Microsoft Azure - Top 5 Costliest} azure_ocp {Microsoft Azure filtered by OpenShift - Top 5 Costliest} gcp {Google Cloud Platform - Top 5 Costliest} gcp_ocp {Google Cloud Platform filtered by OpenShift - Top 5 Costliest} ibm {IBM Cloud - Top 5 Costliest} ibm_ocp {IBM Cloud filtered by OpenShift - Top 5 Costliest} ocp {All OpenShift - Top 5 Costliest} ocp_cloud {All cloud filtered by OpenShift - Top 5 Costliest} other {}}", "ExplorerDateColumn": "{month, select, 0 {Jan {date}} 1 {Feb {date}} 2 {Mar {date}} 3 {Apr {date}} 4 {May {date}} 5 {Jun {date}} 6 {Jul {date}} 7 {Aug {date}} 8 {Sep {date}} 9 {Oct {date}} 10 {Nov {date}} 11 {Dec {date}} other {}}", "ExplorerDateRange": "{value, select, current_month_to_date {Month to date} last_ninety_days {Last 90 days} last_sixty_days {Last 60 days} last_thirty_days {Last 30 days} previous_month_to_date {Previous month and month to date} other {}}", "ExplorerMonthDate": "{month} {date}", "ExplorerTableAriaLabel": "Cost Explorer table", "ExplorerTitle": "Cost Explorer", - "ExportAggregateType": "Select aggregate type", - "ExportAll": "Export all", - "ExportAllExports": "All exports", - "ExportDownload": "Generate and download", + "ExportAggregateType": "Aggregate type", + "ExportAll": "The active selections from the table plus the values here will be used to generate an export file. When the file is available, download it from the {value} view.", "ExportError": "Something went wrong, please try fewer selections", - "ExportFileName": "{groupBy, select, account {{resolution, select, daily {{provider}_accounts_daily_{startDate}_{endDate}} monthly {{provider}_accounts_monthly_{startDate}_{endDate}} other {}}} cluster {{resolution, select, daily {{provider}_clusters_daily_{startDate}_{endDate}} monthly {{provider}_clusters_monthly_{startDate}_{endDate}} other {}}} gcp_project {{resolution, select, daily {{provider}_gcp-projects_daily_{startDate}_{endDate}} monthly {{provider}_gcp-projects_monthly_{startDate}_{endDate}} other {}}} instance_type {{resolution, select, daily {{provider}_instances_daily_{startDate}_{endDate}} monthly {{provider}_instances_monthly_{startDate}_{endDate}} other {}}} node {{resolution, select, daily {{provider}_node_daily_{startDate}_{endDate}} monthly {{provider}_node_monthly_{startDate}_{endDate}} other {}}} org_unit_id {{resolution, select, daily {{provider}_orgs_daily_{startDate}_{endDate}} monthly {{provider}_orgs_monthly_{startDate}_{endDate}} other {}}} project {{resolution, select, daily {{provider}_projects_daily_{startDate}_{endDate}} monthly {{provider}_projects_monthly_{startDate}_{endDate}} other {}}} region {{resolution, select, daily {{provider}_regions_daily_{startDate}_{endDate}} monthly {{provider}_regions_monthly_{startDate}_{endDate}} other {}}} resource_location {{resolution, select, daily {{provider}_regions_daily_{startDate}_{endDate}} monthly {{provider}_regions_monthly_{startDate}_{endDate}} other {}}} service {{resolution, select, daily {{provider}_services_daily_{startDate}_{endDate}} monthly {{provider}_services_monthly_{startDate}_{endDate}} other {}}} service_name {{resolution, select, daily {{provider}_services_daily_{startDate}_{endDate}} monthly {{provider}_services_monthly_{startDate}_{endDate}} other {}}} subscription_guid {{resolution, select, daily {{provider}_accounts_daily_{startDate}_{endDate}} monthly {{provider}_accounts_monthly_{startDate}_{endDate}} other {}}} tag {{resolution, select, daily {{provider}_tags_daily_{startDate}_{endDate}} monthly {{provider}_tags_monthly_{startDate}_{endDate}} other {}}} other {}}", - "ExportHeading": "{groupBy, select, account {Aggregates of the following accounts will be exported to a .csv file.} cluster {Aggregates of the following clusters will be exported to a .csv file.} gcp_project {Aggregates of the following GCP projects will be exported to a .csv file.} instance_type {Aggregates of the following instance types will be exported to a .csv file.} node {Aggregates of the following nodes will be exported to a .csv file.} org_unit_id {Aggregates of the following organizational units will be exported to a .csv file.} project {Aggregates of the following projects will be exported to a .csv file.} region {Aggregates of the following regions will be exported to a .csv file.} resource_location {Aggregates of the regions will be exported to a .csv file.} service {Aggregates of the following services will be exported to a .csv file.} service_name {Aggregates of the following services will be exported to a .csv file.} subscription_guid {Aggregates of the following accounts will be exported to a .csv file.} tag {Aggregates of the following tags will be exported to a .csv file.} other {}}", + "ExportFileName": "{groupBy, select, account {{resolution, select, daily {{provider}_accounts_daily_{startDate}_{endDate}} monthly {{provider}_accounts_monthly_{startDate}_{endDate}} other {}}} cluster {{resolution, select, daily {{provider}_clusters_daily_{startDate}_{endDate}} monthly {{provider}_clusters_monthly_{startDate}_{endDate}} other {}}} gcp_project {{resolution, select, daily {{provider}_gcp-projects_daily_{startDate}_{endDate}} monthly {{provider}_gcp-projects_monthly_{startDate}_{endDate}} other {}}} node {{resolution, select, daily {{provider}_node_daily_{startDate}_{endDate}} monthly {{provider}_node_monthly_{startDate}_{endDate}} other {}}} org_unit_id {{resolution, select, daily {{provider}_orgs_daily_{startDate}_{endDate}} monthly {{provider}_orgs_monthly_{startDate}_{endDate}} other {}}} project {{resolution, select, daily {{provider}_projects_daily_{startDate}_{endDate}} monthly {{provider}_projects_monthly_{startDate}_{endDate}} other {}}} region {{resolution, select, daily {{provider}_regions_daily_{startDate}_{endDate}} monthly {{provider}_regions_monthly_{startDate}_{endDate}} other {}}} resource_location {{resolution, select, daily {{provider}_regions_daily_{startDate}_{endDate}} monthly {{provider}_regions_monthly_{startDate}_{endDate}} other {}}} service {{resolution, select, daily {{provider}_services_daily_{startDate}_{endDate}} monthly {{provider}_services_monthly_{startDate}_{endDate}} other {}}} service_name {{resolution, select, daily {{provider}_services_daily_{startDate}_{endDate}} monthly {{provider}_services_monthly_{startDate}_{endDate}} other {}}} subscription_guid {{resolution, select, daily {{provider}_accounts_daily_{startDate}_{endDate}} monthly {{provider}_accounts_monthly_{startDate}_{endDate}} other {}}} tag {{resolution, select, daily {{provider}_tags_daily_{startDate}_{endDate}} monthly {{provider}_tags_monthly_{startDate}_{endDate}} other {}}} other {}}", + "ExportFormatType": "{value, select, csv {CSV} json {JSON} other {}}", + "ExportFormatTypeTitle": "Format type", + "ExportGenerate": "Generate export", + "ExportHeading": "{groupBy, select, account {Aggregates of the following accounts will be exported to a .csv file.} cluster {Aggregates of the following clusters will be exported to a .csv file.} gcp_project {Aggregates of the following GCP projects will be exported to a .csv file.} node {Aggregates of the following nodes will be exported to a .csv file.} org_unit_id {Aggregates of the following organizational units will be exported to a .csv file.} project {Aggregates of the following projects will be exported to a .csv file.} region {Aggregates of the following regions will be exported to a .csv file.} resource_location {Aggregates of the regions will be exported to a .csv file.} service {Aggregates of the following services will be exported to a .csv file.} service_name {Aggregates of the following services will be exported to a .csv file.} subscription_guid {Aggregates of the following accounts will be exported to a .csv file.} tag {Aggregates of the following tags will be exported to a .csv file.} other {}}", + "ExportName": "{groupBy, select, account {{provider, select, aws {Amazon Web Services grouped by Account} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Account} azure {Microsoft Azure grouped by Account} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Account} gcp {Google Cloud Platform grouped by Account} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Account} ibm {IBM Cloud grouped by Account} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Account} ocp {OpenShift grouped by Account} ocp_cloud {All cloud filtered by OpenShift grouped by Account} other {}}} cluster {{provider, select, aws {Amazon Web Services grouped by Cluster} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Cluster} azure {Microsoft Azure grouped by Cluster} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Cluster} gcp {Google Cloud Platform grouped by Cluster} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Cluster} ibm {IBM Cloud grouped by Cluster} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Cluster} ocp {OpenShift grouped by Cluster} ocp_cloud {All cloud filtered by OpenShift grouped by Cluster} other {}}} gcp_project {{provider, select, aws {Amazon Web Services grouped by GCP Project} aws_ocp {Amazon Web Services filtered by OpenShift grouped by GCP Project} azure {Microsoft Azure grouped by GCP Project} azure_ocp {Microsoft Azure filtered by OpenShift grouped by GCP Project} gcp {Google Cloud Platform grouped by GCP Project} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by GCP Project} ibm {IBM Cloud grouped by GCP Project} ibm_ocp {IBM Cloud filtered by OpenShift grouped by GCP Project} ocp {OpenShift grouped by GCP Project} ocp_cloud {All cloud filtered by OpenShift grouped by GCP Project} other {}}} node {{provider, select, aws {Amazon Web Services grouped by Node} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Node} azure {Microsoft Azure grouped by Node} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Node} gcp {Google Cloud Platform grouped by Node} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Node} ibm {IBM Cloud grouped by Node} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Node} ocp {OpenShift grouped by Node} ocp_cloud {All cloud filtered by OpenShift grouped by Node} other {}}} org_unit_id {{provider, select, aws {Amazon Web Services grouped by Organizational unit} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Organizational unit} azure {Microsoft Azure grouped by Organizational unit} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Organizational unit} gcp {Google Cloud Platform grouped by Organizational unit} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Organizational unit} ibm {IBM Cloud grouped by Organizational unit} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Organizational unit} ocp {OpenShift grouped by Organizational unit} ocp_cloud {All cloud filtered by OpenShift grouped by Organizational unit} other {}}} project {{provider, select, aws {Amazon Web Services grouped by Project} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Project} azure {Microsoft Azure grouped by Project} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Project} gcp {Google Cloud Platform grouped by Project} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Project} ibm {IBM Cloud grouped by Project} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Project} ocp {OpenShift grouped by Project} ocp_cloud {All cloud filtered by OpenShift grouped by Project} other {}}} region {{provider, select, aws {Amazon Web Services grouped by Region} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Region} azure {Microsoft Azure grouped by Region} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Region} gcp {Google Cloud Platform grouped by Region} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Region} ibm {IBM Cloud grouped by Region} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Region} ocp {OpenShift grouped by Region} ocp_cloud {All cloud filtered by OpenShift grouped by Region} other {}}} resource_location {{provider, select, aws {Amazon Web Services grouped by Region} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Region} azure {Microsoft Azure grouped by Region} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Region} gcp {Google Cloud Platform grouped by Region} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Region} ibm {IBM Cloud grouped by Region} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Region} ocp {OpenShift grouped by Region} ocp_cloud {All cloud filtered by OpenShift grouped by Region} other {}}} service {{provider, select, aws {Amazon Web Services grouped by Service} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Service} azure {Microsoft Azure grouped by Service} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Service} gcp {Google Cloud Platform grouped by Service} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Service} ibm {IBM Cloud grouped by Service} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Service} ocp {OpenShift grouped by Service} ocp_cloud {All cloud filtered by OpenShift grouped by Service} other {}}} service_name {{provider, select, aws {Amazon Web Services grouped by Service} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Service} azure {Microsoft Azure grouped by Service} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Service} gcp {Google Cloud Platform grouped by Service} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Service} ibm {IBM Cloud grouped by Service} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Service} ocp {OpenShift grouped by Service} ocp_cloud {All cloud filtered by OpenShift grouped by Service} other {}}} subscription_guid {{provider, select, aws {Amazon Web Services grouped by Account} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Account} azure {Microsoft Azure grouped by Account} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Account} gcp {Google Cloud Platform grouped by Account} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Account} ibm {IBM Cloud grouped by Account} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Account} ocp {OpenShift grouped by Account} ocp_cloud {All cloud filtered by OpenShift grouped by Account} other {}}} tag {{provider, select, aws {Amazon Web Services grouped by Tag} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Tag} azure {Microsoft Azure grouped by Tag} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Tag} gcp {Google Cloud Platform grouped by Tag} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Tag} ibm {IBM Cloud grouped by Tag} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Tag} ocp {OpenShift grouped by Tag} ocp_cloud {All cloud filtered by OpenShift grouped by Tag} other {}}} other {}}", + "ExportNameRequired": "Please enter a name for the export", + "ExportNameTooLong": "Should not exceed 50 characters", "ExportResolution": "{value, select, daily {Daily} monthly {Monthly} other {}}", - "ExportSelected": "{groupBy, select, account {Selected accounts} cluster {Selected clusters} gcp_project {Selected GCP projects} instance_type {Selected instance types} node {Selected nodes} org_unit_id {Selected organizational units} project {Selected projects} region {Selected regions} resource_location {Selected regions} service {Selected services} service_name {Selected services} subscription_guid {Selected accounts} tag {Selected tags} other {}}", - "ExportTimeScope": "{value, select, current {Current {date}} previous {Previous {date}} other {}}", - "ExportTimeScopeTitle": "Select month", + "ExportSelected": "{groupBy, select, account {Selected accounts ({count})} cluster {Selected clusters ({count})} gcp_project {Selected GCP projects ({count})} node {Selected nodes ({count})} org_unit_id {Selected organizational units ({count})} project {Selected projects ({count})} region {Selected regions ({count})} resource_location {Selected regions ({count})} service {Selected services ({count})} service_name {Selected services ({count})} subscription_guid {Selected accounts ({count})} tag {Selected tags ({count})} other {}}", + "ExportTimeScope": "{value, select, current {Current ({date})} previous {Previous ({date})} other {}}", + "ExportTimeScopeTitle": "Month", "ExportTitle": "Export", + "ExportsDesc": "Exports are available for download from the time that they are generated up to 7 days later. After 7 days, the export file will be removed.", + "ExportsFailed": "Could not create export file", + "ExportsFailedDesc": "Something went wrong with the generation of this export file. Try exporting again.", + "ExportsSuccess": "Export preparing for download", + "ExportsSuccessDesc": "The export is preparing for download. It will be accessible from {value} view. {link}", + "ExportsTableAriaLabel": "Available exports table", + "ExportsTitle": "All exports", + "ExportsUnavailable": "Export cannot be generated", "FilterByButtonAriaLabel": "{value, select, account {Filter button for account name} cluster {Filter button for cluster name} gcp_project {Filter button for GCP project name} name {Filter button for name name} node {Filter button for node name} org_unit_id {Filter button for organizational unit name} project {Filter button for project name} region {Filter button for region name} resource_location {Filter button for region name} service {Filter button for service name} service_name {Filter button for service_name name} subscription_guid {Filter button for account name} tag {Filter button for tag name} other {}}", "FilterByInputAriaLabel": "{value, select, account {Input for account name} cluster {Input for cluster name} gcp_project {Input for GCP project name} name {Input for name name} node {Input for node name} org_unit_id {Input for organizational unit name} project {Input for project name} region {Input for region name} resource_location {Input for region name} service {Input for service name} service_name {Input for service_name name} subscription_guid {Input for account name} tag {Input for tag name} other {}}", "FilterByOrgUnitAriaLabel": "Organizational units", @@ -263,15 +277,15 @@ "GCPDesc": "Raw cost from Google Cloud Platform infrastructure.", "GCPDetailsTable": "Google Cloud Platform details table", "GCPDetailsTitle": "Google Cloud Platform Details", - "GroupByAll": "{value, select, account {{count, plural, one {All account} other {All accounts}}} cluster {{count, plural, one {All cluster} other {All clusters}}} gcp_project {{count, plural, one {All GCP project} other {All GCP projects}}} instance_type {{count, plural, one {All instance type} other {All instance types}}} node {{count, plural, one {All node} other {All nodes}}} org_unit_id {{count, plural, one {All organizational unit} other {All organizational units}}} project {{count, plural, one {All project} other {All projects}}} region {{count, plural, one {All region} other {All regions}}} resource_location {{count, plural, one {All region} other {All regions}}} service {{count, plural, one {All service} other {All services}}} service_name {{count, plural, one {All service} other {All services}}} subscription_guid {{count, plural, one {All account} other {All accounts}}} tag {{count, plural, one {All tag} other {All tags}}} other {}}", + "GroupByAll": "{value, select, account {{count, plural, one {All account} other {All accounts}}} cluster {{count, plural, one {All cluster} other {All clusters}}} gcp_project {{count, plural, one {All GCP project} other {All GCP projects}}} node {{count, plural, one {All node} other {All nodes}}} org_unit_id {{count, plural, one {All organizational unit} other {All organizational units}}} project {{count, plural, one {All project} other {All projects}}} region {{count, plural, one {All region} other {All regions}}} resource_location {{count, plural, one {All region} other {All regions}}} service {{count, plural, one {All service} other {All services}}} service_name {{count, plural, one {All service} other {All services}}} subscription_guid {{count, plural, one {All account} other {All accounts}}} tag {{count, plural, one {All tag} other {All tags}}} other {}}", "GroupByLabel": "Group by", - "GroupByTop": "{value, select, account {{count, plural, one {Top account} other {Top accounts}}} cluster {{count, plural, one {Top cluster} other {Top clusters}}} gcp_project {{count, plural, one {Top GCP project} other {Top GCP projects}}} instance_type {{count, plural, one {Top instance type} other {Top instance types}}} node {{count, plural, one {Top node} other {Top node}}} org_unit_id {{count, plural, one {Top organizational unit} other {Top organizational units}}} project {{count, plural, one {Top project} other {Top projects}}} region {{count, plural, one {Top region} other {Top regions}}} resource_location {{count, plural, one {Top region} other {Top regions}}} service {{count, plural, one {Top service} other {Top services}}} service_name {{count, plural, one {Top service} other {Top services}}} subscription_guid {{count, plural, one {Top account} other {Top accounts}}} tag {{count, plural, one {Top tag} other {Top tags}}} other {}}", - "GroupByValueNames": "{groupBy, select, account {Account names} cluster {Cluster names} gcp_project {GCP project names} instance_type {Instance type names} node {Node names} org_unit_id {Organizational unit names} project {Project names} region {Region names} resource_location {Region names} service {Service names} service_name {Service names} subscription_guid {Account names} tag {Tag names} other {}}", - "GroupByValues": "{value, select, account {{count, plural, one {account} other {accounts}}} cluster {{count, plural, one {cluster} other {clusters}}} gcp_project {{count, plural, one {GCP project} other {GCP projects}}} instance_type {{count, plural, one {instance type} other {instance types}}} node {{count, plural, one {node} other {node}}} org_unit_id {{count, plural, one {organizational unit} other {organizational units}}} project {{count, plural, one {project} other {projects}}} region {{count, plural, one {region} other {regions}}} resource_location {{count, plural, one {region} other {regions}}} service {{count, plural, one {service} other {services}}} service_name {{count, plural, one {service} other {services}}} subscription_guid {{count, plural, one {account} other {accounts}}} tag {{count, plural, one {tag} other {tags}}} other {}}", - "GroupByValuesTitleCase": "{value, select, account {{count, plural, one {Account} other {Accounts}}} cluster {{count, plural, one {Cluster} other {Clusters}}} gcp_project {{count, plural, one {GCP project} other {GCP projects}}} instance_type {{count, plural, one {Instance type} other {Instance types}}} node {{count, plural, one {Node} other {Node}}} org_unit_id {{count, plural, one {Organizational unit} other {Organizational units}}} project {{count, plural, one {Project} other {Projects}}} region {{count, plural, one {Region} other {Regions}}} resource_location {{count, plural, one {Region} other {Regions}}} service {{count, plural, one {Service} other {Services}}} service_name {{count, plural, one {Service} other {Services}}} subscription_guid {{count, plural, one {Account} other {Accounts}}} tag {{count, plural, one {Tag} other {Tags}}} other {}}", + "GroupByTop": "{value, select, account {{count, plural, one {Top account} other {Top accounts}}} cluster {{count, plural, one {Top cluster} other {Top clusters}}} gcp_project {{count, plural, one {Top GCP project} other {Top GCP projects}}} node {{count, plural, one {Top node} other {Top node}}} org_unit_id {{count, plural, one {Top organizational unit} other {Top organizational units}}} project {{count, plural, one {Top project} other {Top projects}}} region {{count, plural, one {Top region} other {Top regions}}} resource_location {{count, plural, one {Top region} other {Top regions}}} service {{count, plural, one {Top service} other {Top services}}} service_name {{count, plural, one {Top service} other {Top services}}} subscription_guid {{count, plural, one {Top account} other {Top accounts}}} tag {{count, plural, one {Top tag} other {Top tags}}} other {}}", + "GroupByValueNames": "{groupBy, select, account {Account names} cluster {Cluster names} gcp_project {GCP project names} node {Node names} org_unit_id {Organizational unit names} project {Project names} region {Region names} resource_location {Region names} service {Service names} service_name {Service names} subscription_guid {Account names} tag {Tag names} other {}}", + "GroupByValues": "{value, select, account {{count, plural, one {account} other {accounts}}} cluster {{count, plural, one {cluster} other {clusters}}} gcp_project {{count, plural, one {GCP project} other {GCP projects}}} node {{count, plural, one {node} other {node}}} org_unit_id {{count, plural, one {organizational unit} other {organizational units}}} project {{count, plural, one {project} other {projects}}} region {{count, plural, one {region} other {regions}}} resource_location {{count, plural, one {region} other {regions}}} service {{count, plural, one {service} other {services}}} service_name {{count, plural, one {service} other {services}}} subscription_guid {{count, plural, one {account} other {accounts}}} tag {{count, plural, one {tag} other {tags}}} other {}}", + "GroupByValuesTitleCase": "{value, select, account {{count, plural, one {Account} other {Accounts}}} cluster {{count, plural, one {Cluster} other {Clusters}}} gcp_project {{count, plural, one {GCP project} other {GCP projects}}} node {{count, plural, one {Node} other {Node}}} org_unit_id {{count, plural, one {Organizational unit} other {Organizational units}}} project {{count, plural, one {Project} other {Projects}}} region {{count, plural, one {Region} other {Regions}}} resource_location {{count, plural, one {Region} other {Regions}}} service {{count, plural, one {Service} other {Services}}} service_name {{count, plural, one {Service} other {Services}}} subscription_guid {{count, plural, one {Account} other {Accounts}}} tag {{count, plural, one {Tag} other {Tags}}} other {}}", "HistoricalChartCostLabel": "Cost ({units})", "HistoricalChartDayOfMonthLabel": "Day of Month", - "HistoricalChartTitle": "{value, select, cost {Cost comparison} cpu {CPU usage, request, and limit comparison} instance_type {Compute usage comparison} memory {Memory usage, request, and limit comparison} modal {{name} daily usage comparison} storage {Storage usage comparison} other {}}", + "HistoricalChartTitle": "{value, select, cost {Cost comparison} cpu {CPU usage, request, and limit comparison} memory {Memory usage, request, and limit comparison} modal {{name} daily usage comparison} storage {Storage usage comparison} other {}}", "HistoricalChartUsageLabel": "{value, select, instance_type {hrs} storage {gb-mo} other {}}", "IBM": "IBM Cloud", "IBMComputeTitle": "Compute instances usage", @@ -411,12 +425,15 @@ "Selected": "{value} selected", "SinceDate": "{month, select, 0 {{count, plural, one {January {startDate}} other {January {startDate}-{endDate}}}} 1 {{count, plural, one {February {startDate}} other {February {startDate}-{endDate}}}} 2 {{count, plural, one {March {startDate}} other {March {startDate}-{endDate}}}} 3 {{count, plural, one {April {startDate}} other {April {startDate}-{endDate}}}} 4 {{count, plural, one {May {startDate}} other {May {startDate}-{endDate}}}} 5 {{count, plural, one {June {startDate}} other {June {startDate}-{endDate}}}} 6 {{count, plural, one {July {startDate}} other {July {startDate}-{endDate}}}} 7 {{count, plural, one {August {startDate}} other {August {startDate}-{endDate}}}} 8 {{count, plural, one {September {startDate}} other {September {startDate}-{endDate}}}} 9 {{count, plural, one {October {startDate}} other {October {startDate}-{endDate}}}} 10 {{count, plural, one {November {startDate}} other {November {startDate}-{endDate}}}} 11 {{count, plural, one {December {startDate}} other {December {startDate}-{endDate}}}} other {}}", "Sources": "Sources", + "Status": "{value, select, pending {Pending} running {Running} failed {Failed} other {}}", + "StatusActions": "Status/Actions", "Suggestions": "Suggestions", "Supplementary": "Supplementary", "TagHeadingKey": "Key", "TagHeadingTitle": "Tags ({value})", "TagHeadingValue": "Value", "TagNames": "Tag names", + "TimeOfExport": "Time of export", "ToolBarBulkSelectAll": "Select all ({value} items)", "ToolBarBulkSelectAriaDeselect": "Deselect all items", "ToolBarBulkSelectAriaSelect": "Select all items", diff --git a/package.json b/package.json index 993743dd1..f6adfbd39 100644 --- a/package.json +++ b/package.json @@ -37,13 +37,13 @@ "dependencies": { "@formatjs/cli": "^4.8.2", "@fortawesome/free-solid-svg-icons": "^6.0.0", - "@patternfly/patternfly": "^4.171.1", - "@patternfly/react-charts": "^6.45.14", - "@patternfly/react-core": "^4.192.14", - "@patternfly/react-icons": "^4.43.14", - "@patternfly/react-styles": "^4.42.14", - "@patternfly/react-table": "^4.61.14", - "@patternfly/react-tokens": "^4.44.14", + "@patternfly/patternfly": "^4.179.1", + "@patternfly/react-charts": "^6.51.5", + "@patternfly/react-core": "^4.198.5", + "@patternfly/react-icons": "^4.49.5", + "@patternfly/react-styles": "^4.48.5", + "@patternfly/react-table": "^4.67.5", + "@patternfly/react-tokens": "^4.50.5", "@redhat-cloud-services/frontend-components": "^3.7.0", "@redhat-cloud-services/frontend-components-notifications": "^3.2.5", "@redhat-cloud-services/frontend-components-translations": "^3.2.4", @@ -78,7 +78,7 @@ }, "devDependencies": { "@formatjs/cli": "4.2.12", - "@redhat-cloud-services/frontend-components-config-utilities": "^1.5.10", + "@redhat-cloud-services/frontend-components-config-utilities": "^1.5.11", "@testing-library/react": "^12.1.2", "@types/enzyme": "^3.10.11", "@types/jest": "^27.4.0", diff --git a/src/api/exports/awsExport.ts b/src/api/export/awsExport.ts similarity index 100% rename from src/api/exports/awsExport.ts rename to src/api/export/awsExport.ts diff --git a/src/api/exports/awsOcpExport.ts b/src/api/export/awsOcpExport.ts similarity index 100% rename from src/api/exports/awsOcpExport.ts rename to src/api/export/awsOcpExport.ts diff --git a/src/api/exports/azureExport.ts b/src/api/export/azureExport.ts similarity index 100% rename from src/api/exports/azureExport.ts rename to src/api/export/azureExport.ts diff --git a/src/api/exports/azureOcpExport.ts b/src/api/export/azureOcpExport.ts similarity index 100% rename from src/api/exports/azureOcpExport.ts rename to src/api/export/azureOcpExport.ts diff --git a/src/api/exports/export.ts b/src/api/export/export.ts similarity index 100% rename from src/api/exports/export.ts rename to src/api/export/export.ts diff --git a/src/api/exports/exportUtils.ts b/src/api/export/exportUtils.ts similarity index 100% rename from src/api/exports/exportUtils.ts rename to src/api/export/exportUtils.ts diff --git a/src/api/exports/gcpExport.ts b/src/api/export/gcpExport.ts similarity index 100% rename from src/api/exports/gcpExport.ts rename to src/api/export/gcpExport.ts diff --git a/src/api/exports/gcpOcpExport.ts b/src/api/export/gcpOcpExport.ts similarity index 100% rename from src/api/exports/gcpOcpExport.ts rename to src/api/export/gcpOcpExport.ts diff --git a/src/api/exports/ibmExport.ts b/src/api/export/ibmExport.ts similarity index 100% rename from src/api/exports/ibmExport.ts rename to src/api/export/ibmExport.ts diff --git a/src/api/exports/ocpCloudExport.ts b/src/api/export/ocpCloudExport.ts similarity index 100% rename from src/api/exports/ocpCloudExport.ts rename to src/api/export/ocpCloudExport.ts diff --git a/src/api/exports/ocpExport.ts b/src/api/export/ocpExport.ts similarity index 100% rename from src/api/exports/ocpExport.ts rename to src/api/export/ocpExport.ts diff --git a/src/api/queries/awsQuery.ts b/src/api/queries/awsQuery.ts index 1400fb8f8..bb18fc6cc 100644 --- a/src/api/queries/awsQuery.ts +++ b/src/api/queries/awsQuery.ts @@ -9,7 +9,6 @@ type AwsGroupByValue = string | string[]; interface AwsGroupBys { service?: AwsGroupByValue; account?: AwsGroupByValue; - instance_type?: AwsGroupByValue; org_unit_id?: AwsGroupByValue; region?: AwsGroupByValue; } diff --git a/src/api/queries/azureQuery.ts b/src/api/queries/azureQuery.ts index 34faaafbe..d2a8e322a 100644 --- a/src/api/queries/azureQuery.ts +++ b/src/api/queries/azureQuery.ts @@ -9,7 +9,6 @@ type AzureGroupByValue = string | string[]; interface AzureGroupBys { service_name?: AzureGroupByValue; subscription_guid?: AzureGroupByValue; - instance_type?: AzureGroupByValue; resource_location?: AzureGroupByValue; } diff --git a/src/api/queries/gcpQuery.ts b/src/api/queries/gcpQuery.ts index 7dbd7149e..ff6741f7a 100644 --- a/src/api/queries/gcpQuery.ts +++ b/src/api/queries/gcpQuery.ts @@ -10,7 +10,6 @@ interface GcpGroupBys { service?: GcpGroupByValue; account?: GcpGroupByValue; gcp_project?: GcpGroupByValue; - instance_type?: GcpGroupByValue; project?: GcpGroupByValue; region?: GcpGroupByValue; } diff --git a/src/api/queries/ibmQuery.ts b/src/api/queries/ibmQuery.ts index a72b440a7..02ac55f41 100644 --- a/src/api/queries/ibmQuery.ts +++ b/src/api/queries/ibmQuery.ts @@ -9,7 +9,6 @@ type IbmGroupByValue = string | string[]; interface IbmGroupBys { service?: IbmGroupByValue; account?: IbmGroupByValue; - instance_type?: IbmGroupByValue; project?: IbmGroupByValue; region?: IbmGroupByValue; } diff --git a/src/api/reports/awsOcpReports.ts b/src/api/reports/awsOcpReports.ts index 74edb4725..8e56cc1c7 100644 --- a/src/api/reports/awsOcpReports.ts +++ b/src/api/reports/awsOcpReports.ts @@ -6,7 +6,6 @@ import { Report, ReportData, ReportItem, ReportItemValue, ReportMeta, ReportType export interface AwsOcpReportItem extends ReportItem { account?: string; account_alias?: string; - instance_type?: string; region?: string; service?: string; } @@ -23,14 +22,9 @@ export interface GroupByRegionData extends Omit { region: string; } -export interface GroupByInstanceTypeData extends Omit { - instance_type: string; -} - export interface AwsOcpReportData extends ReportData { accounts?: GroupByAccountData[]; services?: GroupByServiceData[]; - instance_types?: GroupByInstanceTypeData[]; regions?: GroupByRegionData[]; } diff --git a/src/api/reports/awsReports.ts b/src/api/reports/awsReports.ts index 544761109..fa48d31ab 100644 --- a/src/api/reports/awsReports.ts +++ b/src/api/reports/awsReports.ts @@ -6,7 +6,6 @@ import { Report, ReportData, ReportItem, ReportItemValue, ReportMeta, ReportType export interface AwsReportItem extends ReportItem { account?: string; account_alias?: string; - instance_type?: string; org_unit_id?: string; region?: string; service?: string; @@ -24,13 +23,8 @@ export interface GroupByServiceData extends Omit { service: string; } -export interface GroupByInstanceTypeData extends Omit { - instance_type: string; -} - export interface AwsReportData extends ReportData { accounts?: GroupByAccountData[]; - instance_types?: GroupByInstanceTypeData[]; regions?: GroupByRegionData[]; services?: GroupByServiceData[]; } diff --git a/src/api/reports/azureOcpReports.ts b/src/api/reports/azureOcpReports.ts index c82a5b449..a945c505f 100644 --- a/src/api/reports/azureOcpReports.ts +++ b/src/api/reports/azureOcpReports.ts @@ -4,7 +4,6 @@ import { Omit } from 'react-redux'; import { Report, ReportData, ReportItem, ReportItemValue, ReportMeta, ReportType, ReportValue } from './report'; export interface AzureOcpReportItem extends ReportItem { - instance_type?: string; resource_location?: string; service_name?: string; subscription_guid?: string; @@ -22,12 +21,7 @@ export interface GroupByRegionData extends Omit { - instance_type: string; -} - export interface AzureOcpReportData extends ReportData { - instance_types?: GroupByInstanceTypeData[]; resource_locations?: GroupByRegionData[]; service_names?: GroupByServiceData[]; subscription_guids?: GroupByAccountData[]; diff --git a/src/api/reports/azureReports.ts b/src/api/reports/azureReports.ts index 86f3a85e6..20f09ae0f 100644 --- a/src/api/reports/azureReports.ts +++ b/src/api/reports/azureReports.ts @@ -5,7 +5,6 @@ import { ReportType } from './report'; import { Report, ReportData, ReportItem, ReportItemValue, ReportMeta, ReportValue } from './report'; export interface AzureReportItem extends ReportItem { - instance_type?: string; resource_location?: string; service_name?: string; subscription_guid?: string; @@ -23,12 +22,7 @@ export interface GroupByRegionData extends Omit { - instance_type: string; -} - export interface AzureReportData extends ReportData { - instance_types?: GroupByInstanceTypeData[]; resource_locations?: GroupByRegionData[]; service_names?: GroupByServiceData[]; subscription_guids?: GroupByAccountData[]; diff --git a/src/api/reports/explorerReports.ts b/src/api/reports/explorerReports.ts index 11fe45f73..2883ab82b 100644 --- a/src/api/reports/explorerReports.ts +++ b/src/api/reports/explorerReports.ts @@ -5,7 +5,6 @@ export interface ExplorerReportItem extends ReportItem { account_alias?: string; cluster?: string; gcp_project?: string; - instance_type?: string; node?: string; org_unit_id?: string; project?: string; diff --git a/src/api/reports/gcpOcpReports.ts b/src/api/reports/gcpOcpReports.ts index de01f4833..efc197df2 100644 --- a/src/api/reports/gcpOcpReports.ts +++ b/src/api/reports/gcpOcpReports.ts @@ -6,7 +6,6 @@ import { Report, ReportData, ReportItem, ReportItemValue, ReportMeta, ReportType export interface GcpOcpReportItem extends ReportItem { account?: string; project?: string; - instance_type?: string; region?: string; service?: string; } @@ -23,18 +22,13 @@ export interface GroupByServiceData extends Omit { service: string; } -export interface GroupByInstanceTypeData extends Omit { - instance_type: string; -} - -export interface GroupByProjectData extends Omit { +export interface GroupByProjectData extends Omit { project: string; } export interface GcpOcpReportData extends ReportData { accounts?: GroupByAccountData[]; - instance_types?: GroupByInstanceTypeData[]; - projects?: GroupByProjectData[]; + gcp_projects?: GroupByProjectData[]; regions?: GroupByRegionData[]; services?: GroupByServiceData[]; } diff --git a/src/api/reports/gcpReports.ts b/src/api/reports/gcpReports.ts index 9646a3785..abb0d38a3 100644 --- a/src/api/reports/gcpReports.ts +++ b/src/api/reports/gcpReports.ts @@ -6,7 +6,6 @@ import { Report, ReportData, ReportItem, ReportItemValue, ReportMeta, ReportType export interface GcpReportItem extends ReportItem { account?: string; gcp_project?: string; - instance_type?: string; project?: string; region?: string; service?: string; @@ -28,14 +27,9 @@ export interface GroupByGcpProjectData extends Omit { - instance_type: string; -} - export interface GcpReportData extends ReportData { accounts?: GroupByAccountData[]; gcp_projects?: GroupByGcpProjectData[]; - instance_types?: GroupByInstanceTypeData[]; regions?: GroupByRegionData[]; services?: GroupByServiceData[]; } diff --git a/src/api/reports/ibmReports.ts b/src/api/reports/ibmReports.ts index 0eb0b2d60..0d5fb264a 100644 --- a/src/api/reports/ibmReports.ts +++ b/src/api/reports/ibmReports.ts @@ -6,7 +6,6 @@ import { Report, ReportData, ReportItem, ReportItemValue, ReportMeta, ReportType export interface IbmReportItem extends ReportItem { account?: string; project?: string; - instance_type?: string; region?: string; service?: string; } @@ -23,17 +22,12 @@ export interface GroupByServiceData extends Omit { service: string; } -export interface GroupByInstanceTypeData extends Omit { - instance_type: string; -} - export interface GroupByProjectData extends Omit { project: string; } export interface IbmReportData extends ReportData { accounts?: GroupByAccountData[]; - instance_types?: GroupByInstanceTypeData[]; projects?: GroupByProjectData[]; regions?: GroupByRegionData[]; services?: GroupByServiceData[]; diff --git a/src/api/reports/ocpCloudReports.ts b/src/api/reports/ocpCloudReports.ts index c9b992223..7a8127005 100644 --- a/src/api/reports/ocpCloudReports.ts +++ b/src/api/reports/ocpCloudReports.ts @@ -10,7 +10,6 @@ export interface OcpCloudReportItem extends ReportItem { capacity?: ReportValue; cluster?: string; clusters?: string[]; - instance_type?: string; limit?: ReportValue; node?: string; project?: string; @@ -27,10 +26,6 @@ export interface GroupByClusterData extends Omit service: string; } -export interface GroupByInstanceTypeData extends Omit { - instance_type: string; -} - export interface GroupByNodeData extends Omit { region: string; } @@ -50,7 +45,6 @@ export interface GroupByServiceData extends Omit export interface OcpCloudReportData extends ReportData { accounts?: GroupByAccountData[]; clusters?: GroupByClusterData[]; - instance_types?: GroupByInstanceTypeData[]; nodes?: GroupByNodeData[]; projects?: GroupByProjectData[]; regions?: GroupByRegionData[]; diff --git a/src/api/reports/ocpUsageReports.ts b/src/api/reports/ocpUsageReports.ts index b03a53674..10a8187d4 100644 --- a/src/api/reports/ocpUsageReports.ts +++ b/src/api/reports/ocpUsageReports.ts @@ -10,7 +10,6 @@ export interface OcpUsageReportItem extends ReportItem { capacity?: ReportValue; cluster?: string; clusters?: string[]; - instance_type?: string; limit?: ReportValue; node?: string; project?: string; @@ -27,10 +26,6 @@ export interface GroupByClusterData extends Omit service: string; } -export interface GroupByInstanceTypeData extends Omit { - instance_type: string; -} - export interface GroupByNodeData extends Omit { region: string; } @@ -50,7 +45,6 @@ export interface GroupByServiceData extends Omit export interface OcpUsageReportData extends ReportData { accounts?: GroupByAccountData[]; clusters?: GroupByClusterData[]; - instance_types?: GroupByInstanceTypeData[]; nodes?: GroupByNodeData[]; projects?: GroupByProjectData[]; regions?: GroupByRegionData[]; diff --git a/src/api/resources/gcpOcpResource.ts b/src/api/resources/gcpOcpResource.ts index 350196ea3..04906d9a9 100644 --- a/src/api/resources/gcpOcpResource.ts +++ b/src/api/resources/gcpOcpResource.ts @@ -4,7 +4,7 @@ import { Resource, ResourceType } from './resource'; export const ResourceTypePaths: Partial> = { [ResourceType.account]: 'resource-types/gcp-accounts/', - [ResourceType.project]: 'resource-types/gcp-projects/', + [ResourceType.gcpProject]: 'resource-types/gcp-projects/', [ResourceType.region]: 'resource-types/gcp-regions/', [ResourceType.service]: 'resource-types/gcp-services/', }; @@ -14,9 +14,9 @@ export function runResource(resourceType: ResourceType, query: string) { const path = ResourceTypePaths[resourceType]; if (insights && insights.chrome && insights.chrome.auth && insights.chrome.auth.getUser) { return insights.chrome.auth.getUser().then(() => { - return axios.get(`${path}?${query}`); + return axios.get(`${path}?openshift=true&${query}`); }); } else { - return axios.get(`${path}?${query}`); + return axios.get(`${path}?openshift=true&${query}`); } } diff --git a/src/api/resources/gcpResource.ts b/src/api/resources/gcpResource.ts index 0cdbd7f4c..1d6cd78fa 100644 --- a/src/api/resources/gcpResource.ts +++ b/src/api/resources/gcpResource.ts @@ -4,7 +4,7 @@ import { Resource, ResourceType } from './resource'; export const ResourceTypePaths: Partial> = { [ResourceType.account]: 'resource-types/gcp-accounts/', - [ResourceType.gcpProject]: 'resource-types/gcp-gcp-projects/', + [ResourceType.gcpProject]: 'resource-types/gcp-projects/', [ResourceType.region]: 'resource-types/gcp-regions/', [ResourceType.service]: 'resource-types/gcp-services/', }; diff --git a/src/components/export/export.styles.ts b/src/components/export/export.styles.ts deleted file mode 100644 index 8a9e00215..000000000 --- a/src/components/export/export.styles.ts +++ /dev/null @@ -1,14 +0,0 @@ -import global_spacer_md from '@patternfly/react-tokens/dist/js/global_spacer_md'; -import global_spacer_sm from '@patternfly/react-tokens/dist/js/global_spacer_sm'; -import React from 'react'; - -export const styles = { - exportIcon: { - marginLeft: global_spacer_md.value, - marginRight: global_spacer_sm.value, - }, - exportLink: { - display: 'flex', - alignItems: 'center', - }, -} as { [className: string]: React.CSSProperties }; diff --git a/src/components/export/exportContent.tsx b/src/components/export/exportContent.tsx deleted file mode 100644 index c8658e4ef..000000000 --- a/src/components/export/exportContent.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import React from 'react'; -import { injectIntl, WrappedComponentProps } from 'react-intl'; -import { connect } from 'react-redux'; -import { createMapStateToProps } from 'store/common'; - -// import { styles } from './export.styles'; - -interface ExportContentOwnProps { - // TBD... -} - -interface ExportContentStateProps { - // TBD... -} - -interface ExportContentDispatchProps { - // TBD... -} - -type ExportContentProps = ExportContentOwnProps & - ExportContentStateProps & - ExportContentDispatchProps & - WrappedComponentProps; - -class ExportContentBase extends React.Component { - public render() { - return Hello; - } -} - -const mapStateToProps = createMapStateToProps(() => { - return { - // TBD... - }; -}); - -const mapDispatchToProps: ExportContentDispatchProps = { - // TBD... -}; - -const ExportContent = injectIntl(connect(mapStateToProps, mapDispatchToProps)(ExportContentBase)); - -export { ExportContent }; diff --git a/src/components/export/exportLink.tsx b/src/components/export/exportLink.tsx deleted file mode 100644 index d0c74c5c0..000000000 --- a/src/components/export/exportLink.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import { Button } from '@patternfly/react-core'; -import { AngleDoubleLeftIcon } from '@patternfly/react-icons/dist/esm/icons/angle-double-left-icon'; -import messages from 'locales/messages'; -import React from 'react'; -import { injectIntl, WrappedComponentProps } from 'react-intl'; -import { connect } from 'react-redux'; -import { createMapStateToProps } from 'store/common'; -import { uiSelectors } from 'store/ui'; -import { uiActions } from 'store/ui'; - -import { styles } from './export.styles'; - -interface ExportLinkOwnProps { - // TBD... -} - -interface ExportLinkStateProps { - isOpen?: boolean; -} - -interface ExportLinkDispatchProps { - closeExportDrawer: typeof uiActions.closeExportDrawer; - openExportDrawer: typeof uiActions.openExportDrawer; -} - -type ExportLinkProps = ExportLinkOwnProps & ExportLinkStateProps & ExportLinkDispatchProps & WrappedComponentProps; - -class ExportLinkBase extends React.Component { - private handleToggle = event => { - const { closeExportDrawer, isOpen, openExportDrawer } = this.props; - - if (isOpen) { - closeExportDrawer(); - } else { - openExportDrawer(); - } - event.preventDefault(); - return false; - }; - - public render() { - const { intl } = this.props; - - return ( -
- -
- ); - } -} - -const mapStateToProps = createMapStateToProps(state => { - const isOpen = uiSelectors.selectIsExportDrawerOpen(state); - - return { - isOpen, - }; -}); - -const mapDispatchToProps: ExportLinkDispatchProps = { - closeExportDrawer: uiActions.closeExportDrawer, - openExportDrawer: uiActions.openExportDrawer, -}; - -const ExportLink = injectIntl(connect(mapStateToProps, mapDispatchToProps)(ExportLinkBase)); - -export { ExportLink }; diff --git a/src/components/export/index.ts b/src/components/export/index.ts deleted file mode 100644 index 3303601c5..000000000 --- a/src/components/export/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './exportDrawer'; -export * from './exportLink'; diff --git a/src/components/exports/exportActions.tsx b/src/components/exports/exportActions.tsx new file mode 100644 index 000000000..42b594eec --- /dev/null +++ b/src/components/exports/exportActions.tsx @@ -0,0 +1,76 @@ +import { Dropdown, DropdownItem, KebabToggle } from '@patternfly/react-core'; +import messages from 'locales/messages'; +import React from 'react'; +import { injectIntl, WrappedComponentProps } from 'react-intl'; + +interface ExportsActionsOwnProps extends WrappedComponentProps { + isDisabled?: boolean; + onDelete(); +} + +interface ExportsActionsState { + isDropdownOpen: boolean; +} + +type ExportsActionsProps = ExportsActionsOwnProps; + +class ExportsActionsBase extends React.Component { + protected defaultState: ExportsActionsState = { + isDropdownOpen: false, + }; + public state: ExportsActionsState = { ...this.defaultState }; + + constructor(stateProps, dispatchProps) { + super(stateProps, dispatchProps); + this.handleOnDelete = this.handleOnDelete.bind(this); + this.handleOnToggle = this.handleOnToggle.bind(this); + this.handleOnSelect = this.handleOnSelect.bind(this); + } + + public handleOnDelete = () => { + const { onDelete } = this.props; + + if (onDelete) { + onDelete(); + } + }; + + public handleOnSelect = () => { + const { isDropdownOpen } = this.state; + this.setState({ + isDropdownOpen: !isDropdownOpen, + }); + }; + + public handleOnToggle = (isDropdownOpen: boolean) => { + this.setState({ isDropdownOpen }); + }; + + public render() { + const { isDisabled, intl } = this.props; + const { isDropdownOpen } = this.state; + + const items = [ + + {intl.formatMessage(messages.Delete)} + , + ]; + + return ( + <> + } + isOpen={isDropdownOpen} + isPlain + position="right" + dropdownItems={items} + /> + + ); + } +} + +const ExportsActions = injectIntl(ExportsActionsBase); + +export { ExportsActions }; diff --git a/src/components/export/export.scss b/src/components/exports/exports.scss similarity index 100% rename from src/components/export/export.scss rename to src/components/exports/exports.scss diff --git a/src/components/exports/exports.styles.ts b/src/components/exports/exports.styles.ts new file mode 100644 index 000000000..0b67aa715 --- /dev/null +++ b/src/components/exports/exports.styles.ts @@ -0,0 +1,30 @@ +import global_BackgroundColor_light_100 from '@patternfly/react-tokens/dist/js/global_BackgroundColor_light_100'; +import global_spacer_lg from '@patternfly/react-tokens/dist/js/global_spacer_lg'; +import global_spacer_md from '@patternfly/react-tokens/dist/js/global_spacer_md'; +import global_spacer_sm from '@patternfly/react-tokens/dist/js/global_spacer_sm'; +import React from 'react'; + +export const styles = { + content: { + paddingBottom: global_spacer_lg.value, + paddingTop: global_spacer_lg.value, + }, + exportsIcon: { + marginLeft: global_spacer_md.value, + marginRight: global_spacer_sm.value, + }, + exportsLink: { + display: 'flex', + alignItems: 'center', + }, + pagination: { + backgroundColor: global_BackgroundColor_light_100.value, + paddingBottom: global_spacer_md.value, + paddingTop: global_spacer_md.value, + }, + toolbarContainer: { + backgroundColor: global_BackgroundColor_light_100.value, + paddingBottom: global_spacer_md.value, + paddingTop: global_spacer_md.value, + }, +} as { [className: string]: React.CSSProperties }; diff --git a/src/components/exports/exportsContent.tsx b/src/components/exports/exportsContent.tsx new file mode 100644 index 000000000..24a0742de --- /dev/null +++ b/src/components/exports/exportsContent.tsx @@ -0,0 +1,274 @@ +import { Pagination, PaginationVariant } from '@patternfly/react-core'; +import { getQuery, Query } from 'api/queries/query'; +import { Report, ReportPathsType, ReportType } from 'api/reports/report'; +import { AxiosError } from 'axios'; +import messages from 'locales/messages'; +import Loading from 'pages/state/loading'; +import { addQueryFilter, removeQueryFilter } from 'pages/views/utils/query'; +import React from 'react'; +import { injectIntl, WrappedComponentProps } from 'react-intl'; +import { connect } from 'react-redux'; +import { createMapStateToProps, FetchStatus } from 'store/common'; +import { reportActions, reportSelectors } from 'store/reports'; + +import { styles } from './exports.styles'; +import { ExportsTable } from './exportsTable'; +import { ExportsToolbar } from './exportsToolbar'; + +interface ExportsContentOwnProps { + // TBD... +} + +interface ExportsContentStateProps { + report: Report; + reportError: AxiosError; + reportFetchStatus: FetchStatus; +} + +interface ExportsContentDispatchProps { + // TBD... +} + +interface ExportsContentState { + query?: Query; +} + +type ExportsContentProps = ExportsContentOwnProps & + ExportsContentStateProps & + ExportsContentDispatchProps & + WrappedComponentProps; + +const baseQuery: Query = { + filter: { + limit: 10, + offset: 0, + }, + order_by: { + name: 'desc', + }, +}; + +class ExportsContentBase extends React.Component { + protected defaultState: ExportsContentState = { + query: baseQuery, + }; + public state: ExportsContentState = { ...this.defaultState }; + + private getPagination = (isBottom: boolean = false) => { + const { report } = this.props; + + const count = report && report.meta ? report.meta.count : 0; + const limit = + report && report.meta && report.meta.filter && report.meta.filter.limit + ? report.meta.filter.limit + : baseQuery.filter.limit; + const offset = + report && report.meta && report.meta.filter && report.meta.filter.offset + ? report.meta.filter.offset + : baseQuery.filter.offset; + const page = offset / limit + 1; + + return ( + + ); + }; + + private getTable = () => { + const { report, reportFetchStatus } = this.props; + const { query } = this.state; + + return ( + + ); + }; + + private handleFilterAdded = (filterType: string, filterValue: string) => { + const { query } = this.state; + + const filteredQuery = addQueryFilter(query, filterType, filterValue); + this.setState({ query: filteredQuery }, () => { + // Fetch + }); + }; + + private handleFilterRemoved = (filterType: string, filterValue: string) => { + const { query } = this.state; + + const filteredQuery = removeQueryFilter(query, filterType, filterValue); + + this.setState({ query: filteredQuery }, () => { + // Fetch + }); + }; + + private handlePerPageSelect = (_event, perPage) => { + const { query } = this.state; + + const newQuery = { ...JSON.parse(JSON.stringify(query)) }; + newQuery.filter = { + ...query.filter, + limit: perPage, + }; + + this.setState({ query: newQuery }, () => { + // Fetch + }); + }; + + private handleSetPage = (event, pageNumber) => { + const { report } = this.props; + const { query } = this.state; + + const limit = + report && report.meta && report.meta.filter && report.meta.filter.limit + ? report.meta.filter.limit + : baseQuery.filter.limit; + const offset = pageNumber * limit - limit; + + const newQuery = { ...JSON.parse(JSON.stringify(query)) }; + newQuery.filter = { + ...query.filter, + offset, + }; + + this.setState({ query: newQuery }, () => { + // Fetch + }); + }; + + private handleSort = (sortType: string, isSortAscending: boolean) => { + const { query } = this.state; + + const newQuery = { ...JSON.parse(JSON.stringify(query)) }; + newQuery.order_by = {}; + newQuery.order_by[sortType] = isSortAscending ? 'asc' : 'desc'; + + this.setState({ query: newQuery }, () => { + // Fetch + }); + }; + + public render() { + const { intl, reportFetchStatus } = this.props; + + return ( + <> + {intl.formatMessage(messages.ExportsDesc)} +
+ + {reportFetchStatus === FetchStatus.inProgress ? ( + + ) : ( + <> +
{this.getTable()}
+
{this.getPagination(true)}
+ + )} +
+ + ); + } +} + +const mapStateToProps = createMapStateToProps(state => { + const query = { + filter: { + ...baseQuery.filter, + }, + filter_by: baseQuery.filter_by, + order_by: baseQuery.order_by, + }; + + // Todo: Temp report until APIs are available + const reportType = ReportType.cost; + const reportPathsType = ReportPathsType.ocp; + + const queryString = getQuery(query); + // const report = reportSelectors.selectReport(state, reportPathsType, reportType, queryString); + const reportError = reportSelectors.selectReportError(state, reportPathsType, reportType, queryString); + const reportFetchStatus = reportSelectors.selectReportFetchStatus(state, reportPathsType, reportType, queryString); + + // Todo: For testing + const report = { + meta: { + count: 11, + filter: { + limit: 10, + offset: 0, + }, + order_by: { + cost_total: 'desc', + }, + }, + data: [ + { + name: 'OpenShift grouped by Project', + created: '2022-01-17 13:25:07', + expires: '2022-01-24', + status: 'pending', + }, + { + name: 'Amazon Web Services grouped by Account', + created: '2022-01-17 13:24:23', + expires: '2022-01-24', + status: 'running', + }, + { + name: 'OpenShift grouped by Cluster', + created: '2022-01-16 13:23:08', + expires: '2022-01-23', + status: 'completed', + }, + { + name: 'Microsoft Azure grouped by Account', + created: '2022-01-16 13:18:22', + expires: '2022-01-23', + status: 'failed', + }, + { + name: 'Google Cloud Platform grouped by Service', + created: '2022-01-14 09:05:23', + expires: '2022-01-23', + status: 'completed', + }, + { + name: 'Explorer - OpenShift grouped by Cluster', + created: '2022-01-14 08:38:42', + expires: '2022-01-23', + status: 'completed', + }, + ], + } as any; + + return { + report, + reportError, + reportFetchStatus, + }; +}); + +const mapDispatchToProps: ExportsContentDispatchProps = { + fetchReport: reportActions.fetchReport, +}; + +const ExportsContent = injectIntl(connect(mapStateToProps, mapDispatchToProps)(ExportsContentBase)); + +export { ExportsContent }; diff --git a/src/components/export/exportDrawer.tsx b/src/components/exports/exportsDrawer.tsx similarity index 63% rename from src/components/export/exportDrawer.tsx rename to src/components/exports/exportsDrawer.tsx index 9e606d9c8..c2712df06 100644 --- a/src/components/export/exportDrawer.tsx +++ b/src/components/exports/exportsDrawer.tsx @@ -1,4 +1,4 @@ -import './export.scss'; +import './exports.scss'; import { Drawer, @@ -18,29 +18,29 @@ import { connect } from 'react-redux'; import { createMapStateToProps } from 'store/common'; import { uiActions, uiSelectors } from 'store/ui'; -import { ExportContent } from './exportContent'; +import { ExportsContent } from './exportsContent'; -interface ExportDrawerOwnProps { +interface ExportsDrawerOwnProps { children?: React.ReactNode; } -interface ExportDrawerStateProps { +interface ExportsDrawerStateProps { isOpen: boolean; } -interface ExportDrawerDispatchProps { - closeExportDrawer: typeof uiActions.closeExportDrawer; +interface ExportsDrawerDispatchProps { + closeExportsDrawer: typeof uiActions.closeExportsDrawer; } -type ExportDrawerProps = ExportDrawerOwnProps & - ExportDrawerStateProps & - ExportDrawerDispatchProps & +type ExportsDrawerProps = ExportsDrawerOwnProps & + ExportsDrawerStateProps & + ExportsDrawerDispatchProps & WrappedComponentProps; -class ExportDrawerBase extends React.Component { +class ExportsDrawerBase extends React.Component { private drawerRef = React.createRef(); - constructor(props: ExportDrawerProps) { + constructor(props: ExportsDrawerProps) { super(props); this.handleClose = this.handleClose.bind(this); } @@ -50,7 +50,7 @@ class ExportDrawerBase extends React.Component { } // eslint-disable-next-line @typescript-eslint/no-unused-vars - public componentDidUpdate(prevProps: ExportDrawerProps) { + public componentDidUpdate(prevProps: ExportsDrawerProps) { // TBD... } @@ -58,13 +58,13 @@ class ExportDrawerBase extends React.Component { const { intl, isOpen } = this.props; return ( - + {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ /* @ts-ignore */} - {intl.formatMessage(messages.ExportAllExports)} + {intl.formatMessage(messages.ExportsTitle)} @@ -72,16 +72,16 @@ class ExportDrawerBase extends React.Component { - + ); }; private handleClose = () => { - const { closeExportDrawer } = this.props; + const { closeExportsDrawer } = this.props; - closeExportDrawer(); + closeExportsDrawer(); }; private handleExpand = () => { @@ -101,18 +101,18 @@ class ExportDrawerBase extends React.Component { } } -const mapStateToProps = createMapStateToProps(state => { - const isOpen = uiSelectors.selectIsExportDrawerOpen(state); +const mapStateToProps = createMapStateToProps(state => { + const isOpen = uiSelectors.selectIsExportsDrawerOpen(state); return { isOpen, }; }); -const mapDispatchToProps: ExportDrawerDispatchProps = { - closeExportDrawer: uiActions.closeExportDrawer, +const mapDispatchToProps: ExportsDrawerDispatchProps = { + closeExportsDrawer: uiActions.closeExportsDrawer, }; -const ExportDrawer = injectIntl(connect(mapStateToProps, mapDispatchToProps)(ExportDrawerBase)); +const ExportsDrawer = injectIntl(connect(mapStateToProps, mapDispatchToProps)(ExportsDrawerBase)); -export { ExportDrawer }; +export { ExportsDrawer }; diff --git a/src/components/exports/exportsLink.tsx b/src/components/exports/exportsLink.tsx new file mode 100644 index 000000000..dd83a4e1b --- /dev/null +++ b/src/components/exports/exportsLink.tsx @@ -0,0 +1,85 @@ +import { AlertActionLink, Button } from '@patternfly/react-core'; +import { AngleDoubleLeftIcon } from '@patternfly/react-icons/dist/esm/icons/angle-double-left-icon'; +import messages from 'locales/messages'; +import React from 'react'; +import { injectIntl, WrappedComponentProps } from 'react-intl'; +import { connect } from 'react-redux'; +import { createMapStateToProps } from 'store/common'; +import { uiSelectors } from 'store/ui'; +import { uiActions } from 'store/ui'; + +import { styles } from './exports.styles'; + +interface ExportsLinkOwnProps { + isActionLink?: boolean; + onClick?: (isOpen: boolean) => void; +} + +interface ExportsLinkStateProps { + isOpen?: boolean; +} + +interface ExportsLinkDispatchProps { + closeExportDrawer: typeof uiActions.closeExportsDrawer; + openExportDrawer: typeof uiActions.openExportsDrawer; +} + +type ExportsLinkProps = ExportsLinkOwnProps & ExportsLinkStateProps & ExportsLinkDispatchProps & WrappedComponentProps; + +class ExportsLinkBase extends React.Component { + private handleToggle = event => { + const { closeExportDrawer, isOpen, onClick, openExportDrawer } = this.props; + + if (isOpen) { + closeExportDrawer(); + } else { + openExportDrawer(); + } + event.preventDefault(); + + if (onClick) { + onClick(isOpen); + } + return false; + }; + + public render() { + const { intl, isActionLink } = this.props; + + // @redhat-cloud-services/frontend-components-notifications does not expose PatternFly's actionLinks prop + if (isActionLink) { + return ( +
+ {intl.formatMessage(messages.ExportsTitle)} +
+ ); + } + return ( +
+ +
+ ); + } +} + +const mapStateToProps = createMapStateToProps(state => { + const isOpen = uiSelectors.selectIsExportsDrawerOpen(state); + + return { + isOpen, + }; +}); + +const mapDispatchToProps: ExportsLinkDispatchProps = { + closeExportDrawer: uiActions.closeExportsDrawer, + openExportDrawer: uiActions.openExportsDrawer, +}; + +const ExportsLink = injectIntl(connect(mapStateToProps, mapDispatchToProps)(ExportsLinkBase)); + +export { ExportsLink }; diff --git a/src/components/exports/exportsTable.styles.ts b/src/components/exports/exportsTable.styles.ts new file mode 100644 index 000000000..bf4d46b39 --- /dev/null +++ b/src/components/exports/exportsTable.styles.ts @@ -0,0 +1,27 @@ +import global_BackgroundColor_light_100 from '@patternfly/react-tokens/dist/js/global_BackgroundColor_light_100'; +import global_danger_color_200 from '@patternfly/react-tokens/dist/js/global_danger_color_200'; +import global_FontSize_sm from '@patternfly/react-tokens/dist/js/global_FontSize_sm'; +import global_spacer_3xl from '@patternfly/react-tokens/dist/js/global_spacer_3xl'; +import global_spacer_md from '@patternfly/react-tokens/dist/js/global_spacer_md'; +import React from 'react'; + +export const styles = { + emptyState: { + backgroundColor: global_BackgroundColor_light_100.value, + display: 'flex', + justifyContent: 'center', + paddingTop: global_spacer_3xl.value, + height: '35vh', + width: '100%', + }, + failed: { + color: global_danger_color_200.value, + }, + failedButton: { + fontSize: global_FontSize_sm.value, + marginLeft: '-10px', + }, + failedHeader: { + marginLeft: global_spacer_md.value, + }, +} as { [className: string]: React.CSSProperties }; diff --git a/src/components/exports/exportsTable.tsx b/src/components/exports/exportsTable.tsx new file mode 100644 index 000000000..f4e567664 --- /dev/null +++ b/src/components/exports/exportsTable.tsx @@ -0,0 +1,300 @@ +import { + Bullseye, + Button, + ButtonVariant, + EmptyState, + EmptyStateBody, + EmptyStateIcon, + Label, + Popover, + Spinner, +} from '@patternfly/react-core'; +import { CalculatorIcon } from '@patternfly/react-icons/dist/esm/icons/calculator-icon'; +import { DownloadIcon } from '@patternfly/react-icons/dist/esm/icons/download-icon'; +import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; +import { OutlinedClockIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-clock-icon'; +import { SyncIcon } from '@patternfly/react-icons/dist/esm/icons/sync-icon'; +import { sortable, SortByDirection, Table, TableBody, TableHeader, TableVariant } from '@patternfly/react-table'; +import { getQuery, Query } from 'api/queries/query'; +import { Report } from 'api/reports/report'; +import messages from 'locales/messages'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; +import React from 'react'; +import { injectIntl, WrappedComponentProps } from 'react-intl'; + +import { ExportsActions } from './exportActions'; +import { styles } from './exportsTable.styles'; + +interface ExportsTableOwnProps { + isLoading?: boolean; + onSort(value: string, isSortAscending: boolean); + query: Query; + report: Report; +} + +interface ExportsTableState { + columns?: any[]; + loadingRows?: any[]; + rows?: any[]; +} + +type ExportsTableProps = ExportsTableOwnProps & WrappedComponentProps; + +export const ExportsTableColumnIds = { + actions: 'actions', + created: 'created', + expires: 'expires', + names: 'names', + status: 'status', +}; + +class ExportsTableBase extends React.Component { + public state: ExportsTableState = { + columns: [], + rows: [], + }; + + constructor(props: ExportsTableProps) { + super(props); + this.handleOnSort = this.handleOnSort.bind(this); + } + + public componentDidMount() { + this.initDatum(); + } + + public componentDidUpdate(prevProps: ExportsTableProps) { + const { query, report } = this.props; + const currentReport = report && report.data ? JSON.stringify(report.data) : ''; + const previousReport = prevProps.report && prevProps.report.data ? JSON.stringify(prevProps.report.data) : ''; + + if (getQuery(prevProps.query) !== getQuery(query) || previousReport !== currentReport) { + this.initDatum(); + } + } + + private initDatum = () => { + const { query, report, intl } = this.props; + if (!query || !report) { + return; + } + + const rows = []; + const isSortable = report.data.length > 0; + + const columns = [ + { + id: ExportsTableColumnIds.names, + orderBy: 'name', + title: intl.formatMessage(messages.Names, { count: 1 }), + ...(isSortable && { transforms: [sortable] }), + }, + { + id: ExportsTableColumnIds.created, + orderBy: 'created', + title: intl.formatMessage(messages.TimeOfExport), + ...(isSortable && { transforms: [sortable] }), + }, + { + id: ExportsTableColumnIds.expires, + orderBy: 'expires', + title: intl.formatMessage(messages.ExpiresOn), + ...(isSortable && { transforms: [sortable] }), + }, + { + id: ExportsTableColumnIds.status, + title: intl.formatMessage(messages.StatusActions), + }, + { + id: ExportsTableColumnIds.actions, + title: '', + }, + ]; + + if (report.data.length) { + report.data.map((item: any) => { + rows.push({ + cells: [ + { title:
{item.name}
, id: ExportsTableColumnIds.names }, + { title:
{item.created}
, id: ExportsTableColumnIds.created }, + { title:
{item.expires}
, id: ExportsTableColumnIds.expires }, + { title: this.getStatus(item.status), id: ExportsTableColumnIds.status }, + { title: , id: ExportsTableColumnIds.actions }, + ], + item, + }); + }); + } + + const loadingRows = [ + { + heightAuto: true, + cells: [ + { + props: { colSpan: 7 }, + title: ( + +
+ +
+
+ ), + }, + ], + }, + ]; + + this.setState({ + columns, + loadingRows, + rows, + sortBy: {}, + }); + }; + + private getEmptyState = () => { + const { query, intl } = this.props; + + if (query.filter_by) { + for (const val of Object.values(query.filter_by)) { + if (val !== '*') { + return ; + } + } + } + + return ( + + + {intl.formatMessage(messages.DetailsEmptyState)} + + ); + }; + + private getSortBy = () => { + const { query } = this.props; + const { columns } = this.state; + + let index = -1; + let direction: any = SortByDirection.asc; + + for (const key of Object.keys(query.order_by)) { + let c = 0; + for (const column of columns) { + if (column.orderBy === key) { + direction = query.order_by[key] === 'asc' ? SortByDirection.asc : SortByDirection.desc; + index = c; + break; + } + c++; + } + } + return index > -1 ? { index, direction } : {}; + }; + + private getStatus = (status: string) => { + const { intl } = this.props; + + switch (status) { + case 'completed': + return ( + + ); + case 'failed': + return ( + + ); + break; + case 'running': + return ( + + ); + case 'pending': + default: + return ( + + ); + } + }; + + private handleOnDelete = () => { + // eslint-disable-next-line no-console + console.log('handleDelete clicked'); + }; + + private handleOnDownload = () => { + // eslint-disable-next-line no-console + console.log('handleOnDownload clicked'); + }; + + private handleOnSort = (event, index, direction) => { + const { onSort } = this.props; + const { columns } = this.state; + + if (onSort) { + const orderBy = columns[index - 1].orderBy; + const isSortAscending = direction === SortByDirection.asc; + onSort(orderBy, isSortAscending); + } + }; + + public render() { + const { intl, isLoading } = this.props; + const { columns, loadingRows, rows } = this.state; + + return ( + <> + + + +
+ {Boolean(rows.length === 0) &&
{this.getEmptyState()}
} + + ); + } +} + +const ExportsTable = injectIntl(ExportsTableBase); + +export { ExportsTable, ExportsTableProps }; diff --git a/src/components/exports/exportsToolbar.tsx b/src/components/exports/exportsToolbar.tsx new file mode 100644 index 000000000..7cec5b7dc --- /dev/null +++ b/src/components/exports/exportsToolbar.tsx @@ -0,0 +1,66 @@ +import { ToolbarChipGroup } from '@patternfly/react-core'; +import { Query } from 'api/queries/query'; +import messages from 'locales/messages'; +import { DataToolbar } from 'pages/views/components/dataToolbar/dataToolbar'; +import React from 'react'; +import { injectIntl, WrappedComponentProps } from 'react-intl'; +import { connect } from 'react-redux'; +import { createMapStateToProps } from 'store/common'; + +import { styles } from './exports.styles'; + +interface ExportsToolbarOwnProps { + onFilterAdded(filterType: string, filterValue: string); + onFilterRemoved(filterType: string, filterValue?: string); + pagination?: React.ReactNode; + query?: Query; +} + +interface ExportsToolbarStateProps { + // TDB... +} + +interface ExportsToolbarDispatchProps { + // TDB... +} + +type ExportsToolbarProps = ExportsToolbarOwnProps & + ExportsToolbarStateProps & + ExportsToolbarDispatchProps & + WrappedComponentProps; + +export class ExportsToolbarBase extends React.Component { + private getCategoryOptions = (): ToolbarChipGroup[] => { + const { intl } = this.props; + + return [{ name: intl.formatMessage(messages.FilterByValues, { value: 'name' }), key: 'name' }]; + }; + + public render() { + const { onFilterAdded, onFilterRemoved, pagination, query } = this.props; + + return ( + + ); + } +} + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const mapStateToProps = createMapStateToProps((state, props) => { + return {}; +}); + +const mapDispatchToProps: ExportsToolbarDispatchProps = {}; + +const ExportsToolbarConnect = connect(mapStateToProps, mapDispatchToProps)(ExportsToolbarBase); +const ExportsToolbar = injectIntl(ExportsToolbarConnect); + +export { ExportsToolbar, ExportsToolbarProps }; diff --git a/src/components/exports/index.ts b/src/components/exports/index.ts new file mode 100644 index 000000000..06187207f --- /dev/null +++ b/src/components/exports/index.ts @@ -0,0 +1,2 @@ +export * from './exportsDrawer'; +export * from './exportsLink'; diff --git a/src/components/permissions/permissionsWrapper.tsx b/src/components/permissions/permissionsWrapper.tsx index 2cedb9e30..626c23e95 100644 --- a/src/components/permissions/permissionsWrapper.tsx +++ b/src/components/permissions/permissionsWrapper.tsx @@ -5,7 +5,7 @@ import { getUserAccessQuery } from 'api/queries/userAccessQuery'; import { UserAccess, UserAccessType } from 'api/userAccess'; import { AxiosError } from 'axios'; import { asyncComponent } from 'components/async'; -import { ExportDrawer } from 'components/export'; +import { ExportsDrawer } from 'components/exports'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { connect } from 'react-redux'; @@ -76,10 +76,10 @@ class PermissionsWrapperBase extends React.Component { {userAccessFetchStatus === FetchStatus.complete && ( {providersFetchStatus === FetchStatus.complete && ( - + {accountSettingsFetchStatus === FetchStatus.complete && children} - + )} )} diff --git a/src/locales/messages.ts b/src/locales/messages.ts index 85218ae5b..b9f86f2a8 100644 --- a/src/locales/messages.ts +++ b/src/locales/messages.ts @@ -103,7 +103,6 @@ export default defineMessages({ 'account {Back to {value} account details} ' + 'cluster {Back to {value} cluster details} ' + 'gcp_project {Back to {value} GCP project details} ' + - 'instance_type {Back to {value} instance type details} ' + 'node {Back to {value} node details} ' + 'org_unit_id {Back to {value} organizational unit details} ' + 'project {Back to {value} project details} ' + @@ -170,7 +169,6 @@ export default defineMessages({ 'account {Cost by accounts} ' + 'cluster {Cost by clusters} ' + 'gcp_project {Cost by GCP projects} ' + - 'instance_type {Cost by instance types} ' + 'node {Cost by Node} ' + 'org_unit_id {Cost by organizational units} ' + 'project {Cost by projects} ' + @@ -1375,7 +1373,6 @@ export default defineMessages({ 'account {account {name} clusters} ' + 'cluster {cluster {name} clusters} ' + 'gcp_project {GCP project {name} clusters} ' + - 'instance_type {instance type {name} clusters} ' + 'node {node {name} clusters} ' + 'org_unit_id {organizational unit {name} clusters} ' + 'project {project {name} clusters} ' + @@ -1415,7 +1412,6 @@ export default defineMessages({ 'account {Account names} ' + 'cluster {Cluster names} ' + 'gcp_project {GCP project names} ' + - 'instance_type {Instance type names} ' + 'node {Node names} ' + 'org_unit_id {Organizational unit names} ' + 'project {Project names} ' + @@ -1435,7 +1431,6 @@ export default defineMessages({ 'account {{name} accounts} ' + 'cluster {{name} clusters} ' + 'gcp_project {{name} GCP projects} ' + - 'instance_type {{name} instance types} ' + 'node {{name} nodes} ' + 'org_unit_id {{name} organizational units} ' + 'project {{name} projects} ' + @@ -1490,7 +1485,6 @@ export default defineMessages({ 'account {View all accounts} ' + 'cluster {View all clusters} ' + 'gcp_project {View all GCP projects} ' + - 'instance_type {View all instance types} ' + 'node {View all nodes} ' + 'org_unit_id {View all organizational units} ' + 'project {View all projects} ' + @@ -1549,6 +1543,11 @@ export default defineMessages({ 'https://access.redhat.com/documentation/en-us/cost_management_service/2021/html-single/using_cost_models', id: 'DocsUsingCostModels', }, + Download: { + defaultMessage: 'Download', + description: 'download', + id: 'Download', + }, Edit: { defaultMessage: 'Edit', description: 'Edit', @@ -1614,6 +1613,11 @@ export default defineMessages({ description: 'Examples', id: 'ExamplesTitle', }, + ExpiresOn: { + defaultMessage: 'Expires on', + description: 'Expires on', + id: 'ExpiresOn', + }, ExplorerChartDate: { defaultMessage: '{month, select, ' + @@ -1678,8 +1682,8 @@ export default defineMessages({ id: 'ExplorerTitle', }, ExportAggregateType: { - defaultMessage: 'Select aggregate type', - description: 'Export aggregate type', + defaultMessage: 'Aggregate type', + description: 'Aggregate type', id: 'ExportAggregateType', }, ExportAll: { @@ -1687,15 +1691,11 @@ export default defineMessages({ description: 'Export all', id: 'ExportAll', }, - ExportAllExports: { - defaultMessage: 'All exports', - description: 'All exports', - id: 'ExportAllExports', - }, - ExportDownload: { - defaultMessage: 'Generate and download', - description: 'Export download', - id: 'ExportDownload', + ExportDesc: { + defaultMessage: + 'The active selections from the table plus the values here will be used to generate an export file. When the file is available, download it from the {value} view.', + description: 'Export description', + id: 'ExportAll', }, ExportError: { defaultMessage: 'Something went wrong, please try fewer selections', @@ -1708,7 +1708,6 @@ export default defineMessages({ 'account {{resolution, select, daily {{provider}_accounts_daily_{startDate}_{endDate}} monthly {{provider}_accounts_monthly_{startDate}_{endDate}} other {}}} ' + 'cluster {{resolution, select, daily {{provider}_clusters_daily_{startDate}_{endDate}} monthly {{provider}_clusters_monthly_{startDate}_{endDate}} other {}}} ' + 'gcp_project {{resolution, select, daily {{provider}_gcp-projects_daily_{startDate}_{endDate}} monthly {{provider}_gcp-projects_monthly_{startDate}_{endDate}} other {}}} ' + - 'instance_type {{resolution, select, daily {{provider}_instances_daily_{startDate}_{endDate}} monthly {{provider}_instances_monthly_{startDate}_{endDate}} other {}}} ' + 'node {{resolution, select, daily {{provider}_node_daily_{startDate}_{endDate}} monthly {{provider}_node_monthly_{startDate}_{endDate}} other {}}} ' + 'org_unit_id {{resolution, select, daily {{provider}_orgs_daily_{startDate}_{endDate}} monthly {{provider}_orgs_monthly_{startDate}_{endDate}} other {}}} ' + 'project {{resolution, select, daily {{provider}_projects_daily_{startDate}_{endDate}} monthly {{provider}_projects_monthly_{startDate}_{endDate}} other {}}} ' + @@ -1722,13 +1721,27 @@ export default defineMessages({ description: 'Export file name', id: 'ExportFileName', }, + ExportFormatType: { + defaultMessage: '{value, select, csv {CSV} json {JSON} other {}}', + description: 'Export format type', + id: 'ExportFormatType', + }, + ExportFormatTypeTitle: { + defaultMessage: 'Format type', + description: 'Format type', + id: 'ExportFormatTypeTitle', + }, + ExportGenerate: { + defaultMessage: 'Generate export', + description: 'Export export', + id: 'ExportGenerate', + }, ExportHeading: { defaultMessage: '{groupBy, select, ' + 'account {Aggregates of the following accounts will be exported to a .csv file.} ' + 'cluster {Aggregates of the following clusters will be exported to a .csv file.} ' + 'gcp_project {Aggregates of the following GCP projects will be exported to a .csv file.} ' + - 'instance_type {Aggregates of the following instance types will be exported to a .csv file.} ' + 'node {Aggregates of the following nodes will be exported to a .csv file.} ' + 'org_unit_id {Aggregates of the following organizational units will be exported to a .csv file.} ' + 'project {Aggregates of the following projects will be exported to a .csv file.} ' + @@ -1742,6 +1755,35 @@ export default defineMessages({ description: 'Export heading', id: 'ExportHeading', }, + ExportName: { + defaultMessage: + '{groupBy, select, ' + + 'account {{provider, select, aws {Amazon Web Services grouped by Account} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Account} azure {Microsoft Azure grouped by Account} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Account} gcp {Google Cloud Platform grouped by Account} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Account} ibm {IBM Cloud grouped by Account} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Account} ocp {OpenShift grouped by Account} ocp_cloud {All cloud filtered by OpenShift grouped by Account} other {}}} ' + + 'cluster {{provider, select, aws {Amazon Web Services grouped by Cluster} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Cluster} azure {Microsoft Azure grouped by Cluster} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Cluster} gcp {Google Cloud Platform grouped by Cluster} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Cluster} ibm {IBM Cloud grouped by Cluster} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Cluster} ocp {OpenShift grouped by Cluster} ocp_cloud {All cloud filtered by OpenShift grouped by Cluster} other {}}} ' + + 'gcp_project {{provider, select, aws {Amazon Web Services grouped by GCP Project} aws_ocp {Amazon Web Services filtered by OpenShift grouped by GCP Project} azure {Microsoft Azure grouped by GCP Project} azure_ocp {Microsoft Azure filtered by OpenShift grouped by GCP Project} gcp {Google Cloud Platform grouped by GCP Project} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by GCP Project} ibm {IBM Cloud grouped by GCP Project} ibm_ocp {IBM Cloud filtered by OpenShift grouped by GCP Project} ocp {OpenShift grouped by GCP Project} ocp_cloud {All cloud filtered by OpenShift grouped by GCP Project} other {}}} ' + + 'node {{provider, select, aws {Amazon Web Services grouped by Node} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Node} azure {Microsoft Azure grouped by Node} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Node} gcp {Google Cloud Platform grouped by Node} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Node} ibm {IBM Cloud grouped by Node} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Node} ocp {OpenShift grouped by Node} ocp_cloud {All cloud filtered by OpenShift grouped by Node} other {}}} ' + + 'org_unit_id {{provider, select, aws {Amazon Web Services grouped by Organizational unit} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Organizational unit} azure {Microsoft Azure grouped by Organizational unit} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Organizational unit} gcp {Google Cloud Platform grouped by Organizational unit} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Organizational unit} ibm {IBM Cloud grouped by Organizational unit} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Organizational unit} ocp {OpenShift grouped by Organizational unit} ocp_cloud {All cloud filtered by OpenShift grouped by Organizational unit} other {}}} ' + + 'project {{provider, select, aws {Amazon Web Services grouped by Project} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Project} azure {Microsoft Azure grouped by Project} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Project} gcp {Google Cloud Platform grouped by Project} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Project} ibm {IBM Cloud grouped by Project} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Project} ocp {OpenShift grouped by Project} ocp_cloud {All cloud filtered by OpenShift grouped by Project} other {}}} ' + + 'region {{provider, select, aws {Amazon Web Services grouped by Region} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Region} azure {Microsoft Azure grouped by Region} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Region} gcp {Google Cloud Platform grouped by Region} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Region} ibm {IBM Cloud grouped by Region} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Region} ocp {OpenShift grouped by Region} ocp_cloud {All cloud filtered by OpenShift grouped by Region} other {}}} ' + + 'resource_location {{provider, select, aws {Amazon Web Services grouped by Region} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Region} azure {Microsoft Azure grouped by Region} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Region} gcp {Google Cloud Platform grouped by Region} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Region} ibm {IBM Cloud grouped by Region} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Region} ocp {OpenShift grouped by Region} ocp_cloud {All cloud filtered by OpenShift grouped by Region} other {}}} ' + + 'service {{provider, select, aws {Amazon Web Services grouped by Service} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Service} azure {Microsoft Azure grouped by Service} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Service} gcp {Google Cloud Platform grouped by Service} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Service} ibm {IBM Cloud grouped by Service} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Service} ocp {OpenShift grouped by Service} ocp_cloud {All cloud filtered by OpenShift grouped by Service} other {}}} ' + + 'service_name {{provider, select, aws {Amazon Web Services grouped by Service} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Service} azure {Microsoft Azure grouped by Service} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Service} gcp {Google Cloud Platform grouped by Service} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Service} ibm {IBM Cloud grouped by Service} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Service} ocp {OpenShift grouped by Service} ocp_cloud {All cloud filtered by OpenShift grouped by Service} other {}}} ' + + 'subscription_guid {{provider, select, aws {Amazon Web Services grouped by Account} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Account} azure {Microsoft Azure grouped by Account} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Account} gcp {Google Cloud Platform grouped by Account} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Account} ibm {IBM Cloud grouped by Account} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Account} ocp {OpenShift grouped by Account} ocp_cloud {All cloud filtered by OpenShift grouped by Account} other {}}} ' + + 'tag {{provider, select, aws {Amazon Web Services grouped by Tag} aws_ocp {Amazon Web Services filtered by OpenShift grouped by Tag} azure {Microsoft Azure grouped by Tag} azure_ocp {Microsoft Azure filtered by OpenShift grouped by Tag} gcp {Google Cloud Platform grouped by Tag} gcp_ocp {Google Cloud Platform filtered by OpenShift grouped by Tag} ibm {IBM Cloud grouped by Tag} ibm_ocp {IBM Cloud filtered by OpenShift grouped by Tag} ocp {OpenShift grouped by Tag} ocp_cloud {All cloud filtered by OpenShift grouped by Tag} other {}}} ' + + 'other {}}', + description: 'Export name', + id: 'ExportName', + }, + ExportNameRequired: { + defaultMessage: 'Please enter a name for the export', + description: 'Please enter a name for the export', + id: 'ExportNameRequired', + }, + ExportNameTooLong: { + defaultMessage: 'Should not exceed 50 characters', + description: 'Should not exceed 50 characters', + id: 'ExportNameTooLong', + }, ExportResolution: { defaultMessage: '{value, select, daily {Daily} monthly {Monthly} other {}}', description: 'Export file name', @@ -1750,31 +1792,30 @@ export default defineMessages({ ExportSelected: { defaultMessage: '{groupBy, select, ' + - 'account {Selected accounts} ' + - 'cluster {Selected clusters} ' + - 'gcp_project {Selected GCP projects} ' + - 'instance_type {Selected instance types} ' + - 'node {Selected nodes} ' + - 'org_unit_id {Selected organizational units} ' + - 'project {Selected projects} ' + - 'region {Selected regions} ' + - 'resource_location {Selected regions} ' + - 'service {Selected services} ' + - 'service_name {Selected services} ' + - 'subscription_guid {Selected accounts} ' + - 'tag {Selected tags} ' + + 'account {Selected accounts ({count})} ' + + 'cluster {Selected clusters ({count})} ' + + 'gcp_project {Selected GCP projects ({count})} ' + + 'node {Selected nodes ({count})} ' + + 'org_unit_id {Selected organizational units ({count})} ' + + 'project {Selected projects ({count})} ' + + 'region {Selected regions ({count})} ' + + 'resource_location {Selected regions ({count})} ' + + 'service {Selected services ({count})} ' + + 'service_name {Selected services ({count})} ' + + 'subscription_guid {Selected accounts ({count})} ' + + 'tag {Selected tags ({count})} ' + 'other {}}', description: 'Selected items for export', id: 'ExportSelected', }, ExportTimeScope: { - defaultMessage: '{value, select, current {Current {date}} previous {Previous {date}} other {}}', + defaultMessage: '{value, select, current {Current ({date})} previous {Previous ({date})} other {}}', description: 'Export time scope', id: 'ExportTimeScope', }, ExportTimeScopeTitle: { - defaultMessage: 'Select month', - description: 'Export time scope title', + defaultMessage: 'Month', + description: 'Month', id: 'ExportTimeScopeTitle', }, ExportTitle: { @@ -1782,6 +1823,48 @@ export default defineMessages({ description: 'Export title', id: 'ExportTitle', }, + ExportsDesc: { + defaultMessage: + 'Exports are available for download from the time that they are generated up to 7 days later. After 7 days, the export file will be removed.', + description: + 'Exports are available for download from the time that they are generated up to 7 days later. After 7 days, the export file will be removed.', + id: 'ExportsDesc', + }, + ExportsFailed: { + defaultMessage: 'Could not create export file', + description: 'Export failed', + id: 'ExportsFailed', + }, + ExportsFailedDesc: { + defaultMessage: 'Something went wrong with the generation of this export file. Try exporting again.', + description: 'Export failed description', + id: 'ExportsFailedDesc', + }, + ExportsSuccess: { + defaultMessage: 'Export preparing for download', + description: 'Export success', + id: 'ExportsSuccess', + }, + ExportsSuccessDesc: { + defaultMessage: 'The export is preparing for download. It will be accessible from {value} view. {link}', + description: 'Export success description', + id: 'ExportsSuccessDesc', + }, + ExportsTableAriaLabel: { + defaultMessage: 'Available exports table', + description: 'Available exports table', + id: 'ExportsTableAriaLabel', + }, + ExportsTitle: { + defaultMessage: 'All exports', + description: 'All exports', + id: 'ExportsTitle', + }, + ExportsUnavailable: { + defaultMessage: 'Export cannot be generated', + description: 'Export cannot be generated', + id: 'ExportsUnavailable', + }, FilterByButtonAriaLabel: { defaultMessage: '{value, select, ' + @@ -1969,7 +2052,6 @@ export default defineMessages({ 'account {{count, plural, one {All account} other {All accounts}}} ' + 'cluster {{count, plural, one {All cluster} other {All clusters}}} ' + 'gcp_project {{count, plural, one {All GCP project} other {All GCP projects}}} ' + - 'instance_type {{count, plural, one {All instance type} other {All instance types}}} ' + 'node {{count, plural, one {All node} other {All nodes}}} ' + 'org_unit_id {{count, plural, one {All organizational unit} other {All organizational units}}} ' + 'project {{count, plural, one {All project} other {All projects}}} ' + @@ -1994,7 +2076,6 @@ export default defineMessages({ 'account {{count, plural, one {Top account} other {Top accounts}}} ' + 'cluster {{count, plural, one {Top cluster} other {Top clusters}}} ' + 'gcp_project {{count, plural, one {Top GCP project} other {Top GCP projects}}} ' + - 'instance_type {{count, plural, one {Top instance type} other {Top instance types}}} ' + 'node {{count, plural, one {Top node} other {Top node}}} ' + 'org_unit_id {{count, plural, one {Top organizational unit} other {Top organizational units}}} ' + 'project {{count, plural, one {Top project} other {Top projects}}} ' + @@ -2014,7 +2095,6 @@ export default defineMessages({ 'account {Account names} ' + 'cluster {Cluster names} ' + 'gcp_project {GCP project names} ' + - 'instance_type {Instance type names} ' + 'node {Node names} ' + 'org_unit_id {Organizational unit names} ' + 'project {Project names} ' + @@ -2034,7 +2114,6 @@ export default defineMessages({ 'account {{count, plural, one {account} other {accounts}}} ' + 'cluster {{count, plural, one {cluster} other {clusters}}} ' + 'gcp_project {{count, plural, one {GCP project} other {GCP projects}}} ' + - 'instance_type {{count, plural, one {instance type} other {instance types}}} ' + 'node {{count, plural, one {node} other {node}}} ' + 'org_unit_id {{count, plural, one {organizational unit} other {organizational units}}} ' + 'project {{count, plural, one {project} other {projects}}} ' + @@ -2054,7 +2133,6 @@ export default defineMessages({ 'account {{count, plural, one {Account} other {Accounts}}} ' + 'cluster {{count, plural, one {Cluster} other {Clusters}}} ' + 'gcp_project {{count, plural, one {GCP project} other {GCP projects}}} ' + - 'instance_type {{count, plural, one {Instance type} other {Instance types}}} ' + 'node {{count, plural, one {Node} other {Node}}} ' + 'org_unit_id {{count, plural, one {Organizational unit} other {Organizational units}}} ' + 'project {{count, plural, one {Project} other {Projects}}} ' + @@ -2083,7 +2161,6 @@ export default defineMessages({ '{value, select, ' + 'cost {Cost comparison} ' + 'cpu {CPU usage, request, and limit comparison} ' + - 'instance_type {Compute usage comparison} ' + 'memory {Memory usage, request, and limit comparison} ' + 'modal {{name} daily usage comparison} ' + 'storage {Storage usage comparison} ' + @@ -2868,6 +2945,16 @@ export default defineMessages({ description: 'Sources', id: 'Sources', }, + Status: { + defaultMessage: '{value, select, ' + 'pending {Pending} ' + 'running {Running} ' + 'failed {Failed} ' + 'other {}}', + description: 'Status', + id: 'Status', + }, + StatusActions: { + defaultMessage: 'Status/Actions', + description: 'Status/Actions', + id: 'StatusActions', + }, Suggestions: { defaultMessage: 'Suggestions', description: 'Suggestions', @@ -2898,6 +2985,11 @@ export default defineMessages({ description: 'Tag Names', id: 'TagNames', }, + TimeOfExport: { + defaultMessage: 'Time of export', + description: 'Time of export', + id: 'TimeOfExport', + }, ToolBarBulkSelectAll: { defaultMessage: 'Select all ({value} items)', description: 'Select all ({value} items)', diff --git a/src/modules/ocpOverviewWidget/ocpOverviewChart.tsx b/src/modules/ocpOverviewWidget/ocpOverviewChart.tsx index c01be73c8..d1739589f 100644 --- a/src/modules/ocpOverviewWidget/ocpOverviewChart.tsx +++ b/src/modules/ocpOverviewWidget/ocpOverviewChart.tsx @@ -7,8 +7,8 @@ import { ComputedReportItemType, ComputedReportItemValueType, transformReport, -} from 'components/charts/common/chartDatumUtils'; -import { TrendChart } from 'components/charts/trendChart'; +} from 'pages/views/components/charts/common/chartDatumUtils'; +import { TrendChart } from 'pages/views/components/charts/trendChart'; import React from 'react'; import { connect } from 'react-redux'; import { createMapStateToProps, FetchStatus } from 'store/common'; diff --git a/src/components/currency/currency.scss b/src/pages/components/currency/currency.scss similarity index 100% rename from src/components/currency/currency.scss rename to src/pages/components/currency/currency.scss diff --git a/src/components/currency/currency.styles.ts b/src/pages/components/currency/currency.styles.ts similarity index 100% rename from src/components/currency/currency.styles.ts rename to src/pages/components/currency/currency.styles.ts diff --git a/src/components/currency/currency.tsx b/src/pages/components/currency/currency.tsx similarity index 100% rename from src/components/currency/currency.tsx rename to src/pages/components/currency/currency.tsx diff --git a/src/components/currency/index.ts b/src/pages/components/currency/index.ts similarity index 100% rename from src/components/currency/index.ts rename to src/pages/components/currency/index.ts diff --git a/src/components/icons/costIcon/Cost-icon.svg b/src/pages/components/icons/costIcon/Cost-icon.svg similarity index 100% rename from src/components/icons/costIcon/Cost-icon.svg rename to src/pages/components/icons/costIcon/Cost-icon.svg diff --git a/src/components/icons/costIcon/costIcon.scss b/src/pages/components/icons/costIcon/costIcon.scss similarity index 100% rename from src/components/icons/costIcon/costIcon.scss rename to src/pages/components/icons/costIcon/costIcon.scss diff --git a/src/components/icons/costIcon/costIcon.tsx b/src/pages/components/icons/costIcon/costIcon.tsx similarity index 100% rename from src/components/icons/costIcon/costIcon.tsx rename to src/pages/components/icons/costIcon/costIcon.tsx diff --git a/src/components/icons/costIcon/index.ts b/src/pages/components/icons/costIcon/index.ts similarity index 100% rename from src/components/icons/costIcon/index.ts rename to src/pages/components/icons/costIcon/index.ts diff --git a/src/components/state/emptyFilterState/emptyFilterState.styles.ts b/src/pages/components/state/emptyFilterState/emptyFilterState.styles.ts similarity index 100% rename from src/components/state/emptyFilterState/emptyFilterState.styles.ts rename to src/pages/components/state/emptyFilterState/emptyFilterState.styles.ts diff --git a/src/components/state/emptyFilterState/emptyFilterState.tsx b/src/pages/components/state/emptyFilterState/emptyFilterState.tsx similarity index 100% rename from src/components/state/emptyFilterState/emptyFilterState.tsx rename to src/pages/components/state/emptyFilterState/emptyFilterState.tsx diff --git a/src/components/state/emptyValueState/emptyValueState.scss b/src/pages/components/state/emptyValueState/emptyValueState.scss similarity index 100% rename from src/components/state/emptyValueState/emptyValueState.scss rename to src/pages/components/state/emptyValueState/emptyValueState.scss diff --git a/src/components/state/emptyValueState/emptyValueState.tsx b/src/pages/components/state/emptyValueState/emptyValueState.tsx similarity index 100% rename from src/components/state/emptyValueState/emptyValueState.tsx rename to src/pages/components/state/emptyValueState/emptyValueState.tsx diff --git a/src/components/state/errorState/errorState.tsx b/src/pages/components/state/errorState/errorState.tsx similarity index 100% rename from src/components/state/errorState/errorState.tsx rename to src/pages/components/state/errorState/errorState.tsx diff --git a/src/components/state/loadingState/loadingState.tsx b/src/pages/components/state/loadingState/loadingState.tsx similarity index 100% rename from src/components/state/loadingState/loadingState.tsx rename to src/pages/components/state/loadingState/loadingState.tsx diff --git a/src/components/forms/form.tsx b/src/pages/costModels/components/forms/form.tsx similarity index 100% rename from src/components/forms/form.tsx rename to src/pages/costModels/components/forms/form.tsx diff --git a/src/pages/costModels/costModel/addSourceStep.tsx b/src/pages/costModels/costModel/addSourceStep.tsx index 563f75f3b..e433b0a2f 100644 --- a/src/pages/costModels/costModel/addSourceStep.tsx +++ b/src/pages/costModels/costModel/addSourceStep.tsx @@ -2,9 +2,9 @@ import { Pagination, Toolbar, ToolbarContent, ToolbarItem } from '@patternfly/re import { Table, TableBody, TableHeader } from '@patternfly/react-table'; import { CostModel } from 'api/costModels'; import { Provider } from 'api/providers'; -import { EmptyFilterState } from 'components/state/emptyFilterState/emptyFilterState'; -import { LoadingState } from 'components/state/loadingState/loadingState'; import messages from 'locales/messages'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; +import { LoadingState } from 'pages/components/state/loadingState/loadingState'; import { SourcesModalErrorState } from 'pages/costModels/components/errorState'; import { addMultiValueQuery, removeMultiValueQuery } from 'pages/costModels/components/filterLogic'; import { WarningIcon } from 'pages/costModels/components/warningIcon'; diff --git a/src/pages/costModels/costModel/costModelsDetails.styles.ts b/src/pages/costModels/costModel/costModelsDetails.styles.ts index 738b61e01..7fc05d250 100644 --- a/src/pages/costModels/costModel/costModelsDetails.styles.ts +++ b/src/pages/costModels/costModel/costModelsDetails.styles.ts @@ -54,9 +54,6 @@ export const styles = { display: 'flex', justifyContent: 'space-between', }, - headerContentRight: { - display: 'flex', - }, headerCostModel: { padding: global_spacer_lg.value, paddingBottom: 0, diff --git a/src/pages/costModels/costModel/header.tsx b/src/pages/costModels/costModel/header.tsx index b7f46c8bd..ea9f42092 100644 --- a/src/pages/costModels/costModel/header.tsx +++ b/src/pages/costModels/costModel/header.tsx @@ -20,7 +20,6 @@ import { TitleSizes, } from '@patternfly/react-core'; import { CostModel } from 'api/costModels'; -import { ExportLink } from 'components/export'; import * as H from 'history'; import messages from 'locales/messages'; import { ReadOnlyTooltip } from 'pages/costModels/components/readOnlyTooltip'; @@ -34,7 +33,6 @@ import { paths } from 'routes'; import { createMapStateToProps } from 'store/common'; import { costModelsActions, costModelsSelectors } from 'store/costModels'; import { rbacSelectors } from 'store/rbac'; -import { isBetaFeature } from 'utils/feature'; import { getBaseName } from 'utils/paths'; interface Props extends WrappedComponentProps { @@ -113,10 +111,6 @@ const Header: React.FunctionComponent = ({ {current.name} -
- {/* Todo: Show in-progress features in beta environment only */} - {isBetaFeature() && } -
diff --git a/src/pages/costModels/costModel/priceListTable.tsx b/src/pages/costModels/costModel/priceListTable.tsx index df5faffc0..0f261ed06 100644 --- a/src/pages/costModels/costModel/priceListTable.tsx +++ b/src/pages/costModels/costModel/priceListTable.tsx @@ -19,9 +19,9 @@ import { Unavailable } from '@redhat-cloud-services/frontend-components/Unavaila import { CostModel } from 'api/costModels'; import { MetricHash } from 'api/metrics'; import { AxiosError } from 'axios'; -import { EmptyFilterState } from 'components/state/emptyFilterState/emptyFilterState'; -import { LoadingState } from 'components/state/loadingState/loadingState'; import messages from 'locales/messages'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; +import { LoadingState } from 'pages/components/state/loadingState/loadingState'; import { WithPriceListSearch } from 'pages/costModels/components/hoc/withPriceListSearch'; import { PriceListToolbar } from 'pages/costModels/components/priceListToolbar'; import { RateTable } from 'pages/costModels/components/rateTable'; diff --git a/src/pages/costModels/costModel/table.tsx b/src/pages/costModels/costModel/table.tsx index 21a1f0b8b..42781e5de 100644 --- a/src/pages/costModels/costModel/table.tsx +++ b/src/pages/costModels/costModel/table.tsx @@ -1,8 +1,8 @@ import { EmptyState, EmptyStateBody, EmptyStateIcon, Title, TitleSizes } from '@patternfly/react-core'; import { DollarSignIcon } from '@patternfly/react-icons/dist/esm/icons/dollar-sign-icon'; import { CostModel } from 'api/costModels'; -import { EmptyFilterState } from 'components/state/emptyFilterState/emptyFilterState'; import messages from 'locales/messages'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; import { addMultiValueQuery, removeMultiValueQuery } from 'pages/costModels/components/filterLogic'; import SourcesTable from 'pages/costModels/costModel/sourcesTable'; import React from 'react'; diff --git a/src/pages/costModels/costModel/updateRateModel.tsx b/src/pages/costModels/costModel/updateRateModel.tsx index 1462f2484..4250c90b4 100644 --- a/src/pages/costModels/costModel/updateRateModel.tsx +++ b/src/pages/costModels/costModel/updateRateModel.tsx @@ -1,9 +1,9 @@ import { Alert, Button, Modal, Stack, StackItem } from '@patternfly/react-core'; import { CostModelRequest } from 'api/costModels'; import { MetricHash } from 'api/metrics'; -import { Form } from 'components/forms/form'; import { intl as defaultIntl } from 'components/i18n'; import messages from 'locales/messages'; +import { Form } from 'pages/costModels/components/forms/form'; import { canSubmit as isReadyForSubmit, genFormDataFromRate, diff --git a/src/pages/costModels/costModelsDetails/header.styles.ts b/src/pages/costModels/costModelsDetails/header.styles.ts index a2a8b8570..399e1034a 100644 --- a/src/pages/costModels/costModelsDetails/header.styles.ts +++ b/src/pages/costModels/costModelsDetails/header.styles.ts @@ -5,7 +5,4 @@ export const styles = { display: 'flex', justifyContent: 'space-between', }, - headerContentRight: { - display: 'flex', - }, } as { [className: string]: React.CSSProperties }; diff --git a/src/pages/costModels/costModelsDetails/header.tsx b/src/pages/costModels/costModelsDetails/header.tsx index 003a2dc47..c11f1f5e4 100644 --- a/src/pages/costModels/costModelsDetails/header.tsx +++ b/src/pages/costModels/costModelsDetails/header.tsx @@ -1,12 +1,10 @@ import { Button, ButtonVariant, Popover, TextContent, Title, TitleSizes } from '@patternfly/react-core'; import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon'; -import { ExportLink } from 'components/export'; import messages from 'locales/messages'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { connect } from 'react-redux'; import { RootState } from 'store'; -import { isBetaFeature } from 'utils/feature'; import { styles } from './header.styles'; @@ -22,10 +20,6 @@ function HeaderBase({ children }: HeaderProps): JSX.Element { {children} -
- {/* Todo: Show in-progress features in beta environment only */} - {isBetaFeature() && } -
); } diff --git a/src/pages/costModels/costModelsDetails/utils/table.tsx b/src/pages/costModels/costModelsDetails/utils/table.tsx index 7f9abe98b..7af032f60 100644 --- a/src/pages/costModels/costModelsDetails/utils/table.tsx +++ b/src/pages/costModels/costModelsDetails/utils/table.tsx @@ -2,9 +2,9 @@ import { Bullseye } from '@patternfly/react-core'; import { IAction, ICell, SortByDirection } from '@patternfly/react-table'; import { Unavailable } from '@redhat-cloud-services/frontend-components/Unavailable'; import { CostModel } from 'api/costModels'; -import { EmptyFilterState } from 'components/state/emptyFilterState/emptyFilterState'; -import { LoadingState } from 'components/state/loadingState/loadingState'; import { relativeTime } from 'human-date'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; +import { LoadingState } from 'pages/components/state/loadingState/loadingState'; import NoCostModels from 'pages/costModels/costModelsDetails/noCostModels'; import React from 'react'; import { Link } from 'react-router-dom'; diff --git a/src/pages/costModels/createCostModelWizard/generalInformation.tsx b/src/pages/costModels/createCostModelWizard/generalInformation.tsx index 208d16dfa..0b1a0b20e 100644 --- a/src/pages/costModels/createCostModelWizard/generalInformation.tsx +++ b/src/pages/costModels/createCostModelWizard/generalInformation.tsx @@ -9,14 +9,14 @@ import { Title, TitleSizes, } from '@patternfly/react-core'; -import { currencyOptions } from 'components/currency'; -import { Form } from 'components/forms/form'; import messages from 'locales/messages'; +import { currencyOptions } from 'pages/components/currency'; +import { Form } from 'pages/costModels/components/forms/form'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { connect } from 'react-redux'; import { createMapStateToProps } from 'store/common'; -import { isBetaFeature } from 'utils/feature'; +import { FeatureType, isFeatureVisible } from 'utils/feature'; import { CostModelContext } from './context'; import { descriptionErrors, nameErrors } from './steps'; @@ -116,7 +116,7 @@ class GeneralInformation extends React.Component { { /* Todo: Show in-progress features in beta environment only */ - isBetaFeature() && ( + isFeatureVisible(FeatureType.currency) && ( {currencyOptions.map(option => ( diff --git a/src/pages/costModels/createCostModelWizard/markup.tsx b/src/pages/costModels/createCostModelWizard/markup.tsx index 3af3ee7a9..d85659735 100644 --- a/src/pages/costModels/createCostModelWizard/markup.tsx +++ b/src/pages/costModels/createCostModelWizard/markup.tsx @@ -16,8 +16,8 @@ import { Title, TitleSizes, } from '@patternfly/react-core'; -import { Form } from 'components/forms/form'; import messages from 'locales/messages'; +import { Form } from 'pages/costModels/components/forms/form'; import { styles } from 'pages/costModels/costModel/costCalc.styles'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; diff --git a/src/pages/costModels/createCostModelWizard/priceListTable.tsx b/src/pages/costModels/createCostModelWizard/priceListTable.tsx index f0a8d7645..d55af759e 100644 --- a/src/pages/costModels/createCostModelWizard/priceListTable.tsx +++ b/src/pages/costModels/createCostModelWizard/priceListTable.tsx @@ -15,8 +15,8 @@ import { } from '@patternfly/react-core'; import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; import { MetricHash } from 'api/metrics'; -import { EmptyFilterState } from 'components/state/emptyFilterState/emptyFilterState'; import messages from 'locales/messages'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; import { WithPriceListSearch } from 'pages/costModels/components/hoc/withPriceListSearch'; import PaginationToolbarTemplate from 'pages/costModels/components/paginationToolbarTemplate'; import { PriceListToolbar } from 'pages/costModels/components/priceListToolbar'; diff --git a/src/pages/costModels/createCostModelWizard/sources.tsx b/src/pages/costModels/createCostModelWizard/sources.tsx index 9272b1966..0a846d469 100644 --- a/src/pages/costModels/createCostModelWizard/sources.tsx +++ b/src/pages/costModels/createCostModelWizard/sources.tsx @@ -1,4 +1,4 @@ -import { LoadingState } from 'components/state/loadingState/loadingState'; +import { LoadingState } from 'pages/components/state/loadingState/loadingState'; import { SourceStepErrorState } from 'pages/costModels/components/errorState'; import React from 'react'; diff --git a/src/pages/costModels/createCostModelWizard/table.tsx b/src/pages/costModels/createCostModelWizard/table.tsx index 74b7f767e..c23f08b29 100644 --- a/src/pages/costModels/createCostModelWizard/table.tsx +++ b/src/pages/costModels/createCostModelWizard/table.tsx @@ -1,7 +1,7 @@ import { Checkbox, Stack, StackItem, Text, TextContent, TextVariants, Title, TitleSizes } from '@patternfly/react-core'; import { Table, TableBody, TableHeader } from '@patternfly/react-table'; -import { LoadingState } from 'components/state/loadingState/loadingState'; import messages from 'locales/messages'; +import { LoadingState } from 'pages/components/state/loadingState/loadingState'; import { addMultiValueQuery, removeMultiValueQuery } from 'pages/costModels/components/filterLogic'; import { PaginationToolbarTemplate } from 'pages/costModels/components/paginationToolbarTemplate'; import { WarningIcon } from 'pages/costModels/components/warningIcon'; diff --git a/src/pages/state/loading/loading.tsx b/src/pages/state/loading/loading.tsx index f84405b64..9ed7c1254 100644 --- a/src/pages/state/loading/loading.tsx +++ b/src/pages/state/loading/loading.tsx @@ -1,6 +1,6 @@ import Main from '@redhat-cloud-services/frontend-components/Main'; import PageHeader, { PageHeaderTitle } from '@redhat-cloud-services/frontend-components/PageHeader'; -import { LoadingState } from 'components/state/loadingState/loadingState'; +import { LoadingState } from 'pages/components/state/loadingState/loadingState'; import React from 'react'; import { RouteComponentProps, withRouter } from 'react-router-dom'; diff --git a/src/pages/state/noProviders/noProvidersState.tsx b/src/pages/state/noProviders/noProvidersState.tsx index 339293582..da01b2a61 100644 --- a/src/pages/state/noProviders/noProvidersState.tsx +++ b/src/pages/state/noProviders/noProvidersState.tsx @@ -3,8 +3,8 @@ import { Button, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateVariant, import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; import { ProviderType } from 'api/providers'; -import CostIcon from 'components/icons/costIcon'; import messages from 'locales/messages'; +import CostIcon from 'pages/components/icons/costIcon'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { RouteComponentProps, withRouter } from 'react-router-dom'; diff --git a/src/components/charts/chartLabelTooltip/chartLabelTooltip.tsx b/src/pages/views/components/charts/chartLabelTooltip/chartLabelTooltip.tsx similarity index 100% rename from src/components/charts/chartLabelTooltip/chartLabelTooltip.tsx rename to src/pages/views/components/charts/chartLabelTooltip/chartLabelTooltip.tsx diff --git a/src/components/charts/chartLabelTooltip/index.ts b/src/pages/views/components/charts/chartLabelTooltip/index.ts similarity index 100% rename from src/components/charts/chartLabelTooltip/index.ts rename to src/pages/views/components/charts/chartLabelTooltip/index.ts diff --git a/src/components/charts/chartTheme/index.ts b/src/pages/views/components/charts/chartTheme/index.ts similarity index 100% rename from src/components/charts/chartTheme/index.ts rename to src/pages/views/components/charts/chartTheme/index.ts diff --git a/src/components/charts/chartTheme/theme-koku.ts b/src/pages/views/components/charts/chartTheme/theme-koku.ts similarity index 100% rename from src/components/charts/chartTheme/theme-koku.ts rename to src/pages/views/components/charts/chartTheme/theme-koku.ts diff --git a/src/components/charts/chartTheme/theme-utils.ts b/src/pages/views/components/charts/chartTheme/theme-utils.ts similarity index 100% rename from src/components/charts/chartTheme/theme-utils.ts rename to src/pages/views/components/charts/chartTheme/theme-utils.ts diff --git a/src/components/charts/common/chartDatumUtils.test.ts b/src/pages/views/components/charts/common/chartDatumUtils.test.ts similarity index 100% rename from src/components/charts/common/chartDatumUtils.test.ts rename to src/pages/views/components/charts/common/chartDatumUtils.test.ts diff --git a/src/components/charts/common/chartDatumUtils.ts b/src/pages/views/components/charts/common/chartDatumUtils.ts similarity index 100% rename from src/components/charts/common/chartDatumUtils.ts rename to src/pages/views/components/charts/common/chartDatumUtils.ts diff --git a/src/components/charts/common/chartUtils.ts b/src/pages/views/components/charts/common/chartUtils.ts similarity index 100% rename from src/components/charts/common/chartUtils.ts rename to src/pages/views/components/charts/common/chartUtils.ts diff --git a/src/components/charts/common/charts-common.scss b/src/pages/views/components/charts/common/charts-common.scss similarity index 100% rename from src/components/charts/common/charts-common.scss rename to src/pages/views/components/charts/common/charts-common.scss diff --git a/src/components/charts/common/index.ts b/src/pages/views/components/charts/common/index.ts similarity index 100% rename from src/components/charts/common/index.ts rename to src/pages/views/components/charts/common/index.ts diff --git a/src/components/charts/costChart/costChart.styles.ts b/src/pages/views/components/charts/costChart/costChart.styles.ts similarity index 100% rename from src/components/charts/costChart/costChart.styles.ts rename to src/pages/views/components/charts/costChart/costChart.styles.ts diff --git a/src/components/charts/costChart/costChart.tsx b/src/pages/views/components/charts/costChart/costChart.tsx similarity index 98% rename from src/components/charts/costChart/costChart.tsx rename to src/pages/views/components/charts/costChart/costChart.tsx index aa749e01e..7c5ff6767 100644 --- a/src/components/charts/costChart/costChart.tsx +++ b/src/pages/views/components/charts/costChart/costChart.tsx @@ -1,4 +1,4 @@ -import 'components/charts/common/charts-common.scss'; +import 'pages/views/components/charts/common/charts-common.scss'; import { Chart, @@ -10,8 +10,10 @@ import { getInteractiveLegendEvents, } from '@patternfly/react-charts'; import { Title } from '@patternfly/react-core'; -import { default as ChartTheme } from 'components/charts/chartTheme'; -import { getCostRangeString, getDateRange } from 'components/charts/common/chartDatumUtils'; +import { getDate } from 'date-fns'; +import messages from 'locales/messages'; +import { default as ChartTheme } from 'pages/views/components/charts/chartTheme'; +import { getCostRangeString, getDateRange } from 'pages/views/components/charts/common/chartDatumUtils'; import { ChartSeries, getChartNames, @@ -22,9 +24,7 @@ import { initHiddenSeries, isDataAvailable, isSeriesHidden, -} from 'components/charts/common/chartUtils'; -import { getDate } from 'date-fns'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartUtils'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { FormatOptions, Formatter } from 'utils/format'; diff --git a/src/components/charts/costChart/index.ts b/src/pages/views/components/charts/costChart/index.ts similarity index 100% rename from src/components/charts/costChart/index.ts rename to src/pages/views/components/charts/costChart/index.ts diff --git a/src/components/charts/costExplorerChart/costExplorerChart.styles.ts b/src/pages/views/components/charts/costExplorerChart/costExplorerChart.styles.ts similarity index 100% rename from src/components/charts/costExplorerChart/costExplorerChart.styles.ts rename to src/pages/views/components/charts/costExplorerChart/costExplorerChart.styles.ts diff --git a/src/components/charts/costExplorerChart/costExplorerChart.tsx b/src/pages/views/components/charts/costExplorerChart/costExplorerChart.tsx similarity index 97% rename from src/components/charts/costExplorerChart/costExplorerChart.tsx rename to src/pages/views/components/charts/costExplorerChart/costExplorerChart.tsx index 1dcaa11f7..b97a31a58 100644 --- a/src/components/charts/costExplorerChart/costExplorerChart.tsx +++ b/src/pages/views/components/charts/costExplorerChart/costExplorerChart.tsx @@ -1,4 +1,4 @@ -import 'components/charts/common/charts-common.scss'; +import 'pages/views/components/charts/common/charts-common.scss'; import { Chart, @@ -11,8 +11,9 @@ import { createContainer, getInteractiveLegendEvents, } from '@patternfly/react-charts'; -import { default as ChartTheme } from 'components/charts/chartTheme'; -import { getMaxValue } from 'components/charts/common/chartDatumUtils'; +import messages from 'locales/messages'; +import { default as ChartTheme } from 'pages/views/components/charts/chartTheme'; +import { getMaxValue } from 'pages/views/components/charts/common/chartDatumUtils'; import { ChartSeries, getChartNames, @@ -23,8 +24,7 @@ import { isDataAvailable, isDataHidden, isSeriesHidden, -} from 'components/charts/common/chartUtils'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartUtils'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { formatCurrencyAbbreviation, FormatOptions, Formatter } from 'utils/format'; diff --git a/src/components/charts/costExplorerChart/index.ts b/src/pages/views/components/charts/costExplorerChart/index.ts similarity index 100% rename from src/components/charts/costExplorerChart/index.ts rename to src/pages/views/components/charts/costExplorerChart/index.ts diff --git a/src/components/charts/dailyCostChart/dailyCostChart.styles.ts b/src/pages/views/components/charts/dailyCostChart/dailyCostChart.styles.ts similarity index 100% rename from src/components/charts/dailyCostChart/dailyCostChart.styles.ts rename to src/pages/views/components/charts/dailyCostChart/dailyCostChart.styles.ts diff --git a/src/components/charts/dailyCostChart/dailyCostChart.tsx b/src/pages/views/components/charts/dailyCostChart/dailyCostChart.tsx similarity index 98% rename from src/components/charts/dailyCostChart/dailyCostChart.tsx rename to src/pages/views/components/charts/dailyCostChart/dailyCostChart.tsx index 040047a65..db563d962 100644 --- a/src/components/charts/dailyCostChart/dailyCostChart.tsx +++ b/src/pages/views/components/charts/dailyCostChart/dailyCostChart.tsx @@ -1,4 +1,4 @@ -import 'components/charts/common/charts-common.scss'; +import 'pages/views/components/charts/common/charts-common.scss'; import { Chart, @@ -12,8 +12,10 @@ import { getInteractiveLegendEvents, } from '@patternfly/react-charts'; import { Title } from '@patternfly/react-core'; -import { default as ChartTheme } from 'components/charts/chartTheme'; -import { getCostRangeString, getDateRange } from 'components/charts/common/chartDatumUtils'; +import { getDate } from 'date-fns'; +import messages from 'locales/messages'; +import { default as ChartTheme } from 'pages/views/components/charts/chartTheme'; +import { getCostRangeString, getDateRange } from 'pages/views/components/charts/common/chartDatumUtils'; import { ChartSeries, getChartNames, @@ -25,9 +27,7 @@ import { isDataAvailable, isDataHidden, isSeriesHidden, -} from 'components/charts/common/chartUtils'; -import { getDate } from 'date-fns'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartUtils'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { FormatOptions, Formatter } from 'utils/format'; diff --git a/src/components/charts/dailyCostChart/index.ts b/src/pages/views/components/charts/dailyCostChart/index.ts similarity index 100% rename from src/components/charts/dailyCostChart/index.ts rename to src/pages/views/components/charts/dailyCostChart/index.ts diff --git a/src/components/charts/dailyTrendChart/dailyTrendChart.styles.ts b/src/pages/views/components/charts/dailyTrendChart/dailyTrendChart.styles.ts similarity index 100% rename from src/components/charts/dailyTrendChart/dailyTrendChart.styles.ts rename to src/pages/views/components/charts/dailyTrendChart/dailyTrendChart.styles.ts diff --git a/src/components/charts/dailyTrendChart/dailyTrendChart.tsx b/src/pages/views/components/charts/dailyTrendChart/dailyTrendChart.tsx similarity index 97% rename from src/components/charts/dailyTrendChart/dailyTrendChart.tsx rename to src/pages/views/components/charts/dailyTrendChart/dailyTrendChart.tsx index 9cd0af802..36f856e79 100644 --- a/src/components/charts/dailyTrendChart/dailyTrendChart.tsx +++ b/src/pages/views/components/charts/dailyTrendChart/dailyTrendChart.tsx @@ -1,4 +1,4 @@ -import 'components/charts/common/charts-common.scss'; +import 'pages/views/components/charts/common/charts-common.scss'; import { Chart, @@ -12,8 +12,10 @@ import { getInteractiveLegendEvents, } from '@patternfly/react-charts'; import { Title } from '@patternfly/react-core'; -import { default as ChartTheme } from 'components/charts/chartTheme'; -import { getCostRangeString, getDateRange } from 'components/charts/common/chartDatumUtils'; +import { getDate } from 'date-fns'; +import messages from 'locales/messages'; +import { default as ChartTheme } from 'pages/views/components/charts/chartTheme'; +import { getCostRangeString, getDateRange } from 'pages/views/components/charts/common/chartDatumUtils'; import { ChartSeries, getChartNames, @@ -25,9 +27,7 @@ import { isDataAvailable, isDataHidden, isSeriesHidden, -} from 'components/charts/common/chartUtils'; -import { getDate } from 'date-fns'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartUtils'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { FormatOptions, Formatter } from 'utils/format'; diff --git a/src/components/charts/dailyTrendChart/index.ts b/src/pages/views/components/charts/dailyTrendChart/index.ts similarity index 100% rename from src/components/charts/dailyTrendChart/index.ts rename to src/pages/views/components/charts/dailyTrendChart/index.ts diff --git a/src/components/charts/historicalCostChart/__snapshots__/historicalCostChart.test.tsx.snap b/src/pages/views/components/charts/historicalCostChart/__snapshots__/historicalCostChart.test.tsx.snap similarity index 100% rename from src/components/charts/historicalCostChart/__snapshots__/historicalCostChart.test.tsx.snap rename to src/pages/views/components/charts/historicalCostChart/__snapshots__/historicalCostChart.test.tsx.snap diff --git a/src/components/charts/historicalCostChart/historicalCostChart.styles.ts b/src/pages/views/components/charts/historicalCostChart/historicalCostChart.styles.ts similarity index 100% rename from src/components/charts/historicalCostChart/historicalCostChart.styles.ts rename to src/pages/views/components/charts/historicalCostChart/historicalCostChart.styles.ts diff --git a/src/components/charts/historicalCostChart/historicalCostChart.test.tsx b/src/pages/views/components/charts/historicalCostChart/historicalCostChart.test.tsx similarity index 97% rename from src/components/charts/historicalCostChart/historicalCostChart.test.tsx rename to src/pages/views/components/charts/historicalCostChart/historicalCostChart.test.tsx index 930ee9b57..af1201daa 100644 --- a/src/components/charts/historicalCostChart/historicalCostChart.test.tsx +++ b/src/pages/views/components/charts/historicalCostChart/historicalCostChart.test.tsx @@ -2,8 +2,8 @@ jest.mock('date-fns/format'); import { Chart, ChartArea } from '@patternfly/react-charts'; import { OcpReport, OcpReportData } from 'api/reports/ocpReports'; -import * as utils from 'components/charts/common/chartDatumUtils'; import { shallow } from 'enzyme'; +import * as utils from 'pages/views/components/charts/common/chartDatumUtils'; import React from 'react'; import { HistoricalCostChart, HistoricalCostChartProps } from './historicalCostChart'; diff --git a/src/components/charts/historicalCostChart/historicalCostChart.tsx b/src/pages/views/components/charts/historicalCostChart/historicalCostChart.tsx similarity index 96% rename from src/components/charts/historicalCostChart/historicalCostChart.tsx rename to src/pages/views/components/charts/historicalCostChart/historicalCostChart.tsx index 6b0702f61..1b2f450b8 100644 --- a/src/components/charts/historicalCostChart/historicalCostChart.tsx +++ b/src/pages/views/components/charts/historicalCostChart/historicalCostChart.tsx @@ -1,4 +1,4 @@ -import 'components/charts/common/charts-common.scss'; +import 'pages/views/components/charts/common/charts-common.scss'; import { Chart, @@ -10,9 +10,11 @@ import { getInteractiveLegendEvents, } from '@patternfly/react-charts'; import { Title, TitleSizes } from '@patternfly/react-core'; -import { default as ChartTheme } from 'components/charts/chartTheme'; -import { getCostRangeString } from 'components/charts/common/chartDatumUtils'; -import { getDateRange } from 'components/charts/common/chartDatumUtils'; +import { getDate } from 'date-fns'; +import messages from 'locales/messages'; +import { default as ChartTheme } from 'pages/views/components/charts/chartTheme'; +import { getCostRangeString } from 'pages/views/components/charts/common/chartDatumUtils'; +import { getDateRange } from 'pages/views/components/charts/common/chartDatumUtils'; import { ChartSeries, getChartNames, @@ -23,9 +25,7 @@ import { initHiddenSeries, isDataAvailable, isSeriesHidden, -} from 'components/charts/common/chartUtils'; -import { getDate } from 'date-fns'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartUtils'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { FormatOptions, Formatter } from 'utils/format'; diff --git a/src/components/charts/historicalCostChart/index.ts b/src/pages/views/components/charts/historicalCostChart/index.ts similarity index 100% rename from src/components/charts/historicalCostChart/index.ts rename to src/pages/views/components/charts/historicalCostChart/index.ts diff --git a/src/components/charts/historicalTrendChart/__snapshots__/historicalTrendChart.test.tsx.snap b/src/pages/views/components/charts/historicalTrendChart/__snapshots__/historicalTrendChart.test.tsx.snap similarity index 100% rename from src/components/charts/historicalTrendChart/__snapshots__/historicalTrendChart.test.tsx.snap rename to src/pages/views/components/charts/historicalTrendChart/__snapshots__/historicalTrendChart.test.tsx.snap diff --git a/src/components/charts/historicalTrendChart/historicalTrendChart.styles.ts b/src/pages/views/components/charts/historicalTrendChart/historicalTrendChart.styles.ts similarity index 100% rename from src/components/charts/historicalTrendChart/historicalTrendChart.styles.ts rename to src/pages/views/components/charts/historicalTrendChart/historicalTrendChart.styles.ts diff --git a/src/components/charts/historicalTrendChart/historicalTrendChart.test.tsx b/src/pages/views/components/charts/historicalTrendChart/historicalTrendChart.test.tsx similarity index 97% rename from src/components/charts/historicalTrendChart/historicalTrendChart.test.tsx rename to src/pages/views/components/charts/historicalTrendChart/historicalTrendChart.test.tsx index 97141e6ab..b1b0e1b98 100644 --- a/src/components/charts/historicalTrendChart/historicalTrendChart.test.tsx +++ b/src/pages/views/components/charts/historicalTrendChart/historicalTrendChart.test.tsx @@ -2,8 +2,8 @@ jest.mock('date-fns/format'); import { Chart, ChartArea } from '@patternfly/react-charts'; import { AwsReport, AwsReportData } from 'api/reports/awsReports'; -import * as utils from 'components/charts/common/chartDatumUtils'; import { shallow } from 'enzyme'; +import * as utils from 'pages/views/components/charts/common/chartDatumUtils'; import React from 'react'; import { HistoricalTrendChart, HistoricalTrendChartProps } from './historicalTrendChart'; diff --git a/src/components/charts/historicalTrendChart/historicalTrendChart.tsx b/src/pages/views/components/charts/historicalTrendChart/historicalTrendChart.tsx similarity index 96% rename from src/components/charts/historicalTrendChart/historicalTrendChart.tsx rename to src/pages/views/components/charts/historicalTrendChart/historicalTrendChart.tsx index 65a050940..6f32e8a04 100644 --- a/src/components/charts/historicalTrendChart/historicalTrendChart.tsx +++ b/src/pages/views/components/charts/historicalTrendChart/historicalTrendChart.tsx @@ -1,4 +1,4 @@ -import 'components/charts/common/charts-common.scss'; +import 'pages/views/components/charts/common/charts-common.scss'; import { Chart, @@ -10,8 +10,10 @@ import { getInteractiveLegendEvents, } from '@patternfly/react-charts'; import { Title, TitleSizes } from '@patternfly/react-core'; -import { default as ChartTheme } from 'components/charts/chartTheme'; -import { getCostRangeString, getDateRange } from 'components/charts/common/chartDatumUtils'; +import { getDate } from 'date-fns'; +import messages from 'locales/messages'; +import { default as ChartTheme } from 'pages/views/components/charts/chartTheme'; +import { getCostRangeString, getDateRange } from 'pages/views/components/charts/common/chartDatumUtils'; import { ChartSeries, getChartNames, @@ -22,9 +24,7 @@ import { initHiddenSeries, isDataAvailable, isSeriesHidden, -} from 'components/charts/common/chartUtils'; -import { getDate } from 'date-fns'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartUtils'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { FormatOptions, Formatter } from 'utils/format'; diff --git a/src/components/charts/historicalTrendChart/index.ts b/src/pages/views/components/charts/historicalTrendChart/index.ts similarity index 100% rename from src/components/charts/historicalTrendChart/index.ts rename to src/pages/views/components/charts/historicalTrendChart/index.ts diff --git a/src/components/charts/historicalUsageChart/__snapshots__/historicalUsageChart.test.tsx.snap b/src/pages/views/components/charts/historicalUsageChart/__snapshots__/historicalUsageChart.test.tsx.snap similarity index 100% rename from src/components/charts/historicalUsageChart/__snapshots__/historicalUsageChart.test.tsx.snap rename to src/pages/views/components/charts/historicalUsageChart/__snapshots__/historicalUsageChart.test.tsx.snap diff --git a/src/components/charts/historicalUsageChart/historicalUsageChart.styles.ts b/src/pages/views/components/charts/historicalUsageChart/historicalUsageChart.styles.ts similarity index 100% rename from src/components/charts/historicalUsageChart/historicalUsageChart.styles.ts rename to src/pages/views/components/charts/historicalUsageChart/historicalUsageChart.styles.ts diff --git a/src/components/charts/historicalUsageChart/historicalUsageChart.test.tsx b/src/pages/views/components/charts/historicalUsageChart/historicalUsageChart.test.tsx similarity index 97% rename from src/components/charts/historicalUsageChart/historicalUsageChart.test.tsx rename to src/pages/views/components/charts/historicalUsageChart/historicalUsageChart.test.tsx index 145c6394a..a387d72bd 100644 --- a/src/components/charts/historicalUsageChart/historicalUsageChart.test.tsx +++ b/src/pages/views/components/charts/historicalUsageChart/historicalUsageChart.test.tsx @@ -2,8 +2,8 @@ jest.mock('date-fns/format'); import { Chart, ChartArea } from '@patternfly/react-charts'; import { OcpReport, OcpReportData } from 'api/reports/ocpReports'; -import * as utils from 'components/charts/common/chartDatumUtils'; import { shallow } from 'enzyme'; +import * as utils from 'pages/views/components/charts/common/chartDatumUtils'; import React from 'react'; import { HistoricalUsageChart, HistoricalUsageChartProps } from './historicalUsageChart'; diff --git a/src/components/charts/historicalUsageChart/historicalUsageChart.tsx b/src/pages/views/components/charts/historicalUsageChart/historicalUsageChart.tsx similarity index 97% rename from src/components/charts/historicalUsageChart/historicalUsageChart.tsx rename to src/pages/views/components/charts/historicalUsageChart/historicalUsageChart.tsx index ed1a225d5..4037bca8a 100644 --- a/src/components/charts/historicalUsageChart/historicalUsageChart.tsx +++ b/src/pages/views/components/charts/historicalUsageChart/historicalUsageChart.tsx @@ -1,4 +1,4 @@ -import 'components/charts/common/charts-common.scss'; +import 'pages/views/components/charts/common/charts-common.scss'; import { Chart, @@ -10,9 +10,11 @@ import { getInteractiveLegendEvents, } from '@patternfly/react-charts'; import { Title, TitleSizes } from '@patternfly/react-core'; -import { default as ChartTheme } from 'components/charts/chartTheme'; -import { getDateRange } from 'components/charts/common/chartDatumUtils'; -import { getUsageRangeString } from 'components/charts/common/chartDatumUtils'; +import { getDate } from 'date-fns'; +import messages from 'locales/messages'; +import { default as ChartTheme } from 'pages/views/components/charts/chartTheme'; +import { getDateRange } from 'pages/views/components/charts/common/chartDatumUtils'; +import { getUsageRangeString } from 'pages/views/components/charts/common/chartDatumUtils'; import { ChartSeries, getChartNames, @@ -23,9 +25,7 @@ import { initHiddenSeries, isDataAvailable, isSeriesHidden, -} from 'components/charts/common/chartUtils'; -import { getDate } from 'date-fns'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartUtils'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { FormatOptions, Formatter } from 'utils/format'; diff --git a/src/components/charts/historicalUsageChart/index.ts b/src/pages/views/components/charts/historicalUsageChart/index.ts similarity index 100% rename from src/components/charts/historicalUsageChart/index.ts rename to src/pages/views/components/charts/historicalUsageChart/index.ts diff --git a/src/components/charts/trendChart/__snapshots__/trendChart.test.tsx.snap b/src/pages/views/components/charts/trendChart/__snapshots__/trendChart.test.tsx.snap similarity index 100% rename from src/components/charts/trendChart/__snapshots__/trendChart.test.tsx.snap rename to src/pages/views/components/charts/trendChart/__snapshots__/trendChart.test.tsx.snap diff --git a/src/components/charts/trendChart/index.ts b/src/pages/views/components/charts/trendChart/index.ts similarity index 100% rename from src/components/charts/trendChart/index.ts rename to src/pages/views/components/charts/trendChart/index.ts diff --git a/src/components/charts/trendChart/trendChart.styles.ts b/src/pages/views/components/charts/trendChart/trendChart.styles.ts similarity index 100% rename from src/components/charts/trendChart/trendChart.styles.ts rename to src/pages/views/components/charts/trendChart/trendChart.styles.ts diff --git a/src/components/charts/trendChart/trendChart.test.tsx b/src/pages/views/components/charts/trendChart/trendChart.test.tsx similarity index 97% rename from src/components/charts/trendChart/trendChart.test.tsx rename to src/pages/views/components/charts/trendChart/trendChart.test.tsx index 33ac83099..77f0ed9f8 100644 --- a/src/components/charts/trendChart/trendChart.test.tsx +++ b/src/pages/views/components/charts/trendChart/trendChart.test.tsx @@ -2,8 +2,8 @@ jest.mock('date-fns/format'); import { Chart, ChartArea } from '@patternfly/react-charts'; import { AwsReport, AwsReportData } from 'api/reports/awsReports'; -import * as utils from 'components/charts/common/chartDatumUtils'; import { shallow } from 'enzyme'; +import * as utils from 'pages/views/components/charts/common/chartDatumUtils'; import React from 'react'; import { TrendChart, TrendChartProps } from './trendChart'; diff --git a/src/components/charts/trendChart/trendChart.tsx b/src/pages/views/components/charts/trendChart/trendChart.tsx similarity index 97% rename from src/components/charts/trendChart/trendChart.tsx rename to src/pages/views/components/charts/trendChart/trendChart.tsx index 01f45c739..1239c62ed 100644 --- a/src/components/charts/trendChart/trendChart.tsx +++ b/src/pages/views/components/charts/trendChart/trendChart.tsx @@ -1,4 +1,4 @@ -import 'components/charts/common/charts-common.scss'; +import 'pages/views/components/charts/common/charts-common.scss'; import { Chart, @@ -10,8 +10,10 @@ import { getInteractiveLegendEvents, } from '@patternfly/react-charts'; import { Title } from '@patternfly/react-core'; -import { default as ChartTheme } from 'components/charts/chartTheme'; -import { getCostRangeString, getDateRange } from 'components/charts/common/chartDatumUtils'; +import { getDate } from 'date-fns'; +import messages from 'locales/messages'; +import { default as ChartTheme } from 'pages/views/components/charts/chartTheme'; +import { getCostRangeString, getDateRange } from 'pages/views/components/charts/common/chartDatumUtils'; import { ChartSeries, getChartNames, @@ -22,9 +24,7 @@ import { initHiddenSeries, isDataAvailable, isSeriesHidden, -} from 'components/charts/common/chartUtils'; -import { getDate } from 'date-fns'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartUtils'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { FormatOptions, Formatter } from 'utils/format'; diff --git a/src/components/charts/usageChart/__snapshots__/usageChart.test.tsx.snap b/src/pages/views/components/charts/usageChart/__snapshots__/usageChart.test.tsx.snap similarity index 100% rename from src/components/charts/usageChart/__snapshots__/usageChart.test.tsx.snap rename to src/pages/views/components/charts/usageChart/__snapshots__/usageChart.test.tsx.snap diff --git a/src/components/charts/usageChart/index.ts b/src/pages/views/components/charts/usageChart/index.ts similarity index 100% rename from src/components/charts/usageChart/index.ts rename to src/pages/views/components/charts/usageChart/index.ts diff --git a/src/components/charts/usageChart/usageChart.styles.ts b/src/pages/views/components/charts/usageChart/usageChart.styles.ts similarity index 100% rename from src/components/charts/usageChart/usageChart.styles.ts rename to src/pages/views/components/charts/usageChart/usageChart.styles.ts diff --git a/src/components/charts/usageChart/usageChart.test.tsx b/src/pages/views/components/charts/usageChart/usageChart.test.tsx similarity index 97% rename from src/components/charts/usageChart/usageChart.test.tsx rename to src/pages/views/components/charts/usageChart/usageChart.test.tsx index 271ca26ed..225753ef9 100644 --- a/src/components/charts/usageChart/usageChart.test.tsx +++ b/src/pages/views/components/charts/usageChart/usageChart.test.tsx @@ -2,8 +2,8 @@ jest.mock('date-fns/format'); import { Chart, ChartArea } from '@patternfly/react-charts'; import { OcpReport, OcpReportData } from 'api/reports/ocpReports'; -import * as utils from 'components/charts/common/chartDatumUtils'; import { shallow } from 'enzyme'; +import * as utils from 'pages/views/components/charts/common/chartDatumUtils'; import React from 'react'; import { UsageChart, UsageChartProps } from './usageChart'; diff --git a/src/components/charts/usageChart/usageChart.tsx b/src/pages/views/components/charts/usageChart/usageChart.tsx similarity index 97% rename from src/components/charts/usageChart/usageChart.tsx rename to src/pages/views/components/charts/usageChart/usageChart.tsx index 705d50601..8fee45c42 100644 --- a/src/components/charts/usageChart/usageChart.tsx +++ b/src/pages/views/components/charts/usageChart/usageChart.tsx @@ -1,4 +1,4 @@ -import 'components/charts/common/charts-common.scss'; +import 'pages/views/components/charts/common/charts-common.scss'; import { Chart, @@ -10,8 +10,10 @@ import { getInteractiveLegendEvents, } from '@patternfly/react-charts'; import { Title } from '@patternfly/react-core'; -import { default as ChartTheme } from 'components/charts/chartTheme'; -import { getDateRange, getUsageRangeString } from 'components/charts/common/chartDatumUtils'; +import { getDate } from 'date-fns'; +import messages from 'locales/messages'; +import { default as ChartTheme } from 'pages/views/components/charts/chartTheme'; +import { getDateRange, getUsageRangeString } from 'pages/views/components/charts/common/chartDatumUtils'; import { ChartSeries, getChartNames, @@ -22,9 +24,7 @@ import { initHiddenSeries, isDataAvailable, isSeriesHidden, -} from 'components/charts/common/chartUtils'; -import { getDate } from 'date-fns'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartUtils'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { FormatOptions, Formatter } from 'utils/format'; diff --git a/src/pages/views/components/dataToolbar/dataToolbar.tsx b/src/pages/views/components/dataToolbar/dataToolbar.tsx index 45f126a34..575e892de 100644 --- a/src/pages/views/components/dataToolbar/dataToolbar.tsx +++ b/src/pages/views/components/dataToolbar/dataToolbar.tsx @@ -72,7 +72,7 @@ interface DataToolbarOwnProps { showFilter?: boolean; // Show export icon style?: React.CSSProperties; tagReport?: Tag; // Data containing tag key and value data - tagReportPathsType: TagPathsType; + tagReportPathsType?: TagPathsType; } interface DataToolbarState { @@ -129,8 +129,8 @@ export class DataToolbarBase extends React.Component { const { categoryOptions, groupBy, orgReport, query, tagReport } = this.props; if ( - categoryOptions !== prevProps.categoryOptions || groupBy !== prevProps.groupBy || + (categoryOptions && !isEqual(categoryOptions, prevProps.categoryOptions)) || (query && !isEqual(query, prevProps.query)) || (orgReport && !isEqual(orgReport, prevProps.orgReport)) || (tagReport && !isEqual(tagReport, prevProps.tagReport)) diff --git a/src/pages/views/components/export/exportModal.tsx b/src/pages/views/components/export/exportModal.tsx index bb7fd56ed..d95f7c18a 100644 --- a/src/pages/views/components/export/exportModal.tsx +++ b/src/pages/views/components/export/exportModal.tsx @@ -1,5 +1,16 @@ import { MessageDescriptor } from '@formatjs/intl/src/types'; -import { Alert, Button, ButtonVariant, Form, FormGroup, Modal, Radio } from '@patternfly/react-core'; +import { + Alert, + Button, + ButtonVariant, + Form, + FormGroup, + Grid, + GridItem, + Modal, + Radio, + TextInput, +} from '@patternfly/react-core'; import { Query, tagPrefix } from 'api/queries/query'; import { ReportPathsType } from 'api/reports/report'; import { AxiosError } from 'axios'; @@ -10,14 +21,16 @@ import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { connect } from 'react-redux'; import { createMapStateToProps } from 'store/common'; -import { exportActions } from 'store/exports'; +import { exportActions } from 'store/export'; import { getTestProps, testIds } from 'testIds'; import { ComputedReportItem } from 'utils/computedReport/getComputedReportItems'; +import { FeatureType, isFeatureVisible } from 'utils/feature'; import { styles } from './exportModal.styles'; import { ExportSubmit } from './exportSubmit'; export interface ExportModalOwnProps { + count?: number; groupBy?: string; isAllItems?: boolean; isOpen: boolean; @@ -27,7 +40,8 @@ export interface ExportModalOwnProps { queryString?: string; reportPathsType: ReportPathsType; resolution?: 'daily' | 'monthly'; // Default resolution - showAggregateType?: boolean; // monthly resolution filters are not valid with date range + showAggregateType?: boolean; // Monthly resolution filters are not valid with date range + showFormatType?: boolean; // Format type; CVS / JSON showTimeScope?: boolean; // timeScope filters are not valid with date range } @@ -41,12 +55,22 @@ interface ExportModalDispatchProps { interface ExportModalState { error?: AxiosError; + formatType: 'csv' | 'json'; + name?: string; timeScope: 'current' | 'previous'; resolution: string; } type ExportModalProps = ExportModalOwnProps & ExportModalDispatchProps & ExportModalStateProps & WrappedComponentProps; +const formatTypeOptions: { + label: MessageDescriptor; + value: string; +}[] = [ + { label: messages.ExportFormatType, value: 'csv' }, + { label: messages.ExportFormatType, value: 'json' }, +]; + const resolutionOptions: { label: MessageDescriptor; value: string; @@ -66,6 +90,7 @@ const timeScopeOptions: { export class ExportModalBase extends React.Component { protected defaultState: ExportModalState = { error: undefined, + formatType: 'csv', timeScope: 'current', resolution: this.props.resolution || 'monthly', }; @@ -75,9 +100,10 @@ export class ExportModalBase extends React.Component { this.setState({ ...this.defaultState }, () => { this.props.onClose(false); @@ -88,16 +114,36 @@ export class ExportModalBase extends React.Component { + private handleMonthChange = (_, event) => { this.setState({ timeScope: event.currentTarget.value }); }; - public handleResolutionChange = (_, event) => { + private handleNameChange = (_, event) => { + this.setState({ name: event.currentTarget.value }); + }; + + private handleResolutionChange = (_, event) => { this.setState({ resolution: event.currentTarget.value }); }; + private handleTypeChange = (_, event) => { + this.setState({ formatType: event.currentTarget.value }); + }; + + private nameValidator = value => { + if (value.trim().length === 0) { + return messages.ExportNameRequired; + } + // Todo: what is the max length allowed? + if (value.length > 50) { + return messages.ExportNameTooLong; + } + return undefined; + }; + public render() { const { + count = 0, groupBy, intl, isAllItems, @@ -105,9 +151,10 @@ export class ExportModalBase extends React.Component {error && }
- {intl.formatMessage(messages.ExportHeading, { groupBy })} + {/* Todo: Show in-progress features in beta environment only */} + {isFeatureVisible(FeatureType.exports) ? ( + + {intl.formatMessage(messages.ExportDesc, { value: {intl.formatMessage(messages.ExportsTitle)} })} + + ) : ( + {intl.formatMessage(messages.ExportHeading, { groupBy })} + )}
- {showAggregateType && ( - - - {resolutionOptions.map((option, index) => ( - - ))} - - - )} - {showTimeScope && ( - - - {timeScopeOptions.map((option, index) => ( - + {/* Todo: Show in-progress features in beta environment only */} + {isFeatureVisible(FeatureType.exports) && ( + + + - ))} - - - )} - -
    - {sortedItems.map((groupItem, index) => { - return
  • {groupItem.label}
  • ; - })} -
-
+ + + )} + {showAggregateType && ( + + + {resolutionOptions.map((option, index) => ( + + ))} + + + )} + {showTimeScope && ( + + + {timeScopeOptions.map((option, index) => ( + + ))} + + + )} + {/* Todo: Show in-progress features in beta environment only */} + {showFormatType && isFeatureVisible(FeatureType.exports) && ( + + + {formatTypeOptions.map((option, index) => ( + + ))} + + + )} + + +
    + {sortedItems.map((groupItem, index) => { + return
  • {groupItem.label}
  • ; + })} +
+
+
+
); diff --git a/src/pages/views/components/export/exportSubmit.tsx b/src/pages/views/components/export/exportSubmit.tsx index 82ff92320..2d75cf012 100644 --- a/src/pages/views/components/export/exportSubmit.tsx +++ b/src/pages/views/components/export/exportSubmit.tsx @@ -1,5 +1,5 @@ import { Button, ButtonVariant } from '@patternfly/react-core'; -import { Export } from 'api/exports/export'; +import { Export } from 'api/export/export'; import { getQuery, orgUnitIdKey, Query, tagPrefix } from 'api/queries/query'; import { ReportPathsType, ReportType } from 'api/reports/report'; import { AxiosError } from 'axios'; @@ -10,17 +10,20 @@ import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { connect } from 'react-redux'; import { createMapStateToProps, FetchStatus } from 'store/common'; -import { exportActions, exportSelectors } from 'store/exports'; +import { exportActions, exportSelectors } from 'store/export'; import { getTestProps, testIds } from 'testIds'; import { ComputedReportItem } from 'utils/computedReport/getComputedReportItems'; import { getToday } from 'utils/dateRange'; export interface ExportSubmitOwnProps { + disabled?: boolean; + formatType: 'csv' | 'json'; groupBy?: string; isAllItems?: boolean; items?: ComputedReportItem[]; onClose(isOpen: boolean); onError(error: AxiosError); + name?: string; query?: Query; reportPathsType: ReportPathsType; resolution: string; @@ -123,17 +126,17 @@ export class ExportSubmitBase extends React.Component { }; public render() { - const { intl, reportFetchStatus } = this.props; + const { disabled, intl, reportFetchStatus } = this.props; return ( ); } @@ -145,6 +148,7 @@ const mapStateToProps = createMapStateToProps { const newQuery: Query = { ...JSON.parse(JSON.stringify(query)), diff --git a/src/components/reports/reportSummary/__snapshots__/reportSummaryItem.test.tsx.snap b/src/pages/views/components/reports/reportSummary/__snapshots__/reportSummaryItem.test.tsx.snap similarity index 100% rename from src/components/reports/reportSummary/__snapshots__/reportSummaryItem.test.tsx.snap rename to src/pages/views/components/reports/reportSummary/__snapshots__/reportSummaryItem.test.tsx.snap diff --git a/src/components/reports/reportSummary/index.ts b/src/pages/views/components/reports/reportSummary/index.ts similarity index 100% rename from src/components/reports/reportSummary/index.ts rename to src/pages/views/components/reports/reportSummary/index.ts diff --git a/src/components/reports/reportSummary/reportSummary.scss b/src/pages/views/components/reports/reportSummary/reportSummary.scss similarity index 100% rename from src/components/reports/reportSummary/reportSummary.scss rename to src/pages/views/components/reports/reportSummary/reportSummary.scss diff --git a/src/components/reports/reportSummary/reportSummary.test.tsx b/src/pages/views/components/reports/reportSummary/reportSummary.test.tsx similarity index 100% rename from src/components/reports/reportSummary/reportSummary.test.tsx rename to src/pages/views/components/reports/reportSummary/reportSummary.test.tsx diff --git a/src/components/reports/reportSummary/reportSummary.tsx b/src/pages/views/components/reports/reportSummary/reportSummary.tsx similarity index 100% rename from src/components/reports/reportSummary/reportSummary.tsx rename to src/pages/views/components/reports/reportSummary/reportSummary.tsx diff --git a/src/components/reports/reportSummary/reportSummaryAlt.scss b/src/pages/views/components/reports/reportSummary/reportSummaryAlt.scss similarity index 100% rename from src/components/reports/reportSummary/reportSummaryAlt.scss rename to src/pages/views/components/reports/reportSummary/reportSummaryAlt.scss diff --git a/src/components/reports/reportSummary/reportSummaryAlt.tsx b/src/pages/views/components/reports/reportSummary/reportSummaryAlt.tsx similarity index 100% rename from src/components/reports/reportSummary/reportSummaryAlt.tsx rename to src/pages/views/components/reports/reportSummary/reportSummaryAlt.tsx diff --git a/src/components/reports/reportSummary/reportSummaryCost.scss b/src/pages/views/components/reports/reportSummary/reportSummaryCost.scss similarity index 100% rename from src/components/reports/reportSummary/reportSummaryCost.scss rename to src/pages/views/components/reports/reportSummary/reportSummaryCost.scss diff --git a/src/components/reports/reportSummary/reportSummaryCost.tsx b/src/pages/views/components/reports/reportSummary/reportSummaryCost.tsx similarity index 79% rename from src/components/reports/reportSummary/reportSummaryCost.tsx rename to src/pages/views/components/reports/reportSummary/reportSummaryCost.tsx index 9dce442bf..f6f248280 100644 --- a/src/components/reports/reportSummary/reportSummaryCost.tsx +++ b/src/pages/views/components/reports/reportSummary/reportSummaryCost.tsx @@ -1,6 +1,6 @@ import './reportSummaryCost.scss'; -import { CostChart, CostChartProps } from 'components/charts/costChart'; +import { CostChart, CostChartProps } from 'pages/views/components/charts/costChart'; import React from 'react'; import { Omit } from 'react-redux'; diff --git a/src/components/reports/reportSummary/reportSummaryDailyCost.scss b/src/pages/views/components/reports/reportSummary/reportSummaryDailyCost.scss similarity index 100% rename from src/components/reports/reportSummary/reportSummaryDailyCost.scss rename to src/pages/views/components/reports/reportSummary/reportSummaryDailyCost.scss diff --git a/src/components/reports/reportSummary/reportSummaryDailyCost.tsx b/src/pages/views/components/reports/reportSummary/reportSummaryDailyCost.tsx similarity index 71% rename from src/components/reports/reportSummary/reportSummaryDailyCost.tsx rename to src/pages/views/components/reports/reportSummary/reportSummaryDailyCost.tsx index a87b03488..8e63324bf 100644 --- a/src/components/reports/reportSummary/reportSummaryDailyCost.tsx +++ b/src/pages/views/components/reports/reportSummary/reportSummaryDailyCost.tsx @@ -1,6 +1,6 @@ import './reportSummaryDailyCost.scss'; -import { DailyCostChart, DailyCostChartProps } from 'components/charts/dailyCostChart'; +import { DailyCostChart, DailyCostChartProps } from 'pages/views/components/charts/dailyCostChart'; import React from 'react'; const ReportSummaryDailyCost: React.SFC = props => ( diff --git a/src/components/reports/reportSummary/reportSummaryDailyTrend.scss b/src/pages/views/components/reports/reportSummary/reportSummaryDailyTrend.scss similarity index 100% rename from src/components/reports/reportSummary/reportSummaryDailyTrend.scss rename to src/pages/views/components/reports/reportSummary/reportSummaryDailyTrend.scss diff --git a/src/components/reports/reportSummary/reportSummaryDailyTrend.tsx b/src/pages/views/components/reports/reportSummary/reportSummaryDailyTrend.tsx similarity index 71% rename from src/components/reports/reportSummary/reportSummaryDailyTrend.tsx rename to src/pages/views/components/reports/reportSummary/reportSummaryDailyTrend.tsx index 5b7a0f8fc..e34c55397 100644 --- a/src/components/reports/reportSummary/reportSummaryDailyTrend.tsx +++ b/src/pages/views/components/reports/reportSummary/reportSummaryDailyTrend.tsx @@ -1,6 +1,6 @@ import './reportSummaryDailyTrend.scss'; -import { DailyTrendChart, DailyTrendChartProps } from 'components/charts/dailyTrendChart'; +import { DailyTrendChart, DailyTrendChartProps } from 'pages/views/components/charts/dailyTrendChart'; import React from 'react'; const ReportSummaryDailyTrend: React.SFC = props => ( diff --git a/src/components/reports/reportSummary/reportSummaryDetails.scss b/src/pages/views/components/reports/reportSummary/reportSummaryDetails.scss similarity index 100% rename from src/components/reports/reportSummary/reportSummaryDetails.scss rename to src/pages/views/components/reports/reportSummary/reportSummaryDetails.scss diff --git a/src/components/reports/reportSummary/reportSummaryDetails.tsx b/src/pages/views/components/reports/reportSummary/reportSummaryDetails.tsx similarity index 97% rename from src/components/reports/reportSummary/reportSummaryDetails.tsx rename to src/pages/views/components/reports/reportSummary/reportSummaryDetails.tsx index 871c53216..928b643d1 100644 --- a/src/components/reports/reportSummary/reportSummaryDetails.tsx +++ b/src/pages/views/components/reports/reportSummary/reportSummaryDetails.tsx @@ -2,9 +2,9 @@ import './reportSummaryDetails.scss'; import { Tooltip } from '@patternfly/react-core'; import { Report, ReportType } from 'api/reports/report'; -import { ComputedReportItemType } from 'components/charts/common/chartDatumUtils'; -import { EmptyValueState } from 'components/state/emptyValueState/emptyValueState'; import messages from 'locales/messages'; +import { EmptyValueState } from 'pages/components/state/emptyValueState/emptyValueState'; +import { ComputedReportItemType } from 'pages/views/components/charts/common/chartDatumUtils'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; import { DashboardChartType } from 'store/dashboard/common/dashboardCommon'; diff --git a/src/components/reports/reportSummary/reportSummaryItem.scss b/src/pages/views/components/reports/reportSummary/reportSummaryItem.scss similarity index 100% rename from src/components/reports/reportSummary/reportSummaryItem.scss rename to src/pages/views/components/reports/reportSummary/reportSummaryItem.scss diff --git a/src/components/reports/reportSummary/reportSummaryItem.test.tsx b/src/pages/views/components/reports/reportSummary/reportSummaryItem.test.tsx similarity index 100% rename from src/components/reports/reportSummary/reportSummaryItem.test.tsx rename to src/pages/views/components/reports/reportSummary/reportSummaryItem.test.tsx diff --git a/src/components/reports/reportSummary/reportSummaryItem.tsx b/src/pages/views/components/reports/reportSummary/reportSummaryItem.tsx similarity index 100% rename from src/components/reports/reportSummary/reportSummaryItem.tsx rename to src/pages/views/components/reports/reportSummary/reportSummaryItem.tsx diff --git a/src/components/reports/reportSummary/reportSummaryItems.scss b/src/pages/views/components/reports/reportSummary/reportSummaryItems.scss similarity index 100% rename from src/components/reports/reportSummary/reportSummaryItems.scss rename to src/pages/views/components/reports/reportSummary/reportSummaryItems.scss diff --git a/src/components/reports/reportSummary/reportSummaryItems.test.tsx b/src/pages/views/components/reports/reportSummary/reportSummaryItems.test.tsx similarity index 100% rename from src/components/reports/reportSummary/reportSummaryItems.test.tsx rename to src/pages/views/components/reports/reportSummary/reportSummaryItems.test.tsx diff --git a/src/components/reports/reportSummary/reportSummaryItems.tsx b/src/pages/views/components/reports/reportSummary/reportSummaryItems.tsx similarity index 100% rename from src/components/reports/reportSummary/reportSummaryItems.tsx rename to src/pages/views/components/reports/reportSummary/reportSummaryItems.tsx diff --git a/src/components/reports/reportSummary/reportSummaryTrend.scss b/src/pages/views/components/reports/reportSummary/reportSummaryTrend.scss similarity index 100% rename from src/components/reports/reportSummary/reportSummaryTrend.scss rename to src/pages/views/components/reports/reportSummary/reportSummaryTrend.scss diff --git a/src/components/reports/reportSummary/reportSummaryTrend.tsx b/src/pages/views/components/reports/reportSummary/reportSummaryTrend.tsx similarity index 79% rename from src/components/reports/reportSummary/reportSummaryTrend.tsx rename to src/pages/views/components/reports/reportSummary/reportSummaryTrend.tsx index 1558fd8da..4e80c4836 100644 --- a/src/components/reports/reportSummary/reportSummaryTrend.tsx +++ b/src/pages/views/components/reports/reportSummary/reportSummaryTrend.tsx @@ -1,6 +1,6 @@ import './reportSummaryTrend.scss'; -import { TrendChart, TrendChartProps } from 'components/charts/trendChart'; +import { TrendChart, TrendChartProps } from 'pages/views/components/charts/trendChart'; import React from 'react'; import { Omit } from 'react-redux'; diff --git a/src/components/reports/reportSummary/reportSummaryUsage.scss b/src/pages/views/components/reports/reportSummary/reportSummaryUsage.scss similarity index 100% rename from src/components/reports/reportSummary/reportSummaryUsage.scss rename to src/pages/views/components/reports/reportSummary/reportSummaryUsage.scss diff --git a/src/components/reports/reportSummary/reportSummaryUsage.tsx b/src/pages/views/components/reports/reportSummary/reportSummaryUsage.tsx similarity index 79% rename from src/components/reports/reportSummary/reportSummaryUsage.tsx rename to src/pages/views/components/reports/reportSummary/reportSummaryUsage.tsx index 7514aa20a..7fa41b753 100644 --- a/src/components/reports/reportSummary/reportSummaryUsage.tsx +++ b/src/pages/views/components/reports/reportSummary/reportSummaryUsage.tsx @@ -1,6 +1,6 @@ import './reportSummaryUsage.scss'; -import { UsageChart, UsageChartProps } from 'components/charts/usageChart'; +import { UsageChart, UsageChartProps } from 'pages/views/components/charts/usageChart'; import React from 'react'; import { Omit } from 'react-redux'; diff --git a/src/pages/views/details/awsDetails/awsDetails.styles.ts b/src/pages/views/details/awsDetails/awsDetails.styles.ts index f468c6574..1876e289f 100644 --- a/src/pages/views/details/awsDetails/awsDetails.styles.ts +++ b/src/pages/views/details/awsDetails/awsDetails.styles.ts @@ -16,7 +16,8 @@ export const styles = { }, pagination: { backgroundColor: global_BackgroundColor_light_100.value, - padding: global_spacer_md.value, + paddingBottom: global_spacer_md.value, + paddingTop: global_spacer_md.value, }, tableContainer: { marginLeft: global_spacer_lg.value, diff --git a/src/pages/views/details/awsDetails/awsDetails.tsx b/src/pages/views/details/awsDetails/awsDetails.tsx index 00657b180..c626f896a 100644 --- a/src/pages/views/details/awsDetails/awsDetails.tsx +++ b/src/pages/views/details/awsDetails/awsDetails.tsx @@ -151,6 +151,7 @@ class AwsDetails extends React.Component { }); return ( 0} groupBy={groupByTagKey ? `${tagPrefix}${groupByTagKey}` : groupById} isOpen={isExportModalOpen} diff --git a/src/pages/views/details/awsDetails/detailsHeader.tsx b/src/pages/views/details/awsDetails/detailsHeader.tsx index 698c7ec07..07a16a223 100644 --- a/src/pages/views/details/awsDetails/detailsHeader.tsx +++ b/src/pages/views/details/awsDetails/detailsHeader.tsx @@ -6,9 +6,9 @@ import { getProvidersQuery } from 'api/queries/providersQuery'; import { AwsReport } from 'api/reports/awsReports'; import { TagPathsType } from 'api/tags/tag'; import { AxiosError } from 'axios'; -import { Currency } from 'components/currency'; -import { ExportLink } from 'components/export'; +import { ExportsLink } from 'components/exports'; import messages from 'locales/messages'; +import { Currency } from 'pages/components/currency'; import { CostType } from 'pages/views/components/costType'; import { GroupBy } from 'pages/views/components/groupBy/groupBy'; import { filterProviders } from 'pages/views/utils/providers'; @@ -19,7 +19,7 @@ import { createMapStateToProps, FetchStatus } from 'store/common'; import { providersQuery, providersSelectors } from 'store/providers'; import { ComputedAwsReportItemsParams, getIdKeyForGroupBy } from 'utils/computedReport/getComputedAwsReportItems'; import { getSinceDateRangeString } from 'utils/dateRange'; -import { isBetaFeature } from 'utils/feature'; +import { FeatureType, isFeatureVisible } from 'utils/feature'; import { formatCurrency } from 'utils/format'; import { styles } from './detailsHeader.styles'; @@ -85,8 +85,8 @@ class DetailsHeaderBase extends React.Component {
{/* Todo: Show in-progress features in beta environment only */} - {isBetaFeature() && } - {isBetaFeature() && } + {isFeatureVisible(FeatureType.currency) && } + {isFeatureVisible(FeatureType.exports) && }
diff --git a/src/pages/views/details/awsDetails/detailsTable.tsx b/src/pages/views/details/awsDetails/detailsTable.tsx index aae4f5243..89c37cd19 100644 --- a/src/pages/views/details/awsDetails/detailsTable.tsx +++ b/src/pages/views/details/awsDetails/detailsTable.tsx @@ -7,9 +7,9 @@ import { AwsQuery, getQuery } from 'api/queries/awsQuery'; import { tagPrefix } from 'api/queries/query'; import { AwsReport } from 'api/reports/awsReports'; import { ReportPathsType } from 'api/reports/report'; -import { EmptyFilterState } from 'components/state/emptyFilterState/emptyFilterState'; -import { EmptyValueState } from 'components/state/emptyValueState/emptyValueState'; import messages from 'locales/messages'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; +import { EmptyValueState } from 'pages/components/state/emptyValueState/emptyValueState'; import { Actions } from 'pages/views/details/components/actions/actions'; import { getGroupByOrgValue, getGroupByTagKey } from 'pages/views/utils/groupBy'; import { getOrgBreakdownPath } from 'pages/views/utils/paths'; diff --git a/src/pages/views/details/azureDetails/azureDetails.styles.ts b/src/pages/views/details/azureDetails/azureDetails.styles.ts index 17f7e7a6b..6ea952a95 100644 --- a/src/pages/views/details/azureDetails/azureDetails.styles.ts +++ b/src/pages/views/details/azureDetails/azureDetails.styles.ts @@ -17,7 +17,8 @@ export const styles = { }, pagination: { backgroundColor: global_BackgroundColor_light_100.value, - padding: global_spacer_md.value, + paddingBottom: global_spacer_md.value, + paddingTop: global_spacer_md.value, }, tableContainer: { marginLeft: global_spacer_lg.value, diff --git a/src/pages/views/details/azureDetails/azureDetails.tsx b/src/pages/views/details/azureDetails/azureDetails.tsx index 3fd60f34a..136b066de 100644 --- a/src/pages/views/details/azureDetails/azureDetails.tsx +++ b/src/pages/views/details/azureDetails/azureDetails.tsx @@ -148,6 +148,7 @@ class AzureDetails extends React.Component { }); return ( 0} groupBy={groupByTagKey ? `${tagPrefix}${groupByTagKey}` : groupById} isOpen={isExportModalOpen} diff --git a/src/pages/views/details/azureDetails/detailsHeader.tsx b/src/pages/views/details/azureDetails/detailsHeader.tsx index 88aa488ad..cdc0fc118 100644 --- a/src/pages/views/details/azureDetails/detailsHeader.tsx +++ b/src/pages/views/details/azureDetails/detailsHeader.tsx @@ -5,9 +5,9 @@ import { getProvidersQuery } from 'api/queries/providersQuery'; import { AzureReport } from 'api/reports/azureReports'; import { TagPathsType } from 'api/tags/tag'; import { AxiosError } from 'axios'; -import { Currency } from 'components/currency'; -import { ExportLink } from 'components/export'; +import { ExportsLink } from 'components/exports'; import messages from 'locales/messages'; +import { Currency } from 'pages/components/currency'; import { GroupBy } from 'pages/views/components/groupBy/groupBy'; import { filterProviders } from 'pages/views/utils/providers'; import React from 'react'; @@ -17,7 +17,7 @@ import { createMapStateToProps, FetchStatus } from 'store/common'; import { providersQuery, providersSelectors } from 'store/providers'; import { ComputedAzureReportItemsParams, getIdKeyForGroupBy } from 'utils/computedReport/getComputedAzureReportItems'; import { getSinceDateRangeString } from 'utils/dateRange'; -import { isBetaFeature } from 'utils/feature'; +import { FeatureType, isFeatureVisible } from 'utils/feature'; import { formatCurrency } from 'utils/format'; import { styles } from './detailsHeader.styles'; @@ -73,8 +73,8 @@ class DetailsHeaderBase extends React.Component {
{/* Todo: Show in-progress features in beta environment only */} - {isBetaFeature() && } - {isBetaFeature() && } + {isFeatureVisible(FeatureType.currency) && } + {isFeatureVisible(FeatureType.exports) && }
diff --git a/src/pages/views/details/azureDetails/detailsTable.tsx b/src/pages/views/details/azureDetails/detailsTable.tsx index d7fe815f5..848db9ea7 100644 --- a/src/pages/views/details/azureDetails/detailsTable.tsx +++ b/src/pages/views/details/azureDetails/detailsTable.tsx @@ -7,9 +7,9 @@ import { AzureQuery, getQuery } from 'api/queries/azureQuery'; import { tagPrefix } from 'api/queries/query'; import { AzureReport } from 'api/reports/azureReports'; import { ReportPathsType } from 'api/reports/report'; -import { EmptyFilterState } from 'components/state/emptyFilterState/emptyFilterState'; -import { EmptyValueState } from 'components/state/emptyValueState/emptyValueState'; import messages from 'locales/messages'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; +import { EmptyValueState } from 'pages/components/state/emptyValueState/emptyValueState'; import { Actions } from 'pages/views/details/components/actions/actions'; import { getBreakdownPath } from 'pages/views/utils/paths'; import React from 'react'; diff --git a/src/pages/views/details/components/actions/actions.tsx b/src/pages/views/details/components/actions/actions.tsx index a7e625e10..d4edf9ed5 100644 --- a/src/pages/views/details/components/actions/actions.tsx +++ b/src/pages/views/details/components/actions/actions.tsx @@ -59,6 +59,7 @@ class DetailsActionsBase extends React.Component { return ( {
{/* Todo: Show in-progress features in beta environment only */} - {isBetaFeature() && } - {isBetaFeature() && } + {isFeatureVisible(FeatureType.currency) && }
diff --git a/src/pages/views/details/components/historicalData/historicalDataCostChart.tsx b/src/pages/views/details/components/historicalData/historicalDataCostChart.tsx index 29746dfc1..c56739dbe 100644 --- a/src/pages/views/details/components/historicalData/historicalDataCostChart.tsx +++ b/src/pages/views/details/components/historicalData/historicalDataCostChart.tsx @@ -1,9 +1,9 @@ import { Skeleton } from '@patternfly/react-core'; import { getQuery, parseQuery, Query } from 'api/queries/query'; import { Report, ReportPathsType, ReportType } from 'api/reports/report'; -import { ChartType, transformReport } from 'components/charts/common/chartDatumUtils'; -import { HistoricalCostChart } from 'components/charts/historicalCostChart'; import messages from 'locales/messages'; +import { ChartType, transformReport } from 'pages/views/components/charts/common/chartDatumUtils'; +import { HistoricalCostChart } from 'pages/views/components/charts/historicalCostChart'; import { getGroupById, getGroupByValue } from 'pages/views/utils/groupBy'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; diff --git a/src/pages/views/details/components/historicalData/historicalDataTrendChart.tsx b/src/pages/views/details/components/historicalData/historicalDataTrendChart.tsx index 68e58ad92..064ff69a1 100644 --- a/src/pages/views/details/components/historicalData/historicalDataTrendChart.tsx +++ b/src/pages/views/details/components/historicalData/historicalDataTrendChart.tsx @@ -1,9 +1,9 @@ import { Skeleton } from '@patternfly/react-core'; import { getQuery, logicalAndPrefix, orgUnitIdKey, parseQuery, Query } from 'api/queries/query'; import { Report, ReportPathsType, ReportType } from 'api/reports/report'; -import { ChartType, transformReport } from 'components/charts/common/chartDatumUtils'; -import { HistoricalTrendChart } from 'components/charts/historicalTrendChart'; import messages from 'locales/messages'; +import { ChartType, transformReport } from 'pages/views/components/charts/common/chartDatumUtils'; +import { HistoricalTrendChart } from 'pages/views/components/charts/historicalTrendChart'; import { getGroupById, getGroupByOrgValue, getGroupByValue } from 'pages/views/utils/groupBy'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; diff --git a/src/pages/views/details/components/historicalData/historicalDataUsageChart.tsx b/src/pages/views/details/components/historicalData/historicalDataUsageChart.tsx index cfd257aa1..455dcd65e 100644 --- a/src/pages/views/details/components/historicalData/historicalDataUsageChart.tsx +++ b/src/pages/views/details/components/historicalData/historicalDataUsageChart.tsx @@ -1,9 +1,9 @@ import { Skeleton } from '@patternfly/react-core'; import { getQuery, logicalAndPrefix, orgUnitIdKey, parseQuery, Query } from 'api/queries/query'; import { Report, ReportPathsType, ReportType } from 'api/reports/report'; -import { ChartType, transformReport } from 'components/charts/common/chartDatumUtils'; -import { HistoricalUsageChart } from 'components/charts/historicalUsageChart'; import messages from 'locales/messages'; +import { ChartType, transformReport } from 'pages/views/components/charts/common/chartDatumUtils'; +import { HistoricalUsageChart } from 'pages/views/components/charts/historicalUsageChart'; import { getGroupById, getGroupByOrgValue, getGroupByValue } from 'pages/views/utils/groupBy'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; diff --git a/src/pages/views/details/components/summary/summaryCard.tsx b/src/pages/views/details/components/summary/summaryCard.tsx index 305d214b4..0f6f9a6e0 100644 --- a/src/pages/views/details/components/summary/summaryCard.tsx +++ b/src/pages/views/details/components/summary/summaryCard.tsx @@ -13,8 +13,8 @@ import { import { getQuery, logicalAndPrefix, orgUnitIdKey, parseQuery, Query } from 'api/queries/query'; import { OcpReport } from 'api/reports/ocpReports'; import { ReportPathsType, ReportType } from 'api/reports/report'; -import { ReportSummaryItem, ReportSummaryItems } from 'components/reports/reportSummary'; import messages from 'locales/messages'; +import { ReportSummaryItem, ReportSummaryItems } from 'pages/views/components/reports/reportSummary'; import { SummaryModal } from 'pages/views/details/components/summary/summaryModal'; import { getGroupById, getGroupByOrgValue, getGroupByValue } from 'pages/views/utils/groupBy'; import React from 'react'; diff --git a/src/pages/views/details/components/summary/summaryModalContent.tsx b/src/pages/views/details/components/summary/summaryModalContent.tsx index 070d3af0e..184d422e1 100644 --- a/src/pages/views/details/components/summary/summaryModalContent.tsx +++ b/src/pages/views/details/components/summary/summaryModalContent.tsx @@ -1,8 +1,8 @@ import { Title, TitleSizes } from '@patternfly/react-core'; import { getQuery, logicalAndPrefix, orgUnitIdKey, parseQuery, Query } from 'api/queries/query'; import { Report, ReportPathsType, ReportType } from 'api/reports/report'; -import { ReportSummaryItem, ReportSummaryItems } from 'components/reports/reportSummary'; import messages from 'locales/messages'; +import { ReportSummaryItem, ReportSummaryItems } from 'pages/views/components/reports/reportSummary'; import { getGroupById, getGroupByOrgValue, getGroupByValue } from 'pages/views/utils/groupBy'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; diff --git a/src/pages/views/details/components/usageChart/usageChart.tsx b/src/pages/views/details/components/usageChart/usageChart.tsx index 1f5198342..fe63e0723 100644 --- a/src/pages/views/details/components/usageChart/usageChart.tsx +++ b/src/pages/views/details/components/usageChart/usageChart.tsx @@ -1,4 +1,4 @@ -import 'components/charts/common/charts-common.scss'; +import 'pages/views/components/charts/common/charts-common.scss'; import { ChartBullet } from '@patternfly/react-charts'; import { Grid, GridItem, Skeleton } from '@patternfly/react-core'; @@ -6,8 +6,8 @@ import { OcpQuery, parseQuery } from 'api/queries/ocpQuery'; import { getQuery, Query } from 'api/queries/query'; import { Report } from 'api/reports/report'; import { ReportPathsType, ReportType } from 'api/reports/report'; -import { getResizeObserver } from 'components/charts/common/chartUtils'; import messages from 'locales/messages'; +import { getResizeObserver } from 'pages/views/components/charts/common/chartUtils'; import { getGroupById, getGroupByValue } from 'pages/views/utils/groupBy'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; @@ -85,7 +85,7 @@ class UsageChartBase extends React.Component { }; private getChartDatum(): ChartDatum { - const { report, intl } = this.props; + const { groupBy, report, intl } = this.props; const datum: ChartDatum = { limit: {}, ranges: [], @@ -112,92 +112,27 @@ class UsageChartBase extends React.Component { value: Math.trunc(limit), }; - const hasRequest = hasTotal && report.meta.total.request && report.meta.total.request !== null; - const request = Math.trunc(hasRequest ? report.meta.total.request.value : 0); - const requestUnits = intl.formatMessage(messages.Units, { - units: unitsLookupKey(hasRequest ? report.meta.total.request.units : undefined), - }); - datum.ranges = [ - { - legend: intl.formatMessage(messages.DetailsUsageRequests, { - value: request, - units: requestUnits, - }), - tooltip: intl.formatMessage(messages.DetailsUsageRequests, { - value: request, - units: requestUnits, - }), - value: Math.trunc(request), - }, - ]; - - const hasUsage = hasTotal && report.meta.total.usage && report.meta.total.usage !== null; - const usage = Math.trunc(hasUsage ? report.meta.total.usage.value : 0); - const usageUnits = intl.formatMessage(messages.Units, { - units: unitsLookupKey(hasUsage ? report.meta.total.usage.units : undefined), - }); - datum.usage = [ - { - legend: intl.formatMessage(messages.DetailsUsageUsage, { - value: usage, - units: usageUnits, - }), - tooltip: intl.formatMessage(messages.DetailsUsageUsage, { - value: usage, - units: usageUnits, - }), - value: Math.trunc(usage), - }, - ]; - return datum; - } - - private getChartDatumWithCapacity(): ChartDatum { - const { report, intl } = this.props; - const datum: ChartDatum = { - limit: {}, - ranges: [], - usage: [], - }; - - // Always show bullet chart legends https://github.com/project-koku/koku-ui/issues/963 - const hasTotal = report && report.meta && report.meta.total; - - const hasLimit = hasTotal && report.meta.total.limit && report.meta.total.limit !== null; - const limit = Math.trunc(hasLimit ? report.meta.total.limit.value : 0); - const limitUnits = intl.formatMessage(messages.Units, { - units: unitsLookupKey(hasLimit ? report.meta.total.limit.units : undefined), - }); - datum.limit = { - legend: intl.formatMessage(messages.DetailsUsageLimit, { - value: limit, - units: limitUnits, - }), - tooltip: intl.formatMessage(messages.DetailsUsageLimit, { - value: limit, - units: limitUnits, - }), - value: Math.trunc(limit), - }; - - const hasCapacity = hasTotal && report.meta.total.request && report.meta.total.request !== null; - const capacity = Math.trunc(hasCapacity ? report.meta.total.capacity.value : 0); - const capacityUnits = intl.formatMessage(messages.Units, { - units: unitsLookupKey(hasCapacity ? report.meta.total.capacity.units : undefined), - }); - datum.ranges = [ - { - legend: intl.formatMessage(messages.DetailsUsageCapacity, { - value: capacity, - units: capacityUnits, - }), - tooltip: intl.formatMessage(messages.DetailsUsageCapacity, { - value: capacity, - units: capacityUnits, - }), - value: Math.trunc(capacity), - }, - ]; + // Qualitative range included only when grouped by cluster + if (groupBy === 'cluster') { + const hasCapacity = hasTotal && report.meta.total.request && report.meta.total.request !== null; + const capacity = Math.trunc(hasCapacity ? report.meta.total.capacity.value : 0); + const capacityUnits = intl.formatMessage(messages.Units, { + units: unitsLookupKey(hasCapacity ? report.meta.total.capacity.units : undefined), + }); + datum.ranges = [ + { + legend: intl.formatMessage(messages.DetailsUsageCapacity, { + value: capacity, + units: capacityUnits, + }), + tooltip: intl.formatMessage(messages.DetailsUsageCapacity, { + value: capacity, + units: capacityUnits, + }), + value: Math.trunc(capacity), + }, + ]; + } const hasRequest = hasTotal && report.meta.total.request && report.meta.total.request !== null; const hasUsage = hasTotal && report.meta.total.usage && report.meta.total.usage !== null; @@ -240,7 +175,7 @@ class UsageChartBase extends React.Component { const { groupBy, reportFetchStatus, report } = this.props; const { width } = this.state; - const chartDatum = groupBy === 'cluster' ? this.getChartDatumWithCapacity() : this.getChartDatum(); + const chartDatum = this.getChartDatum(); if (!report || chartDatum.usage.length === 0) { return null; diff --git a/src/pages/views/details/gcpDetails/detailsHeader.tsx b/src/pages/views/details/gcpDetails/detailsHeader.tsx index 270b6f5a1..1e4650b47 100644 --- a/src/pages/views/details/gcpDetails/detailsHeader.tsx +++ b/src/pages/views/details/gcpDetails/detailsHeader.tsx @@ -5,9 +5,9 @@ import { getProvidersQuery } from 'api/queries/providersQuery'; import { GcpReport } from 'api/reports/gcpReports'; import { TagPathsType } from 'api/tags/tag'; import { AxiosError } from 'axios'; -import { Currency } from 'components/currency'; -import { ExportLink } from 'components/export'; +import { ExportsLink } from 'components/exports'; import messages from 'locales/messages'; +import { Currency } from 'pages/components/currency'; import { GroupBy } from 'pages/views/components/groupBy/groupBy'; import { filterProviders } from 'pages/views/utils/providers'; import React from 'react'; @@ -17,7 +17,7 @@ import { createMapStateToProps, FetchStatus } from 'store/common'; import { providersQuery, providersSelectors } from 'store/providers'; import { ComputedGcpReportItemsParams, getIdKeyForGroupBy } from 'utils/computedReport/getComputedGcpReportItems'; import { getSinceDateRangeString } from 'utils/dateRange'; -import { isBetaFeature } from 'utils/feature'; +import { FeatureType, isFeatureVisible } from 'utils/feature'; import { formatCurrency } from 'utils/format'; import { styles } from './detailsHeader.styles'; @@ -74,8 +74,8 @@ class DetailsHeaderBase extends React.Component {
{/* Todo: Show in-progress features in beta environment only */} - {isBetaFeature() && } - {isBetaFeature() && } + {isFeatureVisible(FeatureType.currency) && } + {isFeatureVisible(FeatureType.exports) && }
diff --git a/src/pages/views/details/gcpDetails/detailsTable.tsx b/src/pages/views/details/gcpDetails/detailsTable.tsx index b00e83fe6..bc78602f7 100644 --- a/src/pages/views/details/gcpDetails/detailsTable.tsx +++ b/src/pages/views/details/gcpDetails/detailsTable.tsx @@ -7,9 +7,9 @@ import { GcpQuery, getQuery } from 'api/queries/gcpQuery'; import { tagPrefix } from 'api/queries/query'; import { GcpReport } from 'api/reports/gcpReports'; import { ReportPathsType } from 'api/reports/report'; -import { EmptyFilterState } from 'components/state/emptyFilterState/emptyFilterState'; -import { EmptyValueState } from 'components/state/emptyValueState/emptyValueState'; import messages from 'locales/messages'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; +import { EmptyValueState } from 'pages/components/state/emptyValueState/emptyValueState'; import { Actions } from 'pages/views/details/components/actions/actions'; import { getBreakdownPath } from 'pages/views/utils/paths'; import React from 'react'; diff --git a/src/pages/views/details/gcpDetails/gcpDetails.tsx b/src/pages/views/details/gcpDetails/gcpDetails.tsx index a904aca0e..2b5d6e557 100644 --- a/src/pages/views/details/gcpDetails/gcpDetails.tsx +++ b/src/pages/views/details/gcpDetails/gcpDetails.tsx @@ -148,6 +148,7 @@ class GcpDetails extends React.Component { }); return ( 0} groupBy={groupByTagKey ? `${tagPrefix}${groupByTagKey}` : groupById} isOpen={isExportModalOpen} diff --git a/src/pages/views/details/ibmDetails/detailsHeader.tsx b/src/pages/views/details/ibmDetails/detailsHeader.tsx index e7d65ad60..b9cc66a8d 100644 --- a/src/pages/views/details/ibmDetails/detailsHeader.tsx +++ b/src/pages/views/details/ibmDetails/detailsHeader.tsx @@ -5,9 +5,9 @@ import { getProvidersQuery } from 'api/queries/providersQuery'; import { IbmReport } from 'api/reports/ibmReports'; import { TagPathsType } from 'api/tags/tag'; import { AxiosError } from 'axios'; -import { Currency } from 'components/currency'; -import { ExportLink } from 'components/export'; +import { ExportsLink } from 'components/exports'; import messages from 'locales/messages'; +import { Currency } from 'pages/components/currency'; import { GroupBy } from 'pages/views/components/groupBy/groupBy'; import { filterProviders } from 'pages/views/utils/providers'; import React from 'react'; @@ -17,7 +17,7 @@ import { createMapStateToProps, FetchStatus } from 'store/common'; import { providersQuery, providersSelectors } from 'store/providers'; import { ComputedIbmReportItemsParams, getIdKeyForGroupBy } from 'utils/computedReport/getComputedIbmReportItems'; import { getSinceDateRangeString } from 'utils/dateRange'; -import { isBetaFeature } from 'utils/feature'; +import { FeatureType, isFeatureVisible } from 'utils/feature'; import { formatCurrency } from 'utils/format'; import { styles } from './detailsHeader.styles'; @@ -74,8 +74,8 @@ class DetailsHeaderBase extends React.Component {
{/* Todo: Show in-progress features in beta environment only */} - {isBetaFeature() && } - {isBetaFeature() && } + {isFeatureVisible(FeatureType.currency) && } + {isFeatureVisible(FeatureType.exports) && }
diff --git a/src/pages/views/details/ibmDetails/detailsTable.tsx b/src/pages/views/details/ibmDetails/detailsTable.tsx index 1ea37f9f6..820776612 100644 --- a/src/pages/views/details/ibmDetails/detailsTable.tsx +++ b/src/pages/views/details/ibmDetails/detailsTable.tsx @@ -7,9 +7,9 @@ import { getQuery, IbmQuery } from 'api/queries/ibmQuery'; import { tagPrefix } from 'api/queries/query'; import { IbmReport } from 'api/reports/ibmReports'; import { ReportPathsType } from 'api/reports/report'; -import { EmptyFilterState } from 'components/state/emptyFilterState/emptyFilterState'; -import { EmptyValueState } from 'components/state/emptyValueState/emptyValueState'; import messages from 'locales/messages'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; +import { EmptyValueState } from 'pages/components/state/emptyValueState/emptyValueState'; import { Actions } from 'pages/views/details/components/actions/actions'; import { getBreakdownPath } from 'pages/views/utils/paths'; import React from 'react'; diff --git a/src/pages/views/details/ibmDetails/ibmDetails.styles.ts b/src/pages/views/details/ibmDetails/ibmDetails.styles.ts index d554e26c8..56488202f 100644 --- a/src/pages/views/details/ibmDetails/ibmDetails.styles.ts +++ b/src/pages/views/details/ibmDetails/ibmDetails.styles.ts @@ -16,7 +16,8 @@ export const styles = { }, pagination: { backgroundColor: global_BackgroundColor_light_100.value, - padding: global_spacer_md.value, + paddingBottom: global_spacer_md.value, + paddingTop: global_spacer_md.value, }, tableContainer: { marginLeft: global_spacer_lg.value, diff --git a/src/pages/views/details/ibmDetails/ibmDetails.tsx b/src/pages/views/details/ibmDetails/ibmDetails.tsx index af245eb56..2a9f70dc3 100644 --- a/src/pages/views/details/ibmDetails/ibmDetails.tsx +++ b/src/pages/views/details/ibmDetails/ibmDetails.tsx @@ -149,6 +149,7 @@ class IbmDetails extends React.Component { }); return ( 0} groupBy={groupByTagKey ? `${tagPrefix}${groupByTagKey}` : groupById} isOpen={isExportModalOpen} diff --git a/src/pages/views/details/ocpDetails/detailsHeader.tsx b/src/pages/views/details/ocpDetails/detailsHeader.tsx index d71b3607d..d90422ae2 100644 --- a/src/pages/views/details/ocpDetails/detailsHeader.tsx +++ b/src/pages/views/details/ocpDetails/detailsHeader.tsx @@ -5,10 +5,10 @@ import { getProvidersQuery } from 'api/queries/providersQuery'; import { OcpReport } from 'api/reports/ocpReports'; import { TagPathsType } from 'api/tags/tag'; import { AxiosError } from 'axios'; -import { Currency } from 'components/currency'; -import { ExportLink } from 'components/export'; -import { EmptyValueState } from 'components/state/emptyValueState/emptyValueState'; +import { ExportsLink } from 'components/exports'; import messages from 'locales/messages'; +import { Currency } from 'pages/components/currency'; +import { EmptyValueState } from 'pages/components/state/emptyValueState/emptyValueState'; import { GroupBy } from 'pages/views/components/groupBy/groupBy'; import { filterProviders } from 'pages/views/utils/providers'; import React from 'react'; @@ -18,7 +18,7 @@ import { createMapStateToProps, FetchStatus } from 'store/common'; import { providersQuery, providersSelectors } from 'store/providers'; import { ComputedOcpReportItemsParams, getIdKeyForGroupBy } from 'utils/computedReport/getComputedOcpReportItems'; import { getSinceDateRangeString } from 'utils/dateRange'; -import { isBetaFeature } from 'utils/feature'; +import { FeatureType, isFeatureVisible } from 'utils/feature'; import { formatCurrency } from 'utils/format'; import { styles } from './detailsHeader.styles'; @@ -98,8 +98,8 @@ class DetailsHeaderBase extends React.Component {
{/* Todo: Show in-progress features in beta environment only */} - {isBetaFeature() && } - {isBetaFeature() && } + {isFeatureVisible(FeatureType.currency) && } + {isFeatureVisible(FeatureType.exports) && }
diff --git a/src/pages/views/details/ocpDetails/detailsTable.tsx b/src/pages/views/details/ocpDetails/detailsTable.tsx index e4f431dde..104449201 100644 --- a/src/pages/views/details/ocpDetails/detailsTable.tsx +++ b/src/pages/views/details/ocpDetails/detailsTable.tsx @@ -8,9 +8,9 @@ import { getQuery, OcpQuery } from 'api/queries/ocpQuery'; import { tagPrefix } from 'api/queries/query'; import { OcpReport } from 'api/reports/ocpReports'; import { ReportPathsType } from 'api/reports/report'; -import { EmptyFilterState } from 'components/state/emptyFilterState/emptyFilterState'; -import { EmptyValueState } from 'components/state/emptyValueState/emptyValueState'; import messages from 'locales/messages'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; +import { EmptyValueState } from 'pages/components/state/emptyValueState/emptyValueState'; import { Actions } from 'pages/views/details/components/actions/actions'; import { getBreakdownPath } from 'pages/views/utils/paths'; import React from 'react'; @@ -380,7 +380,7 @@ class DetailsTableBase extends React.Component { for (const column of columns) { if (column.orderBy === key) { direction = query.order_by[key] === 'asc' ? SortByDirection.asc : SortByDirection.desc; - index = c + 1; + index = c + 1; // Bump for selection column break; } c++; diff --git a/src/pages/views/details/ocpDetails/ocpDetails.styles.ts b/src/pages/views/details/ocpDetails/ocpDetails.styles.ts index e1f06925c..7d4cc89e5 100644 --- a/src/pages/views/details/ocpDetails/ocpDetails.styles.ts +++ b/src/pages/views/details/ocpDetails/ocpDetails.styles.ts @@ -17,7 +17,8 @@ export const styles = { }, pagination: { backgroundColor: global_BackgroundColor_light_100.value, - padding: global_spacer_md.value, + paddingBottom: global_spacer_md.value, + paddingTop: global_spacer_md.value, }, tableContainer: { marginLeft: global_spacer_lg.value, diff --git a/src/pages/views/details/ocpDetails/ocpDetails.tsx b/src/pages/views/details/ocpDetails/ocpDetails.tsx index 179b12e98..27f386e78 100644 --- a/src/pages/views/details/ocpDetails/ocpDetails.tsx +++ b/src/pages/views/details/ocpDetails/ocpDetails.tsx @@ -194,6 +194,7 @@ class OcpDetails extends React.Component { }); return ( 0} groupBy={groupByTagKey ? `${tagPrefix}${groupByTagKey}` : groupById} isOpen={isExportModalOpen} diff --git a/src/pages/views/explorer/explorer.styles.ts b/src/pages/views/explorer/explorer.styles.ts index 4bc60b938..a40cc7ea2 100644 --- a/src/pages/views/explorer/explorer.styles.ts +++ b/src/pages/views/explorer/explorer.styles.ts @@ -23,7 +23,8 @@ export const styles = { }, pagination: { backgroundColor: global_BackgroundColor_light_100.value, - padding: global_spacer_md.value, + paddingBottom: global_spacer_md.value, + paddingTop: global_spacer_md.value, }, tableContainer: { marginLeft: global_spacer_lg.value, diff --git a/src/pages/views/explorer/explorer.tsx b/src/pages/views/explorer/explorer.tsx index d0491c594..f437bbe6c 100644 --- a/src/pages/views/explorer/explorer.tsx +++ b/src/pages/views/explorer/explorer.tsx @@ -162,6 +162,7 @@ class Explorer extends React.Component { }); return ( 0} groupBy={groupByTagKey ? `${tagPrefix}${groupByTagKey}` : groupById} isOpen={isExportModalOpen} diff --git a/src/pages/views/explorer/explorerChart.tsx b/src/pages/views/explorer/explorerChart.tsx index efad889eb..2ed184eaa 100644 --- a/src/pages/views/explorer/explorerChart.tsx +++ b/src/pages/views/explorer/explorerChart.tsx @@ -2,16 +2,16 @@ import { Skeleton, Title } from '@patternfly/react-core'; import { getQuery, parseQuery, Query } from 'api/queries/query'; import { Report } from 'api/reports/report'; import { AxiosError } from 'axios'; +import { format, getDate, getMonth } from 'date-fns'; +import messages from 'locales/messages'; import { ChartDatum, ComputedReportItemType, ComputedReportItemValueType, isFloat, isInt, -} from 'components/charts/common/chartDatumUtils'; -import { CostExplorerChart } from 'components/charts/costExplorerChart'; -import { format, getDate, getMonth } from 'date-fns'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartDatumUtils'; +import { CostExplorerChart } from 'pages/views/components/charts/costExplorerChart'; import { getGroupByOrgValue, getGroupByTagKey } from 'pages/views/utils/groupBy'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; diff --git a/src/pages/views/explorer/explorerHeader.tsx b/src/pages/views/explorer/explorerHeader.tsx index 5967d2bdc..eef7db5fd 100644 --- a/src/pages/views/explorer/explorerHeader.tsx +++ b/src/pages/views/explorer/explorerHeader.tsx @@ -5,9 +5,9 @@ import { getQuery, parseQuery, Query } from 'api/queries/query'; import { getUserAccessQuery } from 'api/queries/userAccessQuery'; import { UserAccess, UserAccessType } from 'api/userAccess'; import { AxiosError } from 'axios'; -import { Currency } from 'components/currency'; -import { ExportLink } from 'components/export'; +import { ExportsLink } from 'components/exports'; import messages from 'locales/messages'; +import { Currency } from 'pages/components/currency'; import { CostType } from 'pages/views/components/costType'; import { GroupBy } from 'pages/views/components/groupBy/groupBy'; import { Perspective } from 'pages/views/components/perspective/perspective'; @@ -21,7 +21,7 @@ import { providersQuery, providersSelectors } from 'store/providers'; import { userAccessQuery, userAccessSelectors } from 'store/userAccess'; import { getIdKeyForGroupBy } from 'utils/computedReport/getComputedExplorerReportItems'; import { getLast60DaysDate } from 'utils/dateRange'; -import { isBetaFeature } from 'utils/feature'; +import { FeatureType, isFeatureVisible } from 'utils/feature'; import { getCostType } from 'utils/localStorage'; import { hasAwsAccess, @@ -149,13 +149,14 @@ class ExplorerHeaderBase extends React.Component { if (hasGcp) { options.push(...infrastructureGcpOptions); } - if (isBetaFeature() && this.isGcpOcpAvailable()) { + if (isFeatureVisible(FeatureType.gcpOcp) && this.isGcpOcpAvailable()) { options.push(...infrastructureGcpOcpOptions); } if (hasIbm) { options.push(...infrastructureIbmOptions); } - if (isBetaFeature() && this.isIbmOcpAvailable()) { + // Todo: Show in-progress features in beta environment only + if (isFeatureVisible(FeatureType.ibm) && this.isIbmOcpAvailable()) { options.push(...infrastructureIbmOcpOptions); } if (hasAzure) { @@ -295,8 +296,8 @@ class ExplorerHeaderBase extends React.Component {
{/* Todo: Show in-progress features in beta environment only */} - {isBetaFeature() && } - {isBetaFeature() && } + {isFeatureVisible(FeatureType.currency) && } + {isFeatureVisible(FeatureType.exports) && }
diff --git a/src/pages/views/explorer/explorerTable.tsx b/src/pages/views/explorer/explorerTable.tsx index 9df257bd6..86414c253 100644 --- a/src/pages/views/explorer/explorerTable.tsx +++ b/src/pages/views/explorer/explorerTable.tsx @@ -6,10 +6,13 @@ import { nowrap, sortable, SortByDirection, Table, TableBody, TableHeader } from import { AwsQuery, getQuery } from 'api/queries/awsQuery'; import { parseQuery, Query } from 'api/queries/query'; import { AwsReport } from 'api/reports/awsReports'; -import { ComputedReportItemType, ComputedReportItemValueType } from 'components/charts/common/chartDatumUtils'; -import { EmptyFilterState } from 'components/state/emptyFilterState/emptyFilterState'; import { format, getDate, getMonth } from 'date-fns'; import messages from 'locales/messages'; +import { EmptyFilterState } from 'pages/components/state/emptyFilterState/emptyFilterState'; +import { + ComputedReportItemType, + ComputedReportItemValueType, +} from 'pages/views/components/charts/common/chartDatumUtils'; import { getGroupByOrgValue, getGroupByTagKey } from 'pages/views/utils/groupBy'; import React from 'react'; import { injectIntl, WrappedComponentProps } from 'react-intl'; diff --git a/src/pages/views/explorer/explorerUtils.ts b/src/pages/views/explorer/explorerUtils.ts index 63c0092eb..4c8734589 100644 --- a/src/pages/views/explorer/explorerUtils.ts +++ b/src/pages/views/explorer/explorerUtils.ts @@ -6,9 +6,12 @@ import { ReportPathsType, ReportType } from 'api/reports/report'; import { ResourcePathsType } from 'api/resources/resource'; import { TagPathsType } from 'api/tags/tag'; import { UserAccess } from 'api/userAccess'; -import { ComputedReportItemType, ComputedReportItemValueType } from 'components/charts/common/chartDatumUtils'; import { format } from 'date-fns'; import messages from 'locales/messages'; +import { + ComputedReportItemType, + ComputedReportItemValueType, +} from 'pages/views/components/charts/common/chartDatumUtils'; import { hasCloudProvider } from 'pages/views/utils/providers'; import { ComputedAwsReportItemsParams } from 'utils/computedReport/getComputedAwsReportItems'; import { ComputedAzureReportItemsParams } from 'utils/computedReport/getComputedAzureReportItems'; @@ -107,7 +110,7 @@ export const groupByGcpOcpOptions: { value: ComputedGcpReportItemsParams['idKey']; }[] = [ { label: 'account', value: 'account' }, - { label: 'project', value: 'project' }, + { label: 'gcp_project', value: 'gcp_project' }, { label: 'service', value: 'service' }, { label: 'region', value: 'region' }, ]; diff --git a/src/pages/views/overview/awsDashboard/awsDashboardWidget.tsx b/src/pages/views/overview/awsDashboard/awsDashboardWidget.tsx index 10c7d0237..b02c4a5c9 100644 --- a/src/pages/views/overview/awsDashboard/awsDashboardWidget.tsx +++ b/src/pages/views/overview/awsDashboard/awsDashboardWidget.tsx @@ -25,8 +25,6 @@ export const getIdKeyForTab = (tab: AwsDashboardTab): ComputedAwsReportItemsPara return 'account'; case AwsDashboardTab.regions: return 'region'; - case AwsDashboardTab.instanceType: - return 'instance_type'; } }; diff --git a/src/pages/views/overview/awsOcpDashboard/awsOcpDashboardWidget.tsx b/src/pages/views/overview/awsOcpDashboard/awsOcpDashboardWidget.tsx index 1ef1bb34d..8b2c346dc 100644 --- a/src/pages/views/overview/awsOcpDashboard/awsOcpDashboardWidget.tsx +++ b/src/pages/views/overview/awsOcpDashboard/awsOcpDashboardWidget.tsx @@ -25,8 +25,6 @@ export const getIdKeyForTab = (tab: AwsOcpDashboardTab): ComputedAwsReportItemsP return 'account'; case AwsOcpDashboardTab.regions: return 'region'; - case AwsOcpDashboardTab.instanceType: - return 'instance_type'; } }; diff --git a/src/pages/views/overview/azureDashboard/azureDashboardWidget.tsx b/src/pages/views/overview/azureDashboard/azureDashboardWidget.tsx index b1864ab74..5df9d672e 100644 --- a/src/pages/views/overview/azureDashboard/azureDashboardWidget.tsx +++ b/src/pages/views/overview/azureDashboard/azureDashboardWidget.tsx @@ -25,8 +25,6 @@ export const getIdKeyForTab = (tab: AzureDashboardTab): ComputedAzureReportItems return 'subscription_guid'; case AzureDashboardTab.resource_locations: return 'resource_location'; - case AzureDashboardTab.instanceType: - return 'instance_type'; } }; diff --git a/src/pages/views/overview/azureOcpDashboard/azureOcpDashboardWidget.tsx b/src/pages/views/overview/azureOcpDashboard/azureOcpDashboardWidget.tsx index 243265b26..6f9e51b78 100644 --- a/src/pages/views/overview/azureOcpDashboard/azureOcpDashboardWidget.tsx +++ b/src/pages/views/overview/azureOcpDashboard/azureOcpDashboardWidget.tsx @@ -29,8 +29,6 @@ export const getIdKeyForTab = (tab: AzureOcpDashboardTab): ComputedAzureReportIt return 'subscription_guid'; case AzureOcpDashboardTab.resource_locations: return 'resource_location'; - case AzureOcpDashboardTab.instanceType: - return 'instance_type'; } }; diff --git a/src/pages/views/overview/components/dashboardWidget.test.tsx b/src/pages/views/overview/components/dashboardWidget.test.tsx index 13f5e58b9..4684f2d75 100644 --- a/src/pages/views/overview/components/dashboardWidget.test.tsx +++ b/src/pages/views/overview/components/dashboardWidget.test.tsx @@ -1,10 +1,10 @@ jest.mock('date-fns').mock('date-fns/format'); import { MessageDescriptor } from '@formatjs/intl/src/types'; -import { ChartType } from 'components/charts/common/chartDatumUtils'; import { intl } from 'components/i18n'; import { format, getDate, getMonth, startOfMonth } from 'date-fns'; import { shallow } from 'enzyme'; +import { ChartType } from 'pages/views/components/charts/common/chartDatumUtils'; import { DashboardWidgetBase, DashboardWidgetProps } from 'pages/views/overview/components/dashboardWidgetBase'; import React from 'react'; import { defineMessages } from 'react-intl'; diff --git a/src/pages/views/overview/components/dashboardWidgetBase.tsx b/src/pages/views/overview/components/dashboardWidgetBase.tsx index 44694f7ea..9ecab9c70 100644 --- a/src/pages/views/overview/components/dashboardWidgetBase.tsx +++ b/src/pages/views/overview/components/dashboardWidgetBase.tsx @@ -3,13 +3,15 @@ import { Tab, Tabs, TabTitleText } from '@patternfly/react-core'; import { Forecast } from 'api/forecasts/forecast'; import { getQuery } from 'api/queries/awsQuery'; import { Report } from 'api/reports/report'; +import messages from 'locales/messages'; +import { cloneDeep } from 'lodash'; import { ChartType, ComputedReportItemType, transformForecast, transformForecastCone, transformReport, -} from 'components/charts/common/chartDatumUtils'; +} from 'pages/views/components/charts/common/chartDatumUtils'; import { ReportSummary, ReportSummaryAlt, @@ -21,9 +23,7 @@ import { ReportSummaryItems, ReportSummaryTrend, ReportSummaryUsage, -} from 'components/reports/reportSummary'; -import messages from 'locales/messages'; -import { cloneDeep } from 'lodash'; +} from 'pages/views/components/reports/reportSummary'; import React from 'react'; import { WrappedComponentProps } from 'react-intl'; import { Link } from 'react-router-dom'; @@ -164,7 +164,7 @@ class DashboardWidgetBase extends React.Component { // This chart displays cumulative and daily cost compared to infrastructure cost private getDailyCostChart = (containerHeight: number, height: number, adjustContainerHeight: boolean = false) => { - const { currentReport, previousReport, trend } = this.props; + const { chartFormatter, currentReport, previousReport, trend } = this.props; const { currentComparison } = this.state; const computedReportItem = trend.computedReportItem; // cost, supplementary cost, etc. @@ -213,7 +213,7 @@ class DashboardWidgetBase extends React.Component { forecastInfrastructureConeData={forecastInfrastructureData.forecastConeData} forecastInfrastructureData={forecastInfrastructureData.forecastData} formatOptions={trend.formatOptions} - formatter={formatCurrency} + formatter={chartFormatter || formatCurrency} height={height} previousCostData={previousCostData} previousInfrastructureCostData={previousInfrastructureData} @@ -231,7 +231,7 @@ class DashboardWidgetBase extends React.Component { showInfrastructureLabel: boolean = false, showSupplementaryLabel: boolean = false ) => { - const { currentReport, details, previousReport, trend } = this.props; + const { chartFormatter, currentReport, details, previousReport, trend } = this.props; const { currentComparison } = this.state; const computedReportItem = trend.computedReportItem; // cost, supplementary cost, etc. @@ -260,7 +260,7 @@ class DashboardWidgetBase extends React.Component { forecastData={forecastData} forecastConeData={forecastConeData} formatOptions={trend.formatOptions} - formatter={formatCurrency} + formatter={chartFormatter || formatCurrency} height={height} previousData={previousData} showForecast={trend.computedForecastItem !== undefined} @@ -405,7 +405,7 @@ class DashboardWidgetBase extends React.Component { showInfrastructureLabel: boolean = false, showSupplementaryLabel: boolean = false ) => { - const { currentReport, details, intl, previousReport, trend } = this.props; + const { chartFormatter, currentReport, details, intl, previousReport, trend } = this.props; const computedReportItem = trend.computedReportItem || 'cost'; // cost, supplementary cost, etc. const computedReportItemValue = trend.computedReportItemValue; // infrastructure usage cost @@ -432,7 +432,7 @@ class DashboardWidgetBase extends React.Component { forecastData={forecastData} forecastConeData={forecastConeData} formatOptions={trend.formatOptions} - formatter={formatCurrency} + formatter={chartFormatter || formatCurrency} height={height} previousData={previousData} showForecast={trend.computedForecastItem !== undefined} @@ -447,7 +447,7 @@ class DashboardWidgetBase extends React.Component { // This chart displays usage and requests private getUsageChart = (height: number, adjustContainerHeight: boolean = false) => { - const { currentReport, intl, previousReport, trend } = this.props; + const { chartFormatter, currentReport, intl, previousReport, trend } = this.props; const title = intl.formatMessage(trend.titleKey, { units: this.getFormattedUnits(), @@ -468,7 +468,7 @@ class DashboardWidgetBase extends React.Component { currentRequestData={currentRequestData} currentUsageData={currentUsageData} formatOptions={trend.formatOptions} - formatter={formatUnits} + formatter={chartFormatter || formatUnits} height={height} previousRequestData={previousRequestData} previousUsageData={previousUsageData} diff --git a/src/pages/views/overview/gcpDashboard/gcpDashboardWidget.tsx b/src/pages/views/overview/gcpDashboard/gcpDashboardWidget.tsx index 0d96a85aa..196cc3e0b 100644 --- a/src/pages/views/overview/gcpDashboard/gcpDashboardWidget.tsx +++ b/src/pages/views/overview/gcpDashboard/gcpDashboardWidget.tsx @@ -21,8 +21,6 @@ export const getIdKeyForTab = (tab: GcpDashboardTab): ComputedGcpReportItemsPara switch (tab) { case GcpDashboardTab.gcpProjects: return 'gcp_project'; - case GcpDashboardTab.instanceType: - return 'instance_type'; case GcpDashboardTab.regions: return 'region'; case GcpDashboardTab.services: diff --git a/src/pages/views/overview/gcpOcpDashboard/gcpOcpDashboardWidget.test.tsx b/src/pages/views/overview/gcpOcpDashboard/gcpOcpDashboardWidget.test.tsx index 38b599f95..42667dd46 100644 --- a/src/pages/views/overview/gcpOcpDashboard/gcpOcpDashboardWidget.test.tsx +++ b/src/pages/views/overview/gcpOcpDashboard/gcpOcpDashboardWidget.test.tsx @@ -20,7 +20,7 @@ beforeEach(() => { }); test('id key for dashboard tab is the tab name in singular form', () => { - [GcpOcpDashboardTab.services, GcpOcpDashboardTab.projects, GcpOcpDashboardTab.regions].forEach(value => { + [GcpOcpDashboardTab.services, GcpOcpDashboardTab.gcpProjects, GcpOcpDashboardTab.regions].forEach(value => { expect(getIdKeyForTab(value)).toEqual(value.slice(0, -1)); }); diff --git a/src/pages/views/overview/gcpOcpDashboard/gcpOcpDashboardWidget.tsx b/src/pages/views/overview/gcpOcpDashboard/gcpOcpDashboardWidget.tsx index 04850594e..b78941849 100644 --- a/src/pages/views/overview/gcpOcpDashboard/gcpOcpDashboardWidget.tsx +++ b/src/pages/views/overview/gcpOcpDashboard/gcpOcpDashboardWidget.tsx @@ -19,10 +19,8 @@ interface GcpOcpDashboardWidgetDispatchProps { export const getIdKeyForTab = (tab: GcpOcpDashboardTab): ComputedGcpReportItemsParams['idKey'] => { switch (tab) { - case GcpOcpDashboardTab.instanceType: - return 'instance_type'; - case GcpOcpDashboardTab.projects: - return 'project'; + case GcpOcpDashboardTab.gcpProjects: + return 'gcp_project'; case GcpOcpDashboardTab.regions: return 'region'; case GcpOcpDashboardTab.services: diff --git a/src/pages/views/overview/ibmDashboard/ibmDashboardWidget.tsx b/src/pages/views/overview/ibmDashboard/ibmDashboardWidget.tsx index 54ef71041..838043528 100644 --- a/src/pages/views/overview/ibmDashboard/ibmDashboardWidget.tsx +++ b/src/pages/views/overview/ibmDashboard/ibmDashboardWidget.tsx @@ -25,8 +25,6 @@ export const getIdKeyForTab = (tab: IbmDashboardTab): ComputedIbmReportItemsPara return 'project'; case IbmDashboardTab.regions: return 'region'; - case IbmDashboardTab.instanceType: - return 'instance_type'; } }; diff --git a/src/pages/views/overview/overview.tsx b/src/pages/views/overview/overview.tsx index fec0666cc..91293c295 100644 --- a/src/pages/views/overview/overview.tsx +++ b/src/pages/views/overview/overview.tsx @@ -18,9 +18,8 @@ import { getProvidersQuery } from 'api/queries/providersQuery'; import { getUserAccessQuery } from 'api/queries/userAccessQuery'; import { UserAccess, UserAccessType } from 'api/userAccess'; import { AxiosError } from 'axios'; -import { Currency } from 'components/currency'; -import { ExportLink } from 'components/export'; import messages from 'locales/messages'; +import { Currency } from 'pages/components/currency'; import Loading from 'pages/state/loading'; import NoData from 'pages/state/noData/noData'; import NoProviders from 'pages/state/noProviders'; @@ -52,7 +51,7 @@ import { createMapStateToProps, FetchStatus } from 'store/common'; import { providersQuery, providersSelectors } from 'store/providers'; import { userAccessQuery, userAccessSelectors } from 'store/userAccess'; import { getSinceDateRangeString } from 'utils/dateRange'; -import { isBetaFeature } from 'utils/feature'; +import { FeatureType, isFeatureVisible } from 'utils/feature'; import { getCostType } from 'utils/localStorage'; import { hasAwsAccess, @@ -340,13 +339,14 @@ class OverviewBase extends React.Component { if (hasGcp) { options.push(...infrastructureGcpOptions); } - if (isBetaFeature() && this.isGcpOcpAvailable()) { + if (isFeatureVisible(FeatureType.gcpOcp) && this.isGcpOcpAvailable()) { options.push(...infrastructureGcpOcpOptions); } if (hasIbm) { options.push(...infrastructureIbmOptions); } - if (isBetaFeature() && this.isIbmOcpAvailable()) { + // Todo: Show in-progress features in beta environment only + if (isFeatureVisible(FeatureType.ibm) && this.isIbmOcpAvailable()) { options.push(...infrastructureIbmOcpOptions); } if (hasAzure) { @@ -637,7 +637,7 @@ class OverviewBase extends React.Component {

{intl.formatMessage(messages.GCP)}

{intl.formatMessage(messages.GCPDesc)}

{/* Todo: Show in-progress features in beta environment only */} - {isBetaFeature() && ( + {isFeatureVisible(FeatureType.ibm) && ( <>

{intl.formatMessage(messages.IBM)}

@@ -661,8 +661,7 @@ class OverviewBase extends React.Component {
{/* Todo: Show in-progress features in beta environment only */} - {isBetaFeature() && } - {isBetaFeature() && } + {isFeatureVisible(FeatureType.currency) && }
{this.getTabs(availableTabs)}
diff --git a/src/pages/views/utils/query.ts b/src/pages/views/utils/query.ts index 801f508d8..e82490d79 100644 --- a/src/pages/views/utils/query.ts +++ b/src/pages/views/utils/query.ts @@ -2,13 +2,16 @@ import { Query } from 'api/queries/query'; export const addQueryFilter = (query: Query, filterType: string, filterValue: string) => { const newQuery = { ...JSON.parse(JSON.stringify(query)) }; + if (!newQuery.filter_by) { + newQuery.filter_by = {}; + } // Filter by * won't generate a new request if group_by * already exists if (filterValue === '*' && newQuery.group_by[filterType] === '*') { return; } - if (newQuery.filter_by[filterType]) { + if (newQuery.filter_by && newQuery.filter_by[filterType]) { let found = false; const filters = newQuery.filter_by[filterType]; if (!Array.isArray(filters)) { @@ -32,6 +35,9 @@ export const addQueryFilter = (query: Query, filterType: string, filterValue: st export const removeQueryFilter = (query: Query, filterType: string, filterValue: string) => { const newQuery = { ...JSON.parse(JSON.stringify(query)) }; + if (!newQuery.filter_by) { + newQuery.filter_by = {}; + } if (filterType === null) { newQuery.filter_by = undefined; // Clear all diff --git a/src/store/dashboard/awsDashboard/__snapshots__/awsDashboard.test.ts.snap b/src/store/dashboard/awsDashboard/__snapshots__/awsDashboard.test.ts.snap index d4a07c20b..b3be37823 100644 --- a/src/store/dashboard/awsDashboard/__snapshots__/awsDashboard.test.ts.snap +++ b/src/store/dashboard/awsDashboard/__snapshots__/awsDashboard.test.ts.snap @@ -22,8 +22,6 @@ Array [ exports[`getGroupByForTab accounts tab 1`] = `Object {}`; -exports[`getGroupByForTab instance types tab 1`] = `Object {}`; - exports[`getGroupByForTab regions tab 1`] = `Object {}`; exports[`getGroupByForTab services tab 1`] = `Object {}`; diff --git a/src/store/dashboard/awsDashboard/awsDashboard.test.ts b/src/store/dashboard/awsDashboard/awsDashboard.test.ts index 0bc7dae56..992d68913 100644 --- a/src/store/dashboard/awsDashboard/awsDashboard.test.ts +++ b/src/store/dashboard/awsDashboard/awsDashboard.test.ts @@ -1,7 +1,7 @@ jest.mock('store/reports/reportActions'); import { ReportType } from 'api/reports/report'; -import { ChartType } from 'components/charts/common/chartDatumUtils'; +import { ChartType } from 'pages/views/components/charts/common/chartDatumUtils'; import { createMockStoreCreator } from 'store/mockStore'; import { reportActions } from 'store/reports'; @@ -53,10 +53,6 @@ describe('getGroupByForTab', () => { expect(getGroupByForTab(AwsDashboardTab.services)).toMatchSnapshot(); }); - test('instance types tab', () => { - expect(getGroupByForTab(AwsDashboardTab.instanceType)).toMatchSnapshot(); - }); - test('accounts tab', () => { expect(getGroupByForTab(AwsDashboardTab.accounts)).toMatchSnapshot(); }); diff --git a/src/store/dashboard/awsDashboard/awsDashboardCommon.ts b/src/store/dashboard/awsDashboard/awsDashboardCommon.ts index 91a7e8823..e6adf5166 100644 --- a/src/store/dashboard/awsDashboard/awsDashboardCommon.ts +++ b/src/store/dashboard/awsDashboard/awsDashboardCommon.ts @@ -18,7 +18,6 @@ export const enum AwsDashboardTab { services = 'services', accounts = 'accounts', regions = 'regions', - instanceType = 'instance_type', } export interface AwsDashboardWidget extends DashboardWidget { @@ -36,8 +35,6 @@ export function getGroupByForTab(widget: AwsDashboardWidget): AwsQuery['group_by return { account: '*' }; case AwsDashboardTab.regions: return { region: '*' }; - case AwsDashboardTab.instanceType: - return { instance_type: '*' }; default: return {}; } diff --git a/src/store/dashboard/awsDashboard/awsDashboardWidgets.ts b/src/store/dashboard/awsDashboard/awsDashboardWidgets.ts index 726976d5b..e95cae2fa 100644 --- a/src/store/dashboard/awsDashboard/awsDashboardWidgets.ts +++ b/src/store/dashboard/awsDashboard/awsDashboardWidgets.ts @@ -1,14 +1,15 @@ import { ForecastPathsType, ForecastType } from 'api/forecasts/forecast'; import { ReportPathsType, ReportType } from 'api/reports/report'; +import messages from 'locales/messages'; import { ChartType, ComputedForecastItemType, ComputedReportItemType, ComputedReportItemValueType, -} from 'components/charts/common/chartDatumUtils'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartDatumUtils'; import { paths } from 'routes'; import { DashboardChartType } from 'store/dashboard/common/dashboardCommon'; +import { formatUnits } from 'utils/format'; import { AwsDashboardTab, AwsDashboardWidget } from './awsDashboardCommon'; @@ -39,13 +40,8 @@ export const computeWidget: AwsDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // AwsDashboardTab.instanceType, - // AwsDashboardTab.accounts, - // AwsDashboardTab.regions, - // ], + chartFormatter: formatUnits, chartType: DashboardChartType.trend, - currentTab: AwsDashboardTab.instanceType, }; export const costSummaryWidget: AwsDashboardWidget = { @@ -99,13 +95,7 @@ export const databaseWidget: AwsDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // AwsDashboardTab.services, - // AwsDashboardTab.accounts, - // AwsDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: AwsDashboardTab.services, savingsPlan: true, }; @@ -130,13 +120,7 @@ export const networkWidget: AwsDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // AwsDashboardTab.services, - // AwsDashboardTab.accounts, - // AwsDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: AwsDashboardTab.services, savingsPlan: true, }; @@ -158,11 +142,5 @@ export const storageWidget: AwsDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // AwsDashboardTab.services, - // AwsDashboardTab.accounts, - // AwsDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: AwsDashboardTab.accounts, }; diff --git a/src/store/dashboard/awsOcpDashboard/awsOcpDashboardCommon.ts b/src/store/dashboard/awsOcpDashboard/awsOcpDashboardCommon.ts index b4228589e..84331bd80 100644 --- a/src/store/dashboard/awsOcpDashboard/awsOcpDashboardCommon.ts +++ b/src/store/dashboard/awsOcpDashboard/awsOcpDashboardCommon.ts @@ -17,7 +17,6 @@ export const enum AwsOcpDashboardTab { services = 'services', accounts = 'accounts', regions = 'regions', - instanceType = 'instance_type', } export interface AwsOcpDashboardWidget extends DashboardWidget {} @@ -33,8 +32,6 @@ export function getGroupByForTab(widget: AwsOcpDashboardWidget): AwsQuery['group return { account: '*' }; case AwsOcpDashboardTab.regions: return { region: '*' }; - case AwsOcpDashboardTab.instanceType: - return { instance_type: '*' }; default: return {}; } diff --git a/src/store/dashboard/awsOcpDashboard/awsOcpDashboardWidgets.ts b/src/store/dashboard/awsOcpDashboard/awsOcpDashboardWidgets.ts index 4f697787f..0bcc89405 100644 --- a/src/store/dashboard/awsOcpDashboard/awsOcpDashboardWidgets.ts +++ b/src/store/dashboard/awsOcpDashboard/awsOcpDashboardWidgets.ts @@ -1,13 +1,14 @@ import { ForecastPathsType, ForecastType } from 'api/forecasts/forecast'; import { ReportPathsType, ReportType } from 'api/reports/report'; +import messages from 'locales/messages'; import { ChartType, ComputedForecastItemType, ComputedReportItemType, ComputedReportItemValueType, -} from 'components/charts/common/chartDatumUtils'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartDatumUtils'; import { DashboardChartType } from 'store/dashboard/common/dashboardCommon'; +import { formatUnits } from 'utils/format'; import { AwsOcpDashboardTab, AwsOcpDashboardWidget } from './awsOcpDashboardCommon'; @@ -38,13 +39,8 @@ export const computeWidget: AwsOcpDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // AwsOcpDashboardTab.instanceType, - // AwsOcpDashboardTab.accounts, - // AwsOcpDashboardTab.regions, - // ], + chartFormatter: formatUnits, chartType: DashboardChartType.trend, - currentTab: AwsOcpDashboardTab.instanceType, }; export const costSummaryWidget: AwsOcpDashboardWidget = { @@ -95,13 +91,7 @@ export const databaseWidget: AwsOcpDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // AwsOcpDashboardTab.services, - // AwsOcpDashboardTab.accounts, - // AwsOcpDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: AwsOcpDashboardTab.services, }; export const networkWidget: AwsOcpDashboardWidget = { @@ -125,13 +115,7 @@ export const networkWidget: AwsOcpDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // AwsOcpDashboardTab.services, - // AwsOcpDashboardTab.accounts, - // AwsOcpDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: AwsOcpDashboardTab.services, }; export const storageWidget: AwsOcpDashboardWidget = { @@ -152,11 +136,5 @@ export const storageWidget: AwsOcpDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // AwsOcpDashboardTab.services, - // AwsOcpDashboardTab.accounts, - // AwsOcpDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: AwsOcpDashboardTab.accounts, }; diff --git a/src/store/dashboard/azureDashboard/__snapshots__/azureDashboard.test.ts.snap b/src/store/dashboard/azureDashboard/__snapshots__/azureDashboard.test.ts.snap index 86bbb0d2b..603fcc0c5 100644 --- a/src/store/dashboard/azureDashboard/__snapshots__/azureDashboard.test.ts.snap +++ b/src/store/dashboard/azureDashboard/__snapshots__/azureDashboard.test.ts.snap @@ -22,8 +22,6 @@ Array [ exports[`getGroupByForTab accounts tab 1`] = `Object {}`; -exports[`getGroupByForTab instance types tab 1`] = `Object {}`; - exports[`getGroupByForTab regions tab 1`] = `Object {}`; exports[`getGroupByForTab services tab 1`] = `Object {}`; diff --git a/src/store/dashboard/azureDashboard/azureDashboard.test.ts b/src/store/dashboard/azureDashboard/azureDashboard.test.ts index df6dfb854..ad06779d6 100644 --- a/src/store/dashboard/azureDashboard/azureDashboard.test.ts +++ b/src/store/dashboard/azureDashboard/azureDashboard.test.ts @@ -1,7 +1,7 @@ jest.mock('store/reports/reportActions'); import { ReportType } from 'api/reports/report'; -import { ChartType } from 'components/charts/common/chartDatumUtils'; +import { ChartType } from 'pages/views/components/charts/common/chartDatumUtils'; import { createMockStoreCreator } from 'store/mockStore'; import { reportActions } from 'store/reports'; @@ -64,10 +64,6 @@ describe('getGroupByForTab', () => { expect(getGroupByForTab(AzureDashboardTab.service_names)).toMatchSnapshot(); }); - test('instance types tab', () => { - expect(getGroupByForTab(AzureDashboardTab.instanceType)).toMatchSnapshot(); - }); - test('accounts tab', () => { expect(getGroupByForTab(AzureDashboardTab.subscription_guids)).toMatchSnapshot(); }); diff --git a/src/store/dashboard/azureDashboard/azureDashboardCommon.ts b/src/store/dashboard/azureDashboard/azureDashboardCommon.ts index b828c6acf..e3119b8a4 100644 --- a/src/store/dashboard/azureDashboard/azureDashboardCommon.ts +++ b/src/store/dashboard/azureDashboard/azureDashboardCommon.ts @@ -17,7 +17,6 @@ export const enum AzureDashboardTab { service_names = 'service_names', subscription_guids = 'subscription_guids', resource_locations = 'resource_locations', - instanceType = 'instance_type', } export interface AzureDashboardWidget extends DashboardWidget {} @@ -33,8 +32,6 @@ export function getGroupByForTab(widget: AzureDashboardWidget): AzureQuery['grou return { subscription_guid: '*' }; case AzureDashboardTab.resource_locations: return { resource_location: '*' }; - case AzureDashboardTab.instanceType: - return { instance_type: '*' }; default: return {}; } diff --git a/src/store/dashboard/azureDashboard/azureDashboardWidgets.ts b/src/store/dashboard/azureDashboard/azureDashboardWidgets.ts index cf2e50818..61a8315ca 100644 --- a/src/store/dashboard/azureDashboard/azureDashboardWidgets.ts +++ b/src/store/dashboard/azureDashboard/azureDashboardWidgets.ts @@ -1,14 +1,15 @@ import { ForecastPathsType, ForecastType } from 'api/forecasts/forecast'; import { ReportPathsType, ReportType } from 'api/reports/report'; +import messages from 'locales/messages'; import { ChartType, ComputedForecastItemType, ComputedReportItemType, ComputedReportItemValueType, -} from 'components/charts/common/chartDatumUtils'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartDatumUtils'; import { paths } from 'routes'; import { DashboardChartType } from 'store/dashboard/common/dashboardCommon'; +import { formatUnits } from 'utils/format'; import { AzureDashboardTab, AzureDashboardWidget } from './azureDashboardCommon'; @@ -69,13 +70,7 @@ export const databaseWidget: AzureDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // AzureDashboardTab.service_names, - // AzureDashboardTab.subscription_guids, - // AzureDashboardTab.resource_locations, - // ], chartType: DashboardChartType.trend, - currentTab: AzureDashboardTab.service_names, }; export const networkWidget: AzureDashboardWidget = { @@ -99,13 +94,7 @@ export const networkWidget: AzureDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // AzureDashboardTab.service_names, - // AzureDashboardTab.subscription_guids, - // AzureDashboardTab.resource_locations, - // ], chartType: DashboardChartType.trend, - currentTab: AzureDashboardTab.service_names, }; export const storageWidget: AzureDashboardWidget = { @@ -132,13 +121,7 @@ export const storageWidget: AzureDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // AzureDashboardTab.service_names, - // AzureDashboardTab.subscription_guids, - // AzureDashboardTab.resource_locations, - // ], chartType: DashboardChartType.trend, - currentTab: AzureDashboardTab.subscription_guids, }; export const virtualMachineWidget: AzureDashboardWidget = { @@ -165,11 +148,6 @@ export const virtualMachineWidget: AzureDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // AzureDashboardTab.instanceType, - // AzureDashboardTab.subscription_guids, - // AzureDashboardTab.resource_locations, - // ], + chartFormatter: formatUnits, chartType: DashboardChartType.trend, - currentTab: AzureDashboardTab.instanceType, }; diff --git a/src/store/dashboard/azureOcpDashboard/azureOcpDashboardCommon.ts b/src/store/dashboard/azureOcpDashboard/azureOcpDashboardCommon.ts index 7c211398b..f37c88662 100644 --- a/src/store/dashboard/azureOcpDashboard/azureOcpDashboardCommon.ts +++ b/src/store/dashboard/azureOcpDashboard/azureOcpDashboardCommon.ts @@ -17,7 +17,6 @@ export const enum AzureOcpDashboardTab { service_names = 'service_names', subscription_guids = 'subscription_guids', resource_locations = 'resource_locations', - instanceType = 'instance_type', } export interface AzureOcpDashboardWidget extends DashboardWidget {} @@ -33,8 +32,6 @@ export function getGroupByForTab(widget: AzureOcpDashboardWidget): AzureQuery['g return { subscription_guid: '*' }; case AzureOcpDashboardTab.resource_locations: return { resource_location: '*' }; - case AzureOcpDashboardTab.instanceType: - return { instance_type: '*' }; default: return {}; } diff --git a/src/store/dashboard/azureOcpDashboard/azureOcpDashboardWidgets.ts b/src/store/dashboard/azureOcpDashboard/azureOcpDashboardWidgets.ts index 1e8370adc..a13db9f6f 100644 --- a/src/store/dashboard/azureOcpDashboard/azureOcpDashboardWidgets.ts +++ b/src/store/dashboard/azureOcpDashboard/azureOcpDashboardWidgets.ts @@ -1,13 +1,14 @@ import { ForecastPathsType, ForecastType } from 'api/forecasts/forecast'; import { ReportPathsType, ReportType } from 'api/reports/report'; +import messages from 'locales/messages'; import { ChartType, ComputedForecastItemType, ComputedReportItemType, ComputedReportItemValueType, -} from 'components/charts/common/chartDatumUtils'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartDatumUtils'; import { DashboardChartType } from 'store/dashboard/common/dashboardCommon'; +import { formatUnits } from 'utils/format'; import { AzureOcpDashboardTab, AzureOcpDashboardWidget } from './azureOcpDashboardCommon'; @@ -66,13 +67,7 @@ export const databaseWidget: AzureOcpDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // AzureOcpDashboardTab.service_names, - // AzureOcpDashboardTab.subscription_guids, - // AzureOcpDashboardTab.resource_locations, - // ], chartType: DashboardChartType.trend, - currentTab: AzureOcpDashboardTab.service_names, }; export const networkWidget: AzureOcpDashboardWidget = { @@ -96,13 +91,7 @@ export const networkWidget: AzureOcpDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // AzureOcpDashboardTab.service_names, - // AzureOcpDashboardTab.subscription_guids, - // AzureOcpDashboardTab.resource_locations, - // ], chartType: DashboardChartType.trend, - currentTab: AzureOcpDashboardTab.service_names, }; export const storageWidget: AzureOcpDashboardWidget = { @@ -129,13 +118,7 @@ export const storageWidget: AzureOcpDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // AzureOcpDashboardTab.service_names, - // AzureOcpDashboardTab.subscription_guids, - // AzureOcpDashboardTab.resource_locations, - // ], chartType: DashboardChartType.trend, - currentTab: AzureOcpDashboardTab.subscription_guids, }; export const virtualMachineWidget: AzureOcpDashboardWidget = { @@ -162,11 +145,6 @@ export const virtualMachineWidget: AzureOcpDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // AzureOcpDashboardTab.instanceType, - // AzureOcpDashboardTab.subscription_guids, - // AzureOcpDashboardTab.resource_locations, - // ], + chartFormatter: formatUnits, chartType: DashboardChartType.trend, - currentTab: AzureOcpDashboardTab.instanceType, }; diff --git a/src/store/dashboard/common/dashboardCommon.ts b/src/store/dashboard/common/dashboardCommon.ts index bccd4dceb..4840a135c 100644 --- a/src/store/dashboard/common/dashboardCommon.ts +++ b/src/store/dashboard/common/dashboardCommon.ts @@ -1,7 +1,7 @@ import { MessageDescriptor } from '@formatjs/intl/src/types'; import { ForecastPathsType, ForecastType } from 'api/forecasts/forecast'; import { ReportPathsType, ReportType } from 'api/reports/report'; -import { FormatOptions } from 'utils/format'; +import { FormatOptions, Formatter } from 'utils/format'; // eslint-disable-next-line no-shadow export const enum DashboardChartType { @@ -14,6 +14,7 @@ export const enum DashboardChartType { export interface DashboardWidget { availableTabs?: T[]; + chartFormatter?: Formatter; chartType?: DashboardChartType; currentTab?: T; details: { diff --git a/src/store/dashboard/gcpDashboard/__snapshots__/gcpDashboard.test.ts.snap b/src/store/dashboard/gcpDashboard/__snapshots__/gcpDashboard.test.ts.snap index 0fe0b05a0..dfa576018 100644 --- a/src/store/dashboard/gcpDashboard/__snapshots__/gcpDashboard.test.ts.snap +++ b/src/store/dashboard/gcpDashboard/__snapshots__/gcpDashboard.test.ts.snap @@ -22,8 +22,6 @@ Array [ exports[`getGroupByForTab accounts tab 1`] = `Object {}`; -exports[`getGroupByForTab instance types tab 1`] = `Object {}`; - exports[`getGroupByForTab regions tab 1`] = `Object {}`; exports[`getGroupByForTab services tab 1`] = `Object {}`; diff --git a/src/store/dashboard/gcpDashboard/gcpDashboard.test.ts b/src/store/dashboard/gcpDashboard/gcpDashboard.test.ts index 50c52bf1e..f0ea02db7 100644 --- a/src/store/dashboard/gcpDashboard/gcpDashboard.test.ts +++ b/src/store/dashboard/gcpDashboard/gcpDashboard.test.ts @@ -1,7 +1,7 @@ jest.mock('store/reports/reportActions'); import { ReportType } from 'api/reports/report'; -import { ChartType } from 'components/charts/common/chartDatumUtils'; +import { ChartType } from 'pages/views/components/charts/common/chartDatumUtils'; import { createMockStoreCreator } from 'store/mockStore'; import { reportActions } from 'store/reports'; @@ -53,10 +53,6 @@ describe('getGroupByForTab', () => { expect(getGroupByForTab(GcpDashboardTab.services)).toMatchSnapshot(); }); - test('instance types tab', () => { - expect(getGroupByForTab(GcpDashboardTab.instanceType)).toMatchSnapshot(); - }); - test('accounts tab', () => { expect(getGroupByForTab(GcpDashboardTab.accounts)).toMatchSnapshot(); }); diff --git a/src/store/dashboard/gcpDashboard/gcpDashboardCommon.ts b/src/store/dashboard/gcpDashboard/gcpDashboardCommon.ts index 4f3a90b4a..f32bad048 100644 --- a/src/store/dashboard/gcpDashboard/gcpDashboardCommon.ts +++ b/src/store/dashboard/gcpDashboard/gcpDashboardCommon.ts @@ -16,7 +16,6 @@ export const gcpDashboardTabFilters: GcpFilters = { export const enum GcpDashboardTab { accounts = 'accounts', gcpProjects = 'gcp_projects', - instanceType = 'instance_type', regions = 'regions', services = 'services', } @@ -36,8 +35,6 @@ export function getGroupByForTab(widget: GcpDashboardWidget): GcpQuery['group_by return { gcp_project: '*' }; case GcpDashboardTab.regions: return { region: '*' }; - case GcpDashboardTab.instanceType: - return { instance_type: '*' }; default: return {}; } diff --git a/src/store/dashboard/gcpDashboard/gcpDashboardWidgets.ts b/src/store/dashboard/gcpDashboard/gcpDashboardWidgets.ts index 7ac18d52f..cd6eef122 100644 --- a/src/store/dashboard/gcpDashboard/gcpDashboardWidgets.ts +++ b/src/store/dashboard/gcpDashboard/gcpDashboardWidgets.ts @@ -1,14 +1,15 @@ import { ForecastPathsType, ForecastType } from 'api/forecasts/forecast'; import { ReportPathsType, ReportType } from 'api/reports/report'; +import messages from 'locales/messages'; import { ChartType, ComputedForecastItemType, ComputedReportItemType, ComputedReportItemValueType, -} from 'components/charts/common/chartDatumUtils'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartDatumUtils'; import { paths } from 'routes'; import { DashboardChartType } from 'store/dashboard/common/dashboardCommon'; +import { formatUnits } from 'utils/format'; import { GcpDashboardTab, GcpDashboardWidget } from './gcpDashboardCommon'; @@ -40,13 +41,8 @@ export const computeWidget: GcpDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // GcpDashboardTab.instanceType, - // GcpDashboardTab.accounts, - // GcpDashboardTab.regions, - // ], + chartFormatter: formatUnits, chartType: DashboardChartType.trend, - currentTab: GcpDashboardTab.instanceType, }; export const costSummaryWidget: GcpDashboardWidget = { @@ -99,13 +95,7 @@ export const databaseWidget: GcpDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // GcpDashboardTab.services, - // GcpDashboardTab.accounts, - // GcpDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: GcpDashboardTab.services, }; export const networkWidget: GcpDashboardWidget = { @@ -131,13 +121,7 @@ export const networkWidget: GcpDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // GcpDashboardTab.services, - // GcpDashboardTab.accounts, - // GcpDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: GcpDashboardTab.services, }; export const storageWidget: GcpDashboardWidget = { @@ -158,11 +142,5 @@ export const storageWidget: GcpDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // GcpDashboardTab.services, - // GcpDashboardTab.accounts, - // GcpDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: GcpDashboardTab.gcpProjects, }; diff --git a/src/store/dashboard/gcpOcpDashboard/__snapshots__/gcpOcpDashboard.test.ts.snap b/src/store/dashboard/gcpOcpDashboard/__snapshots__/gcpOcpDashboard.test.ts.snap index 273907b93..0d3b47908 100644 --- a/src/store/dashboard/gcpOcpDashboard/__snapshots__/gcpOcpDashboard.test.ts.snap +++ b/src/store/dashboard/gcpOcpDashboard/__snapshots__/gcpOcpDashboard.test.ts.snap @@ -22,8 +22,6 @@ Array [ exports[`getGroupByForTab accounts tab 1`] = `Object {}`; -exports[`getGroupByForTab instance types tab 1`] = `Object {}`; - exports[`getGroupByForTab regions tab 1`] = `Object {}`; exports[`getGroupByForTab services tab 1`] = `Object {}`; diff --git a/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboard.test.ts b/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboard.test.ts index bb9a9b499..d13f7e9fa 100644 --- a/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboard.test.ts +++ b/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboard.test.ts @@ -1,7 +1,7 @@ jest.mock('store/reports/reportActions'); import { ReportType } from 'api/reports/report'; -import { ChartType } from 'components/charts/common/chartDatumUtils'; +import { ChartType } from 'pages/views/components/charts/common/chartDatumUtils'; import { createMockStoreCreator } from 'store/mockStore'; import { reportActions } from 'store/reports'; @@ -64,10 +64,6 @@ describe('getGroupByForTab', () => { expect(getGroupByForTab(GcpOcpDashboardTab.services)).toMatchSnapshot(); }); - test('instance types tab', () => { - expect(getGroupByForTab(GcpOcpDashboardTab.instanceType)).toMatchSnapshot(); - }); - test('accounts tab', () => { expect(getGroupByForTab(GcpOcpDashboardTab.accounts)).toMatchSnapshot(); }); diff --git a/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboardCommon.ts b/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboardCommon.ts index 0068a7e19..e2713b8cb 100644 --- a/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboardCommon.ts +++ b/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboardCommon.ts @@ -15,8 +15,7 @@ export const gcpOcpDashboardTabFilters: GcpFilters = { // eslint-disable-next-line no-shadow export const enum GcpOcpDashboardTab { accounts = 'accounts', - instanceType = 'instance_type', - projects = 'projects', + gcpProjects = 'gcp_projects', regions = 'regions', services = 'services', } @@ -32,10 +31,8 @@ export function getGroupByForTab(widget: GcpOcpDashboardWidget): GcpQuery['group }; case GcpOcpDashboardTab.accounts: return { account: '*' }; - case GcpOcpDashboardTab.instanceType: - return { instance_type: '*' }; - case GcpOcpDashboardTab.projects: - return { project: '*' }; + case GcpOcpDashboardTab.gcpProjects: + return { gcp_project: '*' }; case GcpOcpDashboardTab.regions: return { region: '*' }; default: diff --git a/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboardWidgets.ts b/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboardWidgets.ts index a800d1794..5246d69ed 100644 --- a/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboardWidgets.ts +++ b/src/store/dashboard/gcpOcpDashboard/gcpOcpDashboardWidgets.ts @@ -1,13 +1,14 @@ import { ForecastPathsType, ForecastType } from 'api/forecasts/forecast'; import { ReportPathsType, ReportType } from 'api/reports/report'; +import messages from 'locales/messages'; import { ChartType, ComputedForecastItemType, ComputedReportItemType, ComputedReportItemValueType, -} from 'components/charts/common/chartDatumUtils'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartDatumUtils'; import { DashboardChartType } from 'store/dashboard/common/dashboardCommon'; +import { formatUnits } from 'utils/format'; import { GcpOcpDashboardTab, GcpOcpDashboardWidget } from './gcpOcpDashboardCommon'; @@ -39,13 +40,8 @@ export const computeWidget: GcpOcpDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // GcpOcpDashboardTab.instanceType, - // GcpOcpDashboardTab.accounts, - // GcpOcpDashboardTab.regions, - // ], + chartFormatter: formatUnits, chartType: DashboardChartType.trend, - currentTab: GcpOcpDashboardTab.instanceType, }; export const costSummaryWidget: GcpOcpDashboardWidget = { @@ -71,7 +67,7 @@ export const costSummaryWidget: GcpOcpDashboardWidget = { titleKey: messages.GCPCostTrendTitle, type: ChartType.rolling, }, - availableTabs: [GcpOcpDashboardTab.services, GcpOcpDashboardTab.projects, GcpOcpDashboardTab.regions], + availableTabs: [GcpOcpDashboardTab.services, GcpOcpDashboardTab.gcpProjects, GcpOcpDashboardTab.regions], chartType: DashboardChartType.dailyTrend, currentTab: GcpOcpDashboardTab.services, }; @@ -97,13 +93,7 @@ export const databaseWidget: GcpOcpDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // GcpOcpDashboardTab.services, - // GcpOcpDashboardTab.accounts, - // GcpOcpDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: GcpOcpDashboardTab.services, }; export const networkWidget: GcpOcpDashboardWidget = { @@ -127,13 +117,7 @@ export const networkWidget: GcpOcpDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // GcpOcpDashboardTab.services, - // GcpOcpDashboardTab.accounts, - // GcpOcpDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: GcpOcpDashboardTab.services, }; export const storageWidget: GcpOcpDashboardWidget = { @@ -154,11 +138,5 @@ export const storageWidget: GcpOcpDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // GcpOcpDashboardTab.services, - // GcpOcpDashboardTab.accounts, - // GcpOcpDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: GcpOcpDashboardTab.projects, }; diff --git a/src/store/dashboard/ibmDashboard/__snapshots__/ibmDashboard.test.ts.snap b/src/store/dashboard/ibmDashboard/__snapshots__/ibmDashboard.test.ts.snap index 0fe0b05a0..dfa576018 100644 --- a/src/store/dashboard/ibmDashboard/__snapshots__/ibmDashboard.test.ts.snap +++ b/src/store/dashboard/ibmDashboard/__snapshots__/ibmDashboard.test.ts.snap @@ -22,8 +22,6 @@ Array [ exports[`getGroupByForTab accounts tab 1`] = `Object {}`; -exports[`getGroupByForTab instance types tab 1`] = `Object {}`; - exports[`getGroupByForTab regions tab 1`] = `Object {}`; exports[`getGroupByForTab services tab 1`] = `Object {}`; diff --git a/src/store/dashboard/ibmDashboard/ibmDashboard.test.ts b/src/store/dashboard/ibmDashboard/ibmDashboard.test.ts index f2965f4c2..b9e2e4cfc 100644 --- a/src/store/dashboard/ibmDashboard/ibmDashboard.test.ts +++ b/src/store/dashboard/ibmDashboard/ibmDashboard.test.ts @@ -1,7 +1,7 @@ jest.mock('store/reports/reportActions'); import { ReportType } from 'api/reports/report'; -import { ChartType } from 'components/charts/common/chartDatumUtils'; +import { ChartType } from 'pages/views/components/charts/common/chartDatumUtils'; import { createMockStoreCreator } from 'store/mockStore'; import { reportActions } from 'store/reports'; @@ -53,10 +53,6 @@ describe('getGroupByForTab', () => { expect(getGroupByForTab(IbmDashboardTab.services)).toMatchSnapshot(); }); - test('instance types tab', () => { - expect(getGroupByForTab(IbmDashboardTab.instanceType)).toMatchSnapshot(); - }); - test('accounts tab', () => { expect(getGroupByForTab(IbmDashboardTab.accounts)).toMatchSnapshot(); }); diff --git a/src/store/dashboard/ibmDashboard/ibmDashboardCommon.ts b/src/store/dashboard/ibmDashboard/ibmDashboardCommon.ts index c49a06444..f0470f31b 100644 --- a/src/store/dashboard/ibmDashboard/ibmDashboardCommon.ts +++ b/src/store/dashboard/ibmDashboard/ibmDashboardCommon.ts @@ -18,7 +18,6 @@ export const enum IbmDashboardTab { accounts = 'accounts', projects = 'projects', regions = 'regions', - instanceType = 'instance_type', } export interface IbmDashboardWidget extends DashboardWidget {} @@ -36,8 +35,6 @@ export function getGroupByForTab(widget: IbmDashboardWidget): IbmQuery['group_by return { project: '*' }; case IbmDashboardTab.regions: return { region: '*' }; - case IbmDashboardTab.instanceType: - return { instance_type: '*' }; default: return {}; } diff --git a/src/store/dashboard/ibmDashboard/ibmDashboardWidgets.ts b/src/store/dashboard/ibmDashboard/ibmDashboardWidgets.ts index 9223a3966..759fdc1ad 100644 --- a/src/store/dashboard/ibmDashboard/ibmDashboardWidgets.ts +++ b/src/store/dashboard/ibmDashboard/ibmDashboardWidgets.ts @@ -1,14 +1,15 @@ import { ForecastPathsType, ForecastType } from 'api/forecasts/forecast'; import { ReportPathsType, ReportType } from 'api/reports/report'; +import messages from 'locales/messages'; import { ChartType, ComputedForecastItemType, ComputedReportItemType, ComputedReportItemValueType, -} from 'components/charts/common/chartDatumUtils'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartDatumUtils'; import { paths } from 'routes'; import { DashboardChartType } from 'store/dashboard/common/dashboardCommon'; +import { formatUnits } from 'utils/format'; import { IbmDashboardTab, IbmDashboardWidget } from './ibmDashboardCommon'; @@ -40,13 +41,8 @@ export const computeWidget: IbmDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // IbmDashboardTab.instanceType, - // IbmDashboardTab.accounts, - // IbmDashboardTab.regions, - // ], + chartFormatter: formatUnits, chartType: DashboardChartType.trend, - currentTab: IbmDashboardTab.instanceType, }; export const costSummaryWidget: IbmDashboardWidget = { @@ -99,13 +95,7 @@ export const databaseWidget: IbmDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // IbmDashboardTab.services, - // IbmDashboardTab.accounts, - // IbmDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: IbmDashboardTab.services, }; export const networkWidget: IbmDashboardWidget = { @@ -131,13 +121,7 @@ export const networkWidget: IbmDashboardWidget = { titleKey: messages.DashboardCumulativeCostComparison, type: ChartType.rolling, }, - // availableTabs: [ - // IbmDashboardTab.services, - // IbmDashboardTab.accounts, - // IbmDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: IbmDashboardTab.services, }; export const storageWidget: IbmDashboardWidget = { @@ -158,11 +142,5 @@ export const storageWidget: IbmDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, - // availableTabs: [ - // IbmDashboardTab.services, - // IbmDashboardTab.accounts, - // IbmDashboardTab.regions, - // ], chartType: DashboardChartType.trend, - currentTab: IbmDashboardTab.projects, }; diff --git a/src/store/dashboard/ocpCloudDashboard/ocpCloudDashboard.test.ts b/src/store/dashboard/ocpCloudDashboard/ocpCloudDashboard.test.ts index d9c920a00..c86e3bba7 100644 --- a/src/store/dashboard/ocpCloudDashboard/ocpCloudDashboard.test.ts +++ b/src/store/dashboard/ocpCloudDashboard/ocpCloudDashboard.test.ts @@ -1,7 +1,7 @@ jest.mock('store/reports/reportActions'); import { ReportType } from 'api/reports/report'; -import { ChartType, ComputedReportItemType } from 'components/charts/common/chartDatumUtils'; +import { ChartType, ComputedReportItemType } from 'pages/views/components/charts/common/chartDatumUtils'; import { createMockStoreCreator } from 'store/mockStore'; import { reportActions } from 'store/reports'; diff --git a/src/store/dashboard/ocpCloudDashboard/ocpCloudDashboardWidgets.ts b/src/store/dashboard/ocpCloudDashboard/ocpCloudDashboardWidgets.ts index 25422dfa0..f9f24336c 100644 --- a/src/store/dashboard/ocpCloudDashboard/ocpCloudDashboardWidgets.ts +++ b/src/store/dashboard/ocpCloudDashboard/ocpCloudDashboardWidgets.ts @@ -1,13 +1,14 @@ import { ForecastPathsType, ForecastType } from 'api/forecasts/forecast'; import { ReportPathsType, ReportType } from 'api/reports/report'; +import messages from 'locales/messages'; import { ChartType, ComputedForecastItemType, ComputedReportItemType, ComputedReportItemValueType, -} from 'components/charts/common/chartDatumUtils'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartDatumUtils'; import { DashboardChartType } from 'store/dashboard/common/dashboardCommon'; +import { formatUnits } from 'utils/format'; import { OcpCloudDashboardTab, OcpCloudDashboardWidget } from './ocpCloudDashboardCommon'; @@ -64,6 +65,7 @@ export const computeWidget: OcpCloudDashboardWidget = { titleKey: messages.DashboardDailyUsageComparison, type: ChartType.daily, }, + chartFormatter: formatUnits, chartType: DashboardChartType.trend, }; diff --git a/src/store/dashboard/ocpDashboard/ocpDashboard.test.ts b/src/store/dashboard/ocpDashboard/ocpDashboard.test.ts index 99babd2ca..6f22bcd23 100644 --- a/src/store/dashboard/ocpDashboard/ocpDashboard.test.ts +++ b/src/store/dashboard/ocpDashboard/ocpDashboard.test.ts @@ -1,7 +1,7 @@ jest.mock('store/reports/reportActions'); import { ReportType } from 'api/reports/report'; -import { ChartType, ComputedReportItemType } from 'components/charts/common/chartDatumUtils'; +import { ChartType, ComputedReportItemType } from 'pages/views/components/charts/common/chartDatumUtils'; import { createMockStoreCreator } from 'store/mockStore'; import { reportActions } from 'store/reports'; diff --git a/src/store/dashboard/ocpDashboard/ocpDashboardWidgets.ts b/src/store/dashboard/ocpDashboard/ocpDashboardWidgets.ts index 7d558fc3a..4c88e31b6 100644 --- a/src/store/dashboard/ocpDashboard/ocpDashboardWidgets.ts +++ b/src/store/dashboard/ocpDashboard/ocpDashboardWidgets.ts @@ -1,12 +1,12 @@ import { ForecastPathsType, ForecastType } from 'api/forecasts/forecast'; import { ReportPathsType, ReportType } from 'api/reports/report'; +import messages from 'locales/messages'; import { ChartType, ComputedForecastItemType, ComputedReportItemType, ComputedReportItemValueType, -} from 'components/charts/common/chartDatumUtils'; -import messages from 'locales/messages'; +} from 'pages/views/components/charts/common/chartDatumUtils'; import { paths } from 'routes'; import { DashboardChartType } from 'store/dashboard/common/dashboardCommon'; @@ -63,9 +63,7 @@ export const cpuWidget: OcpDashboardWidget = { titleKey: messages.OCPDailyUsageAndRequestComparison, type: ChartType.daily, }, - // availableTabs: [OcpDashboardTab.projects, OcpDashboardTab.clusters], chartType: DashboardChartType.usage, - currentTab: OcpDashboardTab.projects, }; export const memoryWidget: OcpDashboardWidget = { @@ -85,9 +83,7 @@ export const memoryWidget: OcpDashboardWidget = { titleKey: messages.OCPDailyUsageAndRequestComparison, type: ChartType.daily, }, - // availableTabs: [OcpDashboardTab.projects, OcpDashboardTab.clusters], chartType: DashboardChartType.usage, - currentTab: OcpDashboardTab.projects, }; export const volumeWidget: OcpDashboardWidget = { @@ -107,7 +103,5 @@ export const volumeWidget: OcpDashboardWidget = { titleKey: messages.OCPDailyUsageAndRequestComparison, type: ChartType.daily, }, - // availableTabs: [OcpDashboardTab.projects, OcpDashboardTab.clusters], chartType: DashboardChartType.usage, - currentTab: OcpDashboardTab.projects, }; diff --git a/src/store/exports/__snapshots__/export.test.ts.snap b/src/store/export/__snapshots__/export.test.ts.snap similarity index 100% rename from src/store/exports/__snapshots__/export.test.ts.snap rename to src/store/export/__snapshots__/export.test.ts.snap diff --git a/src/store/exports/export.test.ts b/src/store/export/export.test.ts similarity index 95% rename from src/store/exports/export.test.ts rename to src/store/export/export.test.ts index f3cea2fb5..e41797d2b 100644 --- a/src/store/exports/export.test.ts +++ b/src/store/export/export.test.ts @@ -1,8 +1,8 @@ -jest.mock('api/exports/exportUtils'); +jest.mock('api/export/exportUtils'); import { waitFor } from '@testing-library/react'; -import { Export } from 'api/exports/export'; -import { runExport } from 'api/exports/exportUtils'; +import { Export } from 'api/export/export'; +import { runExport } from 'api/export/exportUtils'; import { ReportPathsType, ReportType } from 'api/reports/report'; import { FetchStatus } from 'store/common'; import { createMockStoreCreator } from 'store/mockStore'; diff --git a/src/store/exports/exportActions.ts b/src/store/export/exportActions.tsx similarity index 52% rename from src/store/exports/exportActions.ts rename to src/store/export/exportActions.tsx index 70aa82910..5da969f12 100644 --- a/src/store/exports/exportActions.ts +++ b/src/store/export/exportActions.tsx @@ -1,13 +1,19 @@ -import { Export } from 'api/exports/export'; -import { runExport } from 'api/exports/exportUtils'; +import { addNotification, removeNotification } from '@redhat-cloud-services/frontend-components-notifications'; +import { Export } from 'api/export/export'; +import { runExport } from 'api/export/exportUtils'; import { ReportPathsType, ReportType } from 'api/reports/report'; import { AxiosError } from 'axios'; +import { ExportsLink } from 'components/exports/exportsLink'; +import { intl } from 'components/i18n'; +import messages from 'locales/messages'; +import React from 'react'; import { ThunkAction } from 'redux-thunk'; import { FetchStatus } from 'store/common'; -import { getExportId } from 'store/exports/exportCommon'; -import { selectExport, selectExportFetchStatus } from 'store/exports/exportSelectors'; +import { getExportId } from 'store/export/exportCommon'; +import { selectExport, selectExportFetchStatus } from 'store/export/exportSelectors'; import { RootState } from 'store/rootReducer'; import { createAction } from 'typesafe-actions'; +import { FeatureType, isFeatureVisible } from 'utils/feature'; const expirationMS = 30 * 60 * 1000; // 30 minutes @@ -19,6 +25,8 @@ export const fetchExportRequest = createAction('report/request')(); export const fetchExportFailure = createAction('report/failure')(); +const exportSuccessID = 'cost_management_export_success'; + export function exportReport( reportPathsType: ReportPathsType, reportType: ReportType, @@ -37,9 +45,39 @@ export function exportReport( runExport(reportPathsType, reportType, query) .then(res => { dispatch(fetchExportSuccess(res.data, meta)); + + /* Todo: Show in-progress features in beta environment only */ + if (isFeatureVisible(FeatureType.exports)) { + const description = intl.formatMessage(messages.ExportsSuccessDesc, { + link: dispatch(removeNotification(exportSuccessID))} />, + value: {intl.formatMessage(messages.ExportsTitle)}, + }); + + dispatch( + addNotification({ + description, + dismissable: true, + id: exportSuccessID, + title: intl.formatMessage(messages.ExportsSuccess), + variant: 'success', + }) + ); + } }) .catch(err => { dispatch(fetchExportFailure(err, meta)); + + /* Todo: Show in-progress features in beta environment only */ + if (isFeatureVisible(FeatureType.exports)) { + dispatch( + addNotification({ + description: intl.formatMessage(messages.ExportsFailedDesc), + dismissable: true, + title: intl.formatMessage(messages.ExportsUnavailable), + variant: 'danger', + }) + ); + } }); }; } diff --git a/src/store/exports/exportCommon.ts b/src/store/export/exportCommon.ts similarity index 100% rename from src/store/exports/exportCommon.ts rename to src/store/export/exportCommon.ts diff --git a/src/store/exports/exportReducer.ts b/src/store/export/exportReducer.ts similarity index 97% rename from src/store/exports/exportReducer.ts rename to src/store/export/exportReducer.ts index 25a56005c..665c1ab6c 100644 --- a/src/store/exports/exportReducer.ts +++ b/src/store/export/exportReducer.ts @@ -1,4 +1,4 @@ -import { Export } from 'api/exports/export'; +import { Export } from 'api/export/export'; import { AxiosError } from 'axios'; import { FetchStatus } from 'store/common'; import { resetState } from 'store/ui/uiActions'; diff --git a/src/store/exports/exportSelectors.ts b/src/store/export/exportSelectors.ts similarity index 100% rename from src/store/exports/exportSelectors.ts rename to src/store/export/exportSelectors.ts diff --git a/src/store/exports/index.ts b/src/store/export/index.ts similarity index 100% rename from src/store/exports/index.ts rename to src/store/export/index.ts diff --git a/src/store/rootReducer.ts b/src/store/rootReducer.ts index a9c648357..4a2f12a9a 100644 --- a/src/store/rootReducer.ts +++ b/src/store/rootReducer.ts @@ -24,7 +24,7 @@ import { gcpOcpDashboardReducer, gcpOcpDashboardStateKey } from 'store/dashboard import { ibmDashboardReducer, ibmDashboardStateKey } from 'store/dashboard/ibmDashboard'; import { ocpCloudDashboardReducer, ocpCloudDashboardStateKey } from 'store/dashboard/ocpCloudDashboard'; import { ocpDashboardReducer, ocpDashboardStateKey } from 'store/dashboard/ocpDashboard'; -import { exportReducer, exportStateKey } from 'store/exports'; +import { exportReducer, exportStateKey } from 'store/export'; import { forecastReducer, forecastStateKey } from 'store/forecasts'; import { orgReducer, orgStateKey } from 'store/orgs'; import { priceListReducer, priceListStateKey } from 'store/priceList'; diff --git a/src/store/ui/__snapshots__/ui.test.ts.snap b/src/store/ui/__snapshots__/ui.test.ts.snap index f8a9813b5..67efa7bd2 100644 --- a/src/store/ui/__snapshots__/ui.test.ts.snap +++ b/src/store/ui/__snapshots__/ui.test.ts.snap @@ -2,8 +2,6 @@ exports[`default state 1`] = ` Object { - "isExportDrawerOpen": false, - "isProvidersModalOpen": false, - "isSidebarOpen": false, + "isExportsDrawerOpen": false, } `; diff --git a/src/store/ui/ui.test.ts b/src/store/ui/ui.test.ts index d70a90a40..f8707328d 100644 --- a/src/store/ui/ui.test.ts +++ b/src/store/ui/ui.test.ts @@ -16,12 +16,12 @@ test('default state', async () => { test('close export drawer', async () => { const store = createUIStore(); - store.dispatch(actions.closeExportDrawer()); - expect(uiSelectors.selectIsExportDrawerOpen(store.getState())).toBe(false); + store.dispatch(actions.closeExportsDrawer()); + expect(uiSelectors.selectIsExportsDrawerOpen(store.getState())).toBe(false); }); test('open export drawer', async () => { const store = createUIStore(); - store.dispatch(actions.openExportDrawer()); - expect(uiSelectors.selectIsExportDrawerOpen(store.getState())).toBe(true); + store.dispatch(actions.openExportsDrawer()); + expect(uiSelectors.selectIsExportsDrawerOpen(store.getState())).toBe(true); }); diff --git a/src/store/ui/uiActions.ts b/src/store/ui/uiActions.ts index 9d53a30fb..b8345ec9e 100644 --- a/src/store/ui/uiActions.ts +++ b/src/store/ui/uiActions.ts @@ -1,8 +1,8 @@ import { ThunkAction } from 'store/common'; import { createAction } from 'typesafe-actions'; -export const closeExportDrawer = createAction('ui/close_export_drawer')(); -export const openExportDrawer = createAction('ui/open_export_drawer')(); +export const closeExportsDrawer = createAction('ui/close_exports_drawer')(); +export const openExportsDrawer = createAction('ui/open_exports_drawer')(); export const resetState = createAction('ui/reset_state')(); export function resetReportState(): ThunkAction { diff --git a/src/store/ui/uiReducer.ts b/src/store/ui/uiReducer.ts index e78bff494..b969d5e51 100644 --- a/src/store/ui/uiReducer.ts +++ b/src/store/ui/uiReducer.ts @@ -1,19 +1,15 @@ import { ActionType, getType } from 'typesafe-actions'; -import { closeExportDrawer, openExportDrawer, resetState } from './uiActions'; +import { closeExportsDrawer, openExportsDrawer, resetState } from './uiActions'; -export type UIAction = ActionType; +export type UIAction = ActionType; export type UIState = Readonly<{ - isExportDrawerOpen: boolean; - isProvidersModalOpen: boolean; - isSidebarOpen: boolean; + isExportsDrawerOpen: boolean; }>; export const defaultState: UIState = { - isExportDrawerOpen: false, - isProvidersModalOpen: false, - isSidebarOpen: false, + isExportsDrawerOpen: false, }; export const stateKey = 'ui'; @@ -24,16 +20,16 @@ export function uiReducer(state = defaultState, action: UIAction): UIState { state = defaultState; return state; - case getType(closeExportDrawer): + case getType(closeExportsDrawer): return { ...state, - isExportDrawerOpen: false, + isExportsDrawerOpen: false, }; - case getType(openExportDrawer): + case getType(openExportsDrawer): return { ...state, - isExportDrawerOpen: true, + isExportsDrawerOpen: true, }; default: diff --git a/src/store/ui/uiSelectors.ts b/src/store/ui/uiSelectors.ts index 23f4f26a1..b79fea270 100644 --- a/src/store/ui/uiSelectors.ts +++ b/src/store/ui/uiSelectors.ts @@ -4,8 +4,4 @@ import { stateKey } from './uiReducer'; export const selectUIState = (state: RootState) => state[stateKey]; -export const selectIsExportDrawerOpen = (state: RootState) => selectUIState(state).isExportDrawerOpen; - -export const selectIsProvidersModalOpen = (state: RootState) => selectUIState(state).isProvidersModalOpen; - -export const selectIsSidebarOpen = (state: RootState) => selectUIState(state).isSidebarOpen; +export const selectIsExportsDrawerOpen = (state: RootState) => selectUIState(state).isExportsDrawerOpen; diff --git a/src/utils/computedReport/getComputedAwsReportItems.test.ts b/src/utils/computedReport/getComputedAwsReportItems.test.ts index 0e70a7399..6e13f952c 100644 --- a/src/utils/computedReport/getComputedAwsReportItems.test.ts +++ b/src/utils/computedReport/getComputedAwsReportItems.test.ts @@ -2,8 +2,7 @@ import { getIdKeyForGroupBy } from './getComputedAwsReportItems'; test('get id key for groupBy', () => { [ - [{ account: 's', instance_type: 's' }, 'account'], - [{ instance_type: 's', region: 's' }, 'instance_type'], + [{ account: 's', service: 's' }, 'account'], [{ region: 's', service: 's' }, 'region'], [{ service: 's' }, 'service'], [{}, 'date'], diff --git a/src/utils/computedReport/getComputedAwsReportItems.ts b/src/utils/computedReport/getComputedAwsReportItems.ts index 0c88c585f..4352d9fec 100644 --- a/src/utils/computedReport/getComputedAwsReportItems.ts +++ b/src/utils/computedReport/getComputedAwsReportItems.ts @@ -9,9 +9,6 @@ export function getIdKeyForGroupBy(groupBy: AwsQuery['group_by'] = {}): Computed if (groupBy.account) { return 'account'; } - if (groupBy.instance_type) { - return 'instance_type'; - } if (groupBy.org_unit_id) { return 'org_unit_id'; } diff --git a/src/utils/computedReport/getComputedAzureReportItems.test.ts b/src/utils/computedReport/getComputedAzureReportItems.test.ts index cdac79cc1..df36bb8db 100644 --- a/src/utils/computedReport/getComputedAzureReportItems.test.ts +++ b/src/utils/computedReport/getComputedAzureReportItems.test.ts @@ -2,8 +2,7 @@ import { getIdKeyForGroupBy } from './getComputedAzureReportItems'; test('get id key for groupBy', () => { [ - [{ subscription_guid: 's', instance_type: 's' }, 'subscription_guid'], - [{ instance_type: 's', resource_location: 's' }, 'instance_type'], + [{ subscription_guid: 's', service_name: 's' }, 'subscription_guid'], [{ resource_location: 's', service_name: 's' }, 'resource_location'], [{ service_name: 's' }, 'service_name'], [{}, 'date'], diff --git a/src/utils/computedReport/getComputedAzureReportItems.ts b/src/utils/computedReport/getComputedAzureReportItems.ts index 9abe9ca14..38c808b8a 100644 --- a/src/utils/computedReport/getComputedAzureReportItems.ts +++ b/src/utils/computedReport/getComputedAzureReportItems.ts @@ -9,9 +9,6 @@ export function getIdKeyForGroupBy(groupBy: AzureQuery['group_by'] = {}): Comput if (groupBy.subscription_guid) { return 'subscription_guid'; } - if (groupBy.instance_type) { - return 'instance_type'; - } if (groupBy.resource_location) { return 'resource_location'; } diff --git a/src/utils/computedReport/getComputedExplorerReportItems.ts b/src/utils/computedReport/getComputedExplorerReportItems.ts index 4038364e6..1a30c94a0 100644 --- a/src/utils/computedReport/getComputedExplorerReportItems.ts +++ b/src/utils/computedReport/getComputedExplorerReportItems.ts @@ -16,9 +16,6 @@ export function getIdKeyForGroupBy(groupBy: Query['group_by'] = {}): ComputedExp if (groupBy.gcp_project) { return 'gcp_project'; } - if (groupBy.instance_type) { - return 'instance_type'; - } if (groupBy.node) { return 'node'; } diff --git a/src/utils/computedReport/getComputedGcpReportItems.test.ts b/src/utils/computedReport/getComputedGcpReportItems.test.ts index 9624e5ae6..932dce3f1 100644 --- a/src/utils/computedReport/getComputedGcpReportItems.test.ts +++ b/src/utils/computedReport/getComputedGcpReportItems.test.ts @@ -2,8 +2,7 @@ import { getIdKeyForGroupBy } from './getComputedGcpReportItems'; test('get id key for groupBy', () => { [ - [{ account: 's', instance_type: 's' }, 'account'], - [{ instance_type: 's', region: 's' }, 'instance_type'], + [{ account: 's', service: 's' }, 'account'], [{ region: 's', service: 's' }, 'region'], [{ service: 's' }, 'service'], [{}, 'date'], diff --git a/src/utils/computedReport/getComputedGcpReportItems.ts b/src/utils/computedReport/getComputedGcpReportItems.ts index 11bdfd075..23cbbe4ab 100644 --- a/src/utils/computedReport/getComputedGcpReportItems.ts +++ b/src/utils/computedReport/getComputedGcpReportItems.ts @@ -12,9 +12,6 @@ export function getIdKeyForGroupBy(groupBy: GcpQuery['group_by'] = {}): Computed if (groupBy.gcp_project) { return 'gcp_project'; } - if (groupBy.instance_type) { - return 'instance_type'; - } if (groupBy.project) { return 'project'; } diff --git a/src/utils/computedReport/getComputedIbmReportItems.test.ts b/src/utils/computedReport/getComputedIbmReportItems.test.ts index 5f9a3e38c..2e58f66ee 100644 --- a/src/utils/computedReport/getComputedIbmReportItems.test.ts +++ b/src/utils/computedReport/getComputedIbmReportItems.test.ts @@ -2,8 +2,7 @@ import { getIdKeyForGroupBy } from './getComputedIbmReportItems'; test('get id key for groupBy', () => { [ - [{ account: 's', instance_type: 's' }, 'account'], - [{ instance_type: 's', region: 's' }, 'instance_type'], + [{ account: 's', service: 's' }, 'account'], [{ region: 's', service: 's' }, 'region'], [{ service: 's' }, 'service'], [{}, 'date'], diff --git a/src/utils/computedReport/getComputedIbmReportItems.ts b/src/utils/computedReport/getComputedIbmReportItems.ts index 6b19788bd..a02616d2f 100644 --- a/src/utils/computedReport/getComputedIbmReportItems.ts +++ b/src/utils/computedReport/getComputedIbmReportItems.ts @@ -9,9 +9,6 @@ export function getIdKeyForGroupBy(groupBy: GcpQuery['group_by'] = {}): Computed if (groupBy.account) { return 'account'; } - if (groupBy.instance_type) { - return 'instance_type'; - } if (groupBy.project) { return 'project'; } diff --git a/src/utils/feature.ts b/src/utils/feature.ts index ad318261c..70c6a5269 100644 --- a/src/utils/feature.ts +++ b/src/utils/feature.ts @@ -1,5 +1,31 @@ -// Show in-progress features in beta environment only -export const isBetaFeature = () => { +// eslint-disable-next-line no-shadow +export const enum FeatureType { + currency = 'currency', // Currency support https://issues.redhat.com/browse/COST-1277 + // ninetyDays = 'ninetyDays', // Cost Explorer 90 days feature https://issues.redhat.com/browse/COST-1670 + exports = 'exports', // Async exports https://issues.redhat.com/browse/COST-2223 + gcpOcp = 'gcp_ocp', // GCP filtered by OpenShift https://issues.redhat.com/browse/COST-682 + ibm = 'ibm', // IBM https://issues.redhat.com/browse/COST-935 + oci = 'oci', // Open Container Initiative +} + +// Show in-progress features for stage-beta environment only +export const isStageBeta = () => { const insights = (window as any).insights; return insights && insights.chrome.isBeta() && !insights.chrome.isProd; }; + +// Helper function to track multiple code segments belonging to a specific feature +export const isFeatureVisible = (feature: FeatureType) => { + // Show in-progress features for stage-beta only + switch (feature) { + case FeatureType.gcpOcp: + return true; // Todo: Enable GCP filtered by OpenShift for all envs + case FeatureType.currency: + case FeatureType.exports: + case FeatureType.ibm: + case FeatureType.oci: + return isStageBeta(); + default: + return false; + } +}; diff --git a/yarn.lock b/yarn.lock index e57454f1b..c57c1c886 100644 --- a/yarn.lock +++ b/yarn.lock @@ -690,76 +690,76 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@patternfly/patternfly@^4.171.1": - version "4.171.1" - resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-4.171.1.tgz#15712e97d9ca53a0c3c7d15c8f28dea80a52fbdc" - integrity sha512-e5Ykg+QOo8TsyOyG6SqytAs52MJXwaP020z3twb8z9G3ZNra92uNsrxGgZEqPJoWbjU4K7LGDxy2DOM1FeRoFw== - -"@patternfly/react-charts@^6.45.14": - version "6.45.15" - resolved "https://registry.yarnpkg.com/@patternfly/react-charts/-/react-charts-6.45.15.tgz#668caebbb1f6754678208c178d77b1342975da58" - integrity sha512-uYpvFh1SRnbc6hLN35X7YFSjI26+Qh9+FrF+UzOhkjlXVWCpfRem4Z5B3w2Ssi7xPzDOW8WwIzMo75aaMfb8Tw== - dependencies: - "@patternfly/react-styles" "^4.42.15" - "@patternfly/react-tokens" "^4.44.15" +"@patternfly/patternfly@^4.179.1": + version "4.179.1" + resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-4.179.1.tgz#c9cfb65ee0fc71ee2eaa909c101a5eaf4234d85f" + integrity sha512-fmTrk7FLtlWC1mstp+RvFt4nsLCxgsS/vDlQaYoCH5KDaM8zu+yUimnlqZBufmG2+ZbnnIysWiSmlpv7/nmmqQ== + +"@patternfly/react-charts@^6.51.5": + version "6.51.5" + resolved "https://registry.yarnpkg.com/@patternfly/react-charts/-/react-charts-6.51.5.tgz#38bfe95a0d46120af478e66d23d743ccecbcac1f" + integrity sha512-A+SL+KWYCX9q+Jr8Uy6SzVDlIr4FUpqT2u7gDDo+kyTEPrCrcGar43fN4ivi5nTE6w23px2l93O4iGQxZeTDDw== + dependencies: + "@patternfly/react-styles" "^4.48.5" + "@patternfly/react-tokens" "^4.50.5" hoist-non-react-statics "^3.3.0" lodash "^4.17.19" tslib "^2.0.0" - victory-area "^35.9.0" - victory-axis "^35.9.0" - victory-bar "^35.9.0" - victory-chart "^35.9.0" - victory-core "^35.9.0" - victory-create-container "^35.9.1" - victory-group "^35.9.0" - victory-legend "^35.9.0" - victory-line "^35.9.0" - victory-pie "^35.9.0" - victory-scatter "^35.9.0" - victory-stack "^35.9.0" - victory-tooltip "^35.9.1" - victory-voronoi-container "^35.9.1" - victory-zoom-container "^35.9.0" - -"@patternfly/react-core@^4.192.14", "@patternfly/react-core@^4.192.15": - version "4.192.15" - resolved "https://registry.yarnpkg.com/@patternfly/react-core/-/react-core-4.192.15.tgz#ee664054233add748321871a6c6f746b974b3e6a" - integrity sha512-nYNhuWeRegZ89WY4OKa4bX06DYsEDCmNYDEq8Jp9CHPVm/6UzmPmWA/Y5MTbLPZN6w2i0cvLHf2wQVrHSzwVvg== - dependencies: - "@patternfly/react-icons" "^4.43.15" - "@patternfly/react-styles" "^4.42.15" - "@patternfly/react-tokens" "^4.44.15" + victory-area "^36.2.1" + victory-axis "^36.2.1" + victory-bar "^36.2.1" + victory-chart "^36.2.1" + victory-core "^36.2.1" + victory-create-container "^36.2.1" + victory-group "^36.2.1" + victory-legend "^36.2.1" + victory-line "^36.2.1" + victory-pie "^36.2.1" + victory-scatter "^36.2.1" + victory-stack "^36.2.1" + victory-tooltip "^36.2.1" + victory-voronoi-container "^36.2.1" + victory-zoom-container "^36.2.1" + +"@patternfly/react-core@^4.198.5": + version "4.198.5" + resolved "https://registry.yarnpkg.com/@patternfly/react-core/-/react-core-4.198.5.tgz#0bbd5e449644a4667ea65ec6903ee4a690e3a10b" + integrity sha512-LMpOYgaCp6W8+2nT12D4/9+6RnIJufBPzn5xtr8/0+gvBe16VMlpBfb9msC5ibX28fWqSKzlEic1Ovn1vhUYFw== + dependencies: + "@patternfly/react-icons" "^4.49.5" + "@patternfly/react-styles" "^4.48.5" + "@patternfly/react-tokens" "^4.50.5" focus-trap "6.2.2" react-dropzone "9.0.0" tippy.js "5.1.2" tslib "^2.0.0" -"@patternfly/react-icons@^4.43.14", "@patternfly/react-icons@^4.43.15": - version "4.43.15" - resolved "https://registry.yarnpkg.com/@patternfly/react-icons/-/react-icons-4.43.15.tgz#8dd696ba92867b1074eee6ef7c672833197f6046" - integrity sha512-b1fcPpIsQVJBGG1onpNTDiGqVJ60BVNy3qvzUu4Ea+lOwP83oIlhODtS792wx1B284a4wxP3uMc6uXCfdULD/w== - -"@patternfly/react-styles@^4.42.14", "@patternfly/react-styles@^4.42.15": - version "4.42.15" - resolved "https://registry.yarnpkg.com/@patternfly/react-styles/-/react-styles-4.42.15.tgz#749c1db42cb78f7b0ac276ba414812438d7c5e6b" - integrity sha512-7E6NmaB3b+OOAqIBlS7nJ74Plq+n76VVTH5zxCyUFkrbjo31TRArwLU2dlO/tZr77Z3MiUjGBcoLLEv0R6BZBg== - -"@patternfly/react-table@^4.61.14": - version "4.61.15" - resolved "https://registry.yarnpkg.com/@patternfly/react-table/-/react-table-4.61.15.tgz#b6260e999ff8dc83b1c0cafd08854a2cfee50e31" - integrity sha512-88jiyGM3R7vo37NzKJDWchHIHpCtIsmYHh5w59ohcTedBflrFTPeFh4NrAUj4H6FsaA3cvJHGcuJFtJ5acrGMw== - dependencies: - "@patternfly/react-core" "^4.192.15" - "@patternfly/react-icons" "^4.43.15" - "@patternfly/react-styles" "^4.42.15" - "@patternfly/react-tokens" "^4.44.15" +"@patternfly/react-icons@^4.49.5": + version "4.49.5" + resolved "https://registry.yarnpkg.com/@patternfly/react-icons/-/react-icons-4.49.5.tgz#ac8c0282b904e8016a0a1dd4db63988e121b4358" + integrity sha512-pR04R32KZAd4uPWeFf/pYXp0uUTwDotsM1iPbjJ6Rpl1sELM4LuQV4gaG22dWLy24VCRizFoP6BSzDxmq+GY4g== + +"@patternfly/react-styles@^4.48.5": + version "4.48.5" + resolved "https://registry.yarnpkg.com/@patternfly/react-styles/-/react-styles-4.48.5.tgz#e900118e76bc0d1f7c388215ed56aff07923228c" + integrity sha512-kXY2piAInTuv1PxuQbSuDYJ+ugIsEs9MnwWqZOMARGrcsElbRLn+vtSxShx7AQeJ9V9e0v64gdgP7pIJqisd1Q== + +"@patternfly/react-table@^4.67.5": + version "4.67.5" + resolved "https://registry.yarnpkg.com/@patternfly/react-table/-/react-table-4.67.5.tgz#b476f460d82fcb966395c0c4a8d3753d549e9861" + integrity sha512-drb4hrPAnAI4wlPtqopotjK5pN6E0b0/o9CYfvIO2O+NeabRg8l3MqpxbKIG2bEwXPjmVCBDLQ/ut14loLNe+g== + dependencies: + "@patternfly/react-core" "^4.198.5" + "@patternfly/react-icons" "^4.49.5" + "@patternfly/react-styles" "^4.48.5" + "@patternfly/react-tokens" "^4.50.5" lodash "^4.17.19" tslib "^2.0.0" -"@patternfly/react-tokens@^4.44.14", "@patternfly/react-tokens@^4.44.15": - version "4.44.15" - resolved "https://registry.yarnpkg.com/@patternfly/react-tokens/-/react-tokens-4.44.15.tgz#8eca5b3b03d1c8fd88664ab45f7a7238f9b9b218" - integrity sha512-Xp82baZURMISkvpNaWNu3w4cMfc2NIsDYh9K5QpVMQ94vphQrAd54UoO5NQI574+/QY2IPGKWadfvix8324J0Q== +"@patternfly/react-tokens@^4.50.5": + version "4.50.5" + resolved "https://registry.yarnpkg.com/@patternfly/react-tokens/-/react-tokens-4.50.5.tgz#5c68ce35002452b6664c55644b7299eb8545cfc1" + integrity sha512-u8+f4eevQdVC7w4jmy+ynIB9R7A9NlI2v5L8GMtkWLt3A0S4DBzNbU90MPSVwgfw0XHcvdFQjuK3OaS06M0bxw== "@popperjs/core@^2.10.1": version "2.11.2" @@ -773,7 +773,7 @@ dependencies: "@babel/runtime" "^7.6.2" -"@redhat-cloud-services/frontend-components-config-utilities@^1.5.10": +"@redhat-cloud-services/frontend-components-config-utilities@^1.5.11": version "1.5.11" resolved "https://registry.yarnpkg.com/@redhat-cloud-services/frontend-components-config-utilities/-/frontend-components-config-utilities-1.5.11.tgz#342b17e8a8fd0b3bd49087053e7f747c1eef6383" integrity sha512-8fjp5l0/RiPWwHLldZnHM8ARrVYP/iYk8XscmE6YhNgDFG9C+Up0pJWXGsV3YeWwppwqR/NtGvdMufoEhy7e7Q== @@ -7498,73 +7498,59 @@ vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= -victory-area@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-area/-/victory-area-35.11.4.tgz#a8cc8193c72fc91b9cd75f5cfac8c83253a9c42c" - integrity sha512-i3rN4Jvn1uwA3YvCuv3EIPEcK2SWSOq3c+TvLvVj1BKFQug11C06UjyQje+3EEzffZ/EMkvGqj2+YudIjrGEzA== +victory-area@^36.2.1: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-area/-/victory-area-36.3.0.tgz#676aa3c96a5d7ac199fcaad8565310fbd6bdfd2f" + integrity sha512-vf/vR+6k4VyeGOuRvc651fN3ItsU6NoGkHrtafCDmJ/KH9bcwgfQS9uZn0aXHC9Vr9rarbFFTrBC6/gLhBYSRA== dependencies: d3-shape "^1.2.0" lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-axis@^35.11.4, victory-axis@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-axis/-/victory-axis-35.11.4.tgz#5145184e0ca3368d573b624d190b125eeab378ba" - integrity sha512-KmPXC/vgbiiWckhK0LruZvsFQqESg6BflhIqS/Xemc50ymWetqbT9VZhjPWbU0arOIP5E8xcFnGUimDN//Jffw== +victory-axis@^36.2.1, victory-axis@^36.3.0: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-axis/-/victory-axis-36.3.0.tgz#d1f76d7c3df5a81be0355b44f21aff2acf2d0894" + integrity sha512-k4h27pN2RHd1TYLia4SbaFn8NHddf7Mzfmqt4WUCLYmkN+R3xQ3METD+X6kwfZmV6FffclJVoD1Errlar/mGdQ== dependencies: lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-bar@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-bar/-/victory-bar-35.11.4.tgz#94da9511062462ef814f4c1f78f3e56eab9a86be" - integrity sha512-EZC+6VGwHkIcOYEppVFBIC5JymYnfF+RLF+NM0Uys7q5+AwaLx36LS9a2xBUBYO/gx20Wd1HVH8kjSHzw1rTqQ== +victory-bar@^36.2.1: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-bar/-/victory-bar-36.3.0.tgz#b1adf2471eff72071b729e98c3f47c6dd2348625" + integrity sha512-8qitdaC2LYzxuQfbmsZLQ8VQksumbofD1ks0PimYM2exnBdo9nKi5GB0zuLVeuxvq36qlXUpPyH1VRUyUnCMPg== dependencies: d3-shape "^1.2.0" lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-brush-container@^35.11.4: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-brush-container/-/victory-brush-container-35.11.4.tgz#499c1d16cdaf26fce9d734fb18fc2ce7f8334fb0" - integrity sha512-KpFYU2LxKbLIjZDhXTdveok1SWLFlG5s2R214IRq+ukYRz21CoxlvZCWhFL60lSPilD+ZD1Udv3sK/RW9CFMxA== +victory-brush-container@^36.3.0: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-brush-container/-/victory-brush-container-36.3.0.tgz#ab6a11138e80296c0bc2169de3cb8db11a2f3347" + integrity sha512-iaal/Dn5o113TFZ2i4GIApZq6lsfSx9MwD+1cQ8yEC67/Krzn127AfDXfPYKUiFhD+NvmCTg8OGsryt4MEHbsw== dependencies: lodash "^4.17.19" prop-types "^15.5.8" react-fast-compare "^2.0.0" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-chart@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-chart/-/victory-chart-35.11.4.tgz#1d729be0f7891d257396daa371e34770ac8cc303" - integrity sha512-oBTjx6ytp+/s6zswCuOUQotiISePQKuDUdOsjnbINBPSNvJuE2W9GXHD+B7ibDkCh4ZWXm8obHz7mnrRGbCGFQ== +victory-chart@^36.2.1: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-chart/-/victory-chart-36.3.0.tgz#b08cf4472e07f4d2fc4e041a34f224c2c92f42f9" + integrity sha512-8BM/xUavO6ineRzhycehHCvf3NT5Z+8YepdvVOVX6PGJUx9rvmZCAVDlB6fDh7kuDdq5mtDFzos+B+BglC1rcA== dependencies: lodash "^4.17.19" prop-types "^15.5.8" react-fast-compare "^2.0.0" - victory-axis "^35.11.4" - victory-core "^35.11.4" - victory-polar-axis "^35.11.4" - victory-shared-events "^35.11.4" - -victory-core@^35.11.4, victory-core@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-core/-/victory-core-35.11.4.tgz#0f7d4b26140f14a53695d8be452e42567a2bafe5" - integrity sha512-PuqrOIn/a6GQgsp/DKvACiJBAJo71P77jltn56mlDZjAAzz+58BL4E0hx7x908GdodLXo2n9gEeuDdjOAlOt0Q== - dependencies: - d3-ease "^1.0.0" - d3-interpolate "^1.1.1" - d3-scale "^1.0.0" - d3-shape "^1.2.0" - d3-timer "^1.0.0" - lodash "^4.17.21" - prop-types "^15.5.8" - react-fast-compare "^2.0.0" + victory-axis "^36.3.0" + victory-core "^36.3.0" + victory-polar-axis "^36.3.0" + victory-shared-events "^36.3.0" -victory-core@^36.2.1: +victory-core@^36.2.1, victory-core@^36.3.0: version "36.3.0" resolved "https://registry.yarnpkg.com/victory-core/-/victory-core-36.3.0.tgz#193dbd7fcd6e8d48ed9a3dbc855cc4e1ac2e8e13" integrity sha512-X75h6FvLCO+9u/PbCkHat7CmcOeJrkTLz0uUhLqryofJN81nfZ7VamRDfw5KxDWYlCB5hmxX+dfjzteaqndgeA== @@ -7578,146 +7564,146 @@ victory-core@^36.2.1: prop-types "^15.5.8" react-fast-compare "^2.0.0" -victory-create-container@^35.9.1: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-create-container/-/victory-create-container-35.11.4.tgz#66107c6ff5e9971b4ecb7cb510711192424b2cd0" - integrity sha512-baDLO4GSk/7eTVEYkhikwgwV5BtrSMuNPjKZBjZrIA3Ka9Fn5shklRG9PWg+26JIBFxqZdM6zOvpF7xhjxi37Q== +victory-create-container@^36.2.1: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-create-container/-/victory-create-container-36.3.0.tgz#31095eed7e78bcf03bd58f0872bd6164c8ed55e2" + integrity sha512-9lx966S5tC4yhVUTD7hLG2Pa4RZnKa6D4EV88sNTC73C3JiDAFFPrLschMjIb5849nd30NPdfXa9zcLnkG3F3w== dependencies: lodash "^4.17.19" - victory-brush-container "^35.11.4" - victory-core "^35.11.4" - victory-cursor-container "^35.11.4" - victory-selection-container "^35.11.4" - victory-voronoi-container "^35.11.4" - victory-zoom-container "^35.11.4" - -victory-cursor-container@^35.11.4: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-cursor-container/-/victory-cursor-container-35.11.4.tgz#5d3bb6bd62d9f615c86a600eb3f5682fca342989" - integrity sha512-gs6bwRd/qbGTN78w2QgshIFxlyOsss5qWOMdCcY9i0Oi99l9OJ6UFQDBzSgKsgD53KGs7JxiKevmUqc3qSZZBg== + victory-brush-container "^36.3.0" + victory-core "^36.3.0" + victory-cursor-container "^36.3.0" + victory-selection-container "^36.3.0" + victory-voronoi-container "^36.3.0" + victory-zoom-container "^36.3.0" + +victory-cursor-container@^36.3.0: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-cursor-container/-/victory-cursor-container-36.3.0.tgz#3ce87f3ac237818669f21f6b2431209b5b883e98" + integrity sha512-iR+8R1kEul22tifSxr8lnyR0kJ9Wb4VGCVyLgH3VGiJkmbaTRLt0fvKxP+sFbrVIngxTemiVuFBi+nwi48lpAA== dependencies: lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-group@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-group/-/victory-group-35.11.4.tgz#6e6c0be195b24bfff466950bd5ae0691d265b9a3" - integrity sha512-ceFBll9h1sPpdMjNcvdgEhnYELVHfx9ymmk8iMEjOKpxa4fVvapMhegPmL0/zTemJ/NCu71W2xIr0VqyqK0DaA== +victory-group@^36.2.1: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-group/-/victory-group-36.3.0.tgz#e353ce0017abe7b88e32465984f1ff982c82f596" + integrity sha512-JsO/CMxQrGOv+GK55ssTWtcASVyC2Y9kJ0a6xWyGKAWufGDehvdmwg2HxAcx9QeIu9vQ0qQOYc3Yk2/DwW0bJQ== dependencies: lodash "^4.17.19" prop-types "^15.5.8" react-fast-compare "^2.0.0" - victory-core "^35.11.4" - victory-shared-events "^35.11.4" + victory-core "^36.3.0" + victory-shared-events "^36.3.0" -victory-legend@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-legend/-/victory-legend-35.11.4.tgz#da22dd5ac26650382ec1914f27a405627ed3756a" - integrity sha512-JZzQARjxYorWlNf9RmZRPAzlgPjukiUV1aTBaeC8YA2S4PhP4PWhNwO/Pb3aCdkifpumpgsm3JULpJiCGOPdBQ== +victory-legend@^36.2.1: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-legend/-/victory-legend-36.3.0.tgz#59442db6cb4068e216f324783df4382a7a8f7d84" + integrity sha512-5gaUBXQcJfA4BQpatCG1X/evAgrzBfMIHhbEkwH4jCtt9aVU+b2qMYRs7nw+Rnzz5Cicb6cwajHgem9mv3E04w== dependencies: lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-line@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-line/-/victory-line-35.11.4.tgz#f8b8a4b098d7a8123845b0fcf102a23b08febb53" - integrity sha512-uKX6/1b1OmlqJZOsVDCCDlyc9QItgb39vRssTwP4CJX1NLU4Sfgq2i4VVUbHXCo/I2sMEczjf3cdnxdZtC6IFA== +victory-line@^36.2.1: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-line/-/victory-line-36.3.0.tgz#6ffc2cb94a3e3fa82bf38c918923463aacc8fd0d" + integrity sha512-qLDHBcmFRMytKACgDt3z6ktuqTNKHvVPifoSrAnORfFlXxMJlGB8+XZAGeAP6DeC5jDOb+sc6DFKzSOIvFLnqA== dependencies: d3-shape "^1.2.0" lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-pie@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-pie/-/victory-pie-35.11.4.tgz#2fb8a37fd37826f5a6654b0e43ebf472cc2c8d95" - integrity sha512-EruxP3PIkrTPTzsC5YhiRKg2s+0UtaRU1ZHZUWK8qi+zlbMDFKYg2AlHqsEnctu5AOdOWLLiye6qUG3oxjiURg== +victory-pie@^36.2.1: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-pie/-/victory-pie-36.3.0.tgz#4ccb60df9d203af03d60c9dadd1a3cbeb3e571a2" + integrity sha512-ZApiB4OW2l6vHSxRZpaqklQ9gnOshqqZBCHgcyr2kbx+oLJMeKi+mJbh/YS1btFCPwL7bSSO4EYdBuaGyAX9VA== dependencies: d3-shape "^1.0.0" lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-polar-axis@^35.11.4: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-polar-axis/-/victory-polar-axis-35.11.4.tgz#1b362c37bbe961f123a621ad61a764a57a0285af" - integrity sha512-mnIRpfARn36TG6ZdCgKR+oWY+pIX6wLHYS0un5xM1TTObKk4IyAR3dnQhEp+3KM1SGoLg0mENFR1Ac8xrus6nQ== +victory-polar-axis@^36.3.0: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-polar-axis/-/victory-polar-axis-36.3.0.tgz#f32c75461a635a518e6d103f5dbc6248192303de" + integrity sha512-xbxHDMJi3CG1dB8ATiURNg0NVVECk0z82soAwVSA5jPmGRmW4t8ByKBfSsw/ommeDclJ95X8+jtR1Jxd+mjsfw== dependencies: lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-scatter@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-scatter/-/victory-scatter-35.11.4.tgz#fbd4f3cf12e64d75d6903cd8ae29b30fb09ee8b7" - integrity sha512-8n9rmXmVju2SqA6Xd90rRTmboaU7WStOnj1QUg4q96DDiAVf6kGPdolzCwbUBbiECLyluGoFNJ043WLXztGpiA== +victory-scatter@^36.2.1: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-scatter/-/victory-scatter-36.3.0.tgz#79e35718050de36aa3cb705999186c48bb794e39" + integrity sha512-PfgM/y7tV/e1Y3ew5R2wvM1O11+EXoToQ2KR0/WTzybwD6R5OghgbcM1xS2NUCtOeubYDkkXjBogZc0rDyyfjA== dependencies: lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-selection-container@^35.11.4: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-selection-container/-/victory-selection-container-35.11.4.tgz#9311adea36d2da75d782dcd6da7e293b15f2e89b" - integrity sha512-Olxnjp9tvHUHeFr4zU/K1dzp0zbeqQRMr2Qqpr85Dd4pWV9bIReE/DanxGhjNg9s3KB5Vsn1GC46PXSTMM1XIQ== +victory-selection-container@^36.3.0: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-selection-container/-/victory-selection-container-36.3.0.tgz#c5b171df47c3706545915a57e2f36cf0b3d58cb3" + integrity sha512-RdFkmxoy2HkbZ9ebuj5Mlx+/OTtPjoUO+FYXItc/Le+HWcGNvkhzmyfZJ+JZAi7atwevCEQawsdUHslIf9mZig== dependencies: lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-shared-events@^35.11.4: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-shared-events/-/victory-shared-events-35.11.4.tgz#05a5dd960062010e7a1ffa0a042dcac04620b2f8" - integrity sha512-flvI27J9K+09BAbuVJf2w51D4OkXlDxE/5BlaHSKzM5jNDYsbcQ6djXa4pqa7NQtMGPOApTBkOSmVRyWRqVoYA== +victory-shared-events@^36.3.0: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-shared-events/-/victory-shared-events-36.3.0.tgz#cd8a715f137937865c84f99d9885fd06b2e0a448" + integrity sha512-XnTzwlRy7uUgBm8NW1tLn4wx3M4lkFO/jA3DHFMYgCVzq+Fu7Tu+BmMPZ8m5DxZFwxKP4HVlYuYKwoQu7yerWA== dependencies: json-stringify-safe "^5.0.1" lodash "^4.17.19" prop-types "^15.5.8" react-fast-compare "^2.0.0" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-stack@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-stack/-/victory-stack-35.11.4.tgz#b3f973a6aedf9d00de0cf81e30428766f214c320" - integrity sha512-fNTY50fN+DCHcK/9AgMUEq0uJ8IXGnMlRtkSCzMB9ZpEzB7Edx3jLM2Gl970zOkwVaDYXTlikPd1dwf+h3m0dA== +victory-stack@^36.2.1: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-stack/-/victory-stack-36.3.0.tgz#c2e5e354640e79e74ae9b57fde390875c2653bd8" + integrity sha512-QtW+UReATWUojUyv2II+i0d+RonLRcxFIhCFPO4Eo6tHS7ZqvBQWii0N3FRlbl65h2jW4By+xjoNxyHoSsbJJQ== dependencies: lodash "^4.17.19" prop-types "^15.5.8" react-fast-compare "^2.0.0" - victory-core "^35.11.4" - victory-shared-events "^35.11.4" + victory-core "^36.3.0" + victory-shared-events "^36.3.0" -victory-tooltip@^35.11.4, victory-tooltip@^35.9.1: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-tooltip/-/victory-tooltip-35.11.4.tgz#3b69abc5e39422364012522c887930263539d699" - integrity sha512-B+UUqzryurtMghJGiE34tg5eI44vHxyOOcuPIM3IpJLujnNIJXVykBjgQZnFq1CT/63TtDCOlzPkOjSbecPtXQ== +victory-tooltip@^36.2.1, victory-tooltip@^36.3.0: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-tooltip/-/victory-tooltip-36.3.0.tgz#0905c681404e5348c00e3b84505734ef14a493bc" + integrity sha512-GM8hOmbcKZRQCtWDi9bJrqvjUEryqwXcw8onz5sFGvPPONLu7nYKCO0s6/m3wCHqAWqotPpu6FTtxXSChYJ6kA== dependencies: lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" -victory-voronoi-container@^35.11.4, victory-voronoi-container@^35.9.1: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-voronoi-container/-/victory-voronoi-container-35.11.4.tgz#708d38d4d703a47926fbb48affc9413cfbe8849a" - integrity sha512-vmwHBm/+nZ9qdRcaNd7r08AVRkus/ER6UA4KAYWkKUe50ZT9NYjDxy0wW/Y7PHQldfL9q/VxAyIE/M6jSFWkEA== +victory-voronoi-container@^36.2.1, victory-voronoi-container@^36.3.0: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-voronoi-container/-/victory-voronoi-container-36.3.0.tgz#4a937f6d6f6c681b92ea71e7c9ce460fabd297c9" + integrity sha512-J0RjsvmIAtWlLh5Ryzu/TDN1YwwI32be2axWsuSEo+x0sGHQblAETERpbjhwDtpsyz6xA/dC5h3kbSG8omcQQQ== dependencies: delaunay-find "0.0.6" lodash "^4.17.19" prop-types "^15.5.8" react-fast-compare "^2.0.0" - victory-core "^35.11.4" - victory-tooltip "^35.11.4" + victory-core "^36.3.0" + victory-tooltip "^36.3.0" -victory-zoom-container@^35.11.4, victory-zoom-container@^35.9.0: - version "35.11.4" - resolved "https://registry.yarnpkg.com/victory-zoom-container/-/victory-zoom-container-35.11.4.tgz#5fd6d29db4cd3b2eac22c59cd7c4d1bff48bbe89" - integrity sha512-8D4hTdvGZqyZdgWjkz/pDRVy/kijWhptFbK0KWl5J1Tt4YuCGiRC9oxQOpEjlqr8TSyeVnpyuF4QuIp9YOIrAw== +victory-zoom-container@^36.2.1, victory-zoom-container@^36.3.0: + version "36.3.0" + resolved "https://registry.yarnpkg.com/victory-zoom-container/-/victory-zoom-container-36.3.0.tgz#9485d4a7bc93ac41268f5903b77b38fccdf78629" + integrity sha512-FG+nh5pi4xCP7EBI+rtc0q3U6RrkOW+ophOgpGCpNGswvvuREl+DtdS/dPjYk+Ktt45f1qmVrT26ovJ4IiMKEA== dependencies: lodash "^4.17.19" prop-types "^15.5.8" - victory-core "^35.11.4" + victory-core "^36.3.0" vue@^3.2.23: version "3.2.31"