From ff1b0badc827c452b6a9dc6aae664a08edb8c19a Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Wed, 17 Jul 2024 13:12:46 -0400 Subject: [PATCH] Refactored storage historical chart to be visible when grouped by cluster, node, and project Fixed storage card title in OCP breakdown for isPlatformProject flag https://issues.redhat.com/browse/COST-4856 --- .../costOverview/costOverviewBase.tsx | 23 ++++---- .../historicalData/historicalDataBase.tsx | 56 +++++++++++-------- .../awsCostOverview/awsCostOverviewWidgets.ts | 6 +- .../azureCostOverviewWidgets.ts | 6 +- .../costOverview/common/costOverviewCommon.ts | 14 +---- .../gcpCostOverview/gcpCostOverviewWidgets.ts | 8 +-- .../ibmCostOverview/ibmCostOverviewWidgets.ts | 8 +-- .../ociCostOverview/ociCostOverviewWidgets.ts | 6 +- .../ocpCostOverview/ocpCostOverviewWidgets.ts | 23 +++----- .../rhelCostOverviewWidgets.ts | 12 +--- .../common/historicalDataCommon.ts | 4 +- .../ocpHistoricalDataWidgets.ts | 5 +- 12 files changed, 79 insertions(+), 92 deletions(-) diff --git a/src/routes/details/components/costOverview/costOverviewBase.tsx b/src/routes/details/components/costOverview/costOverviewBase.tsx index 509aad557..792e7490b 100644 --- a/src/routes/details/components/costOverview/costOverviewBase.tsx +++ b/src/routes/details/components/costOverview/costOverviewBase.tsx @@ -59,7 +59,7 @@ class CostOverviewsBase extends React.Component { const { groupBy, intl, report, title } = this.props; let showWidget = false; - for (const groupById of widget.cluster.showWidgetOnGroupBy) { + for (const groupById of widget.showWidgetOnGroupBy) { if (groupById === groupBy || (groupById === tagPrefix && groupBy && groupBy.indexOf(tagPrefix) !== -1)) { showWidget = true; break; @@ -210,8 +210,8 @@ class CostOverviewsBase extends React.Component { const { groupBy, intl } = this.props; let showWidget = false; - if (widget.pvc.showWidgetOnGroupBy) { - for (const groupById of widget.pvc.showWidgetOnGroupBy) { + if (widget.showWidgetOnGroupBy) { + for (const groupById of widget.showWidgetOnGroupBy) { if (groupById === groupBy) { showWidget = true; break; @@ -242,20 +242,23 @@ class CostOverviewsBase extends React.Component { const groupByCostCategory = getGroupByCostCategory(query); const groupByOrg = getGroupByOrgValue(query); const groupByTag = getGroupByTagKey(query); + let showWidget = false; + let showPlatformCosts = false; - if (widget.reportSummary.showWidgetOnGroupBy) { - for (const groupById of widget.reportSummary.showWidgetOnGroupBy) { + if (widget.showWidgetOnGroupBy) { + for (const groupById of widget.showWidgetOnGroupBy) { if (groupById === groupBy || groupByCostCategory || groupByOrg || groupByTag) { showWidget = true; break; } } } - if (!showWidget && widget.reportSummary.showWidgetOnPlatformCategory) { - for (const categoryId of widget.reportSummary.showWidgetOnPlatformCategory) { + if (!showWidget && widget.showWidgetOnPlatformCategory) { + for (const categoryId of widget.showWidgetOnPlatformCategory) { if (isPlatformCosts && categoryId === platformCategoryKey) { showWidget = true; + showPlatformCosts = true; break; } } @@ -267,7 +270,7 @@ class CostOverviewsBase extends React.Component { costDistribution={!isVolumeWidget ? costDistribution : undefined} costType={!isVolumeWidget ? costType : undefined} currency={currency} - isPlatformCosts={isPlatformCosts} + isPlatformCosts={showPlatformCosts} reportGroupBy={widget.reportSummary.reportGroupBy} reportPathsType={widget.reportPathsType} reportType={widget.reportType} @@ -285,8 +288,8 @@ class CostOverviewsBase extends React.Component { let showWidget = false; - if (widget.volume.showWidgetOnGroupBy) { - for (const groupById of widget.volume.showWidgetOnGroupBy) { + if (widget.showWidgetOnGroupBy) { + for (const groupById of widget.showWidgetOnGroupBy) { if (groupById === groupBy || (groupById === tagPrefix && groupBy && groupBy.indexOf(tagPrefix) !== -1)) { showWidget = true; break; diff --git a/src/routes/details/components/historicalData/historicalDataBase.tsx b/src/routes/details/components/historicalData/historicalDataBase.tsx index 349ede9de..e08e614b7 100644 --- a/src/routes/details/components/historicalData/historicalDataBase.tsx +++ b/src/routes/details/components/historicalData/historicalDataBase.tsx @@ -71,8 +71,8 @@ class HistoricalDatasBase extends React.Component { const { groupBy, intl } = this.props; let showWidget = false; - if (widget.network?.showWidgetOnGroupBy) { - for (const groupById of widget.network.showWidgetOnGroupBy) { + if (widget?.showWidgetOnGroupBy) { + for (const groupById of widget.showWidgetOnGroupBy) { if (groupById === groupBy) { showWidget = true; break; @@ -102,28 +102,40 @@ class HistoricalDatasBase extends React.Component { return null; }; - // Returns volume chart + // Returns storage summary private getVolumeChart = (widget: HistoricalDataWidget) => { - const { intl } = this.props; + const { groupBy, intl } = this.props; - return ( - - - - {intl.formatMessage(messages.historicalChartTitle, { - value: this.getTitleKey(widget.reportPathsType, widget.reportType), - })} - - - - - - - ); + let showWidget = false; + if (widget?.showWidgetOnGroupBy) { + for (const groupById of widget.showWidgetOnGroupBy) { + if (groupById === groupBy) { + showWidget = true; + break; + } + } + } + if (showWidget) { + return ( + + + + {intl.formatMessage(messages.historicalChartTitle, { + value: this.getTitleKey(widget.reportPathsType, widget.reportType), + })} + + + + + + + ); + } + return null; }; // Returns trend chart diff --git a/src/store/breakdown/costOverview/awsCostOverview/awsCostOverviewWidgets.ts b/src/store/breakdown/costOverview/awsCostOverview/awsCostOverviewWidgets.ts index f187b1d0a..c9e3f87d0 100644 --- a/src/store/breakdown/costOverview/awsCostOverview/awsCostOverviewWidgets.ts +++ b/src/store/breakdown/costOverview/awsCostOverview/awsCostOverviewWidgets.ts @@ -19,10 +19,10 @@ export const accountSummaryWidget: AwsCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'account', - showWidgetOnGroupBy: ['region', 'service', tagPrefix], }, reportPathsType: ReportPathsType.aws, reportType: ReportType.cost, + showWidgetOnGroupBy: ['region', 'service', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -30,10 +30,10 @@ export const regionSummaryWidget: AwsCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'region', - showWidgetOnGroupBy: ['account', 'service', tagPrefix], }, reportPathsType: ReportPathsType.aws, reportType: ReportType.cost, + showWidgetOnGroupBy: ['account', 'service', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -41,9 +41,9 @@ export const serviceSummaryWidget: AwsCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'service', - showWidgetOnGroupBy: ['region', 'account', tagPrefix], }, reportPathsType: ReportPathsType.aws, reportType: ReportType.cost, + showWidgetOnGroupBy: ['region', 'account', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; diff --git a/src/store/breakdown/costOverview/azureCostOverview/azureCostOverviewWidgets.ts b/src/store/breakdown/costOverview/azureCostOverview/azureCostOverviewWidgets.ts index 9797c36c3..fa50b9fc2 100644 --- a/src/store/breakdown/costOverview/azureCostOverview/azureCostOverviewWidgets.ts +++ b/src/store/breakdown/costOverview/azureCostOverview/azureCostOverviewWidgets.ts @@ -18,10 +18,10 @@ export const accountSummaryWidget: AzureCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'subscription_guid', - showWidgetOnGroupBy: ['resource_location', 'service_name', tagPrefix], }, reportPathsType: ReportPathsType.azure, reportType: ReportType.cost, + showWidgetOnGroupBy: ['resource_location', 'service_name', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -29,10 +29,10 @@ export const regionSummaryWidget: AzureCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'resource_location', - showWidgetOnGroupBy: ['subscription_guid', 'service_name', tagPrefix], }, reportPathsType: ReportPathsType.azure, reportType: ReportType.cost, + showWidgetOnGroupBy: ['subscription_guid', 'service_name', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -40,9 +40,9 @@ export const serviceSummaryWidget: AzureCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'service_name', - showWidgetOnGroupBy: ['resource_location', 'subscription_guid', tagPrefix], }, reportPathsType: ReportPathsType.azure, reportType: ReportType.cost, + showWidgetOnGroupBy: ['resource_location', 'subscription_guid', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; diff --git a/src/store/breakdown/costOverview/common/costOverviewCommon.ts b/src/store/breakdown/costOverview/common/costOverviewCommon.ts index 4d0c367ed..8ba267603 100644 --- a/src/store/breakdown/costOverview/common/costOverviewCommon.ts +++ b/src/store/breakdown/costOverview/common/costOverviewCommon.ts @@ -17,24 +17,14 @@ export interface CostOverviewWidget { id: number; cluster?: { reportGroupBy: string; // Report group_by - showWidgetOnGroupBy?: string[]; // Show cluster card when group_by is matched - }; - pvc?: { - showWidgetOnGroupBy?: string[]; // Show pvc chart when group_by is matched - }; - usage?: { - showCapacityOnGroupBy?: string[]; // Show capacity when group_by is matched }; reportSummary?: { reportGroupBy: string; // Report group_by - showWidgetOnPlatformCategory?: string[]; - showWidgetOnGroupBy?: string[]; // Show summary card when group_by is matched usePlaceholder?: boolean; // Use placeholder to keep card placement when widget is not shown }; reportPathsType: ReportPathsType; // Report URL path reportType: ReportType; // Report type; cost, storage, etc. + showWidgetOnGroupBy?: string[]; // Show widget when group_by is matched + showWidgetOnPlatformCategory?: string[]; // Show widget when platform category is matched type: CostOverviewWidgetType; - volume?: { - showWidgetOnGroupBy?: string[]; // Show volume usage chart when group_by is matched - }; } diff --git a/src/store/breakdown/costOverview/gcpCostOverview/gcpCostOverviewWidgets.ts b/src/store/breakdown/costOverview/gcpCostOverview/gcpCostOverviewWidgets.ts index 6b681e5fa..9ede7a1ab 100644 --- a/src/store/breakdown/costOverview/gcpCostOverview/gcpCostOverviewWidgets.ts +++ b/src/store/breakdown/costOverview/gcpCostOverview/gcpCostOverviewWidgets.ts @@ -18,10 +18,10 @@ export const accountSummaryWidget: GcpCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'account', - showWidgetOnGroupBy: ['gcp_project', 'region', 'service', tagPrefix], }, reportPathsType: ReportPathsType.gcp, reportType: ReportType.cost, + showWidgetOnGroupBy: ['gcp_project', 'region', 'service', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -29,10 +29,10 @@ export const projectSummaryWidget: GcpCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'gcp_project', - showWidgetOnGroupBy: ['account', 'region', 'service', tagPrefix], }, reportPathsType: ReportPathsType.gcp, reportType: ReportType.cost, + showWidgetOnGroupBy: ['account', 'region', 'service', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -40,10 +40,10 @@ export const regionSummaryWidget: GcpCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'region', - showWidgetOnGroupBy: ['account', 'gcp_project', 'service', tagPrefix], }, reportPathsType: ReportPathsType.gcp, reportType: ReportType.cost, + showWidgetOnGroupBy: ['account', 'gcp_project', 'service', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -51,9 +51,9 @@ export const serviceSummaryWidget: GcpCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'service', - showWidgetOnGroupBy: ['gcp_project', 'region', 'account', tagPrefix], }, reportPathsType: ReportPathsType.gcp, reportType: ReportType.cost, + showWidgetOnGroupBy: ['gcp_project', 'region', 'account', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; diff --git a/src/store/breakdown/costOverview/ibmCostOverview/ibmCostOverviewWidgets.ts b/src/store/breakdown/costOverview/ibmCostOverview/ibmCostOverviewWidgets.ts index 021207d7a..fb27a63d0 100644 --- a/src/store/breakdown/costOverview/ibmCostOverview/ibmCostOverviewWidgets.ts +++ b/src/store/breakdown/costOverview/ibmCostOverview/ibmCostOverviewWidgets.ts @@ -19,10 +19,10 @@ export const accountSummaryWidget: IbmCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'account', - showWidgetOnGroupBy: ['project', 'region', 'service', tagPrefix], }, reportPathsType: ReportPathsType.ibm, reportType: ReportType.cost, + showWidgetOnGroupBy: ['project', 'region', 'service', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -30,10 +30,10 @@ export const projectSummaryWidget: IbmCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'project', - showWidgetOnGroupBy: ['account', 'region', 'service', tagPrefix], }, reportPathsType: ReportPathsType.ibm, reportType: ReportType.cost, + showWidgetOnGroupBy: ['account', 'region', 'service', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -41,10 +41,10 @@ export const regionSummaryWidget: IbmCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'region', - showWidgetOnGroupBy: ['account', 'project', 'service', tagPrefix], }, reportPathsType: ReportPathsType.ibm, reportType: ReportType.cost, + showWidgetOnGroupBy: ['account', 'project', 'service', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -52,9 +52,9 @@ export const serviceSummaryWidget: IbmCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'service', - showWidgetOnGroupBy: ['project', 'region', 'account', tagPrefix], }, reportPathsType: ReportPathsType.ibm, reportType: ReportType.cost, + showWidgetOnGroupBy: ['project', 'region', 'account', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; diff --git a/src/store/breakdown/costOverview/ociCostOverview/ociCostOverviewWidgets.ts b/src/store/breakdown/costOverview/ociCostOverview/ociCostOverviewWidgets.ts index f687590f9..e955c31e7 100644 --- a/src/store/breakdown/costOverview/ociCostOverview/ociCostOverviewWidgets.ts +++ b/src/store/breakdown/costOverview/ociCostOverview/ociCostOverviewWidgets.ts @@ -18,10 +18,10 @@ export const accountSummaryWidget: OciCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'payer_tenant_id', - showWidgetOnGroupBy: ['region', 'product_service', tagPrefix], }, reportPathsType: ReportPathsType.oci, reportType: ReportType.cost, + showWidgetOnGroupBy: ['region', 'product_service', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -29,10 +29,10 @@ export const regionSummaryWidget: OciCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'region', - showWidgetOnGroupBy: ['payer_tenant_id', 'product_service', tagPrefix], }, reportPathsType: ReportPathsType.oci, reportType: ReportType.cost, + showWidgetOnGroupBy: ['payer_tenant_id', 'product_service', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; @@ -40,9 +40,9 @@ export const serviceSummaryWidget: OciCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'product_service', - showWidgetOnGroupBy: ['region', 'payer_tenant_id', tagPrefix], }, reportPathsType: ReportPathsType.oci, reportType: ReportType.cost, + showWidgetOnGroupBy: ['region', 'payer_tenant_id', tagPrefix], type: CostOverviewWidgetType.reportSummary, }; diff --git a/src/store/breakdown/costOverview/ocpCostOverview/ocpCostOverviewWidgets.ts b/src/store/breakdown/costOverview/ocpCostOverview/ocpCostOverviewWidgets.ts index b30e70a91..1cd6f0bb0 100644 --- a/src/store/breakdown/costOverview/ocpCostOverview/ocpCostOverviewWidgets.ts +++ b/src/store/breakdown/costOverview/ocpCostOverview/ocpCostOverviewWidgets.ts @@ -11,10 +11,10 @@ export const clusterWidget: OcpCostOverviewWidget = { id: getId(), cluster: { reportGroupBy: 'project', - showWidgetOnGroupBy: ['project'], }, reportPathsType: ReportPathsType.ocp, reportType: ReportType.cost, + showWidgetOnGroupBy: ['project'], type: CostOverviewWidgetType.cluster, }; @@ -37,9 +37,6 @@ export const costDistributionWidget: OcpCostOverviewWidget = { export const cpuUsageWidget: OcpCostOverviewWidget = { chartName: 'ocpCpuWidget', id: getId(), - usage: { - showCapacityOnGroupBy: ['cluster'], - }, reportPathsType: ReportPathsType.ocp, reportType: ReportType.cpu, type: CostOverviewWidgetType.cpuUsage, @@ -48,9 +45,6 @@ export const cpuUsageWidget: OcpCostOverviewWidget = { export const memoryUsageWidget: OcpCostOverviewWidget = { chartName: 'ocpMemoryWidget', id: getId(), - usage: { - showCapacityOnGroupBy: ['cluster'], - }, reportPathsType: ReportPathsType.ocp, reportType: ReportType.memory, type: CostOverviewWidgetType.memoryUsage, @@ -60,35 +54,34 @@ export const projectSummaryWidget: OcpCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'project', - showWidgetOnPlatformCategory: [platformCategoryKey], - showWidgetOnGroupBy: ['cluster'], usePlaceholder: true, }, reportType: ReportType.cost, reportPathsType: ReportPathsType.ocp, + showWidgetOnGroupBy: ['cluster'], + showWidgetOnPlatformCategory: [platformCategoryKey], type: CostOverviewWidgetType.reportSummary, }; export const pvcWidget: OcpCostOverviewWidget = { chartName: 'ocpPvcWidget', id: getId(), - pvc: { - showWidgetOnGroupBy: ['project'], - }, reportPathsType: ReportPathsType.ocp, reportType: ReportType.volume, + showWidgetOnGroupBy: ['project'], type: CostOverviewWidgetType.pvc, }; +// Storage summary export const volumeSummaryWidget: OcpCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'storageclass', - showWidgetOnGroupBy: ['cluster', 'node', 'project'], usePlaceholder: true, }, reportType: ReportType.volume, reportPathsType: ReportPathsType.ocp, + showWidgetOnGroupBy: ['cluster', 'node', 'project'], type: CostOverviewWidgetType.reportSummary, }; @@ -97,8 +90,6 @@ export const volumeUsageWidget: OcpCostOverviewWidget = { id: getId(), reportPathsType: ReportPathsType.ocp, reportType: ReportType.volume, + showWidgetOnGroupBy: ['cluster', 'node', tagPrefix], type: CostOverviewWidgetType.volumeUsage, - volume: { - showWidgetOnGroupBy: ['cluster', 'node', tagPrefix], - }, }; diff --git a/src/store/breakdown/costOverview/rhelCostOverview/rhelCostOverviewWidgets.ts b/src/store/breakdown/costOverview/rhelCostOverview/rhelCostOverviewWidgets.ts index ef80a4689..b41c8c2b0 100644 --- a/src/store/breakdown/costOverview/rhelCostOverview/rhelCostOverviewWidgets.ts +++ b/src/store/breakdown/costOverview/rhelCostOverview/rhelCostOverviewWidgets.ts @@ -11,10 +11,10 @@ export const clusterWidget: RhelCostOverviewWidget = { id: getId(), cluster: { reportGroupBy: 'project', - showWidgetOnGroupBy: ['project'], }, reportPathsType: ReportPathsType.rhel, reportType: ReportType.cost, + showWidgetOnGroupBy: ['project'], type: CostOverviewWidgetType.cluster, }; @@ -29,9 +29,6 @@ export const costWidget: RhelCostOverviewWidget = { export const cpuUsageWidget: RhelCostOverviewWidget = { chartName: 'rhelCpuWidget', id: getId(), - usage: { - showCapacityOnGroupBy: ['cluster'], - }, reportPathsType: ReportPathsType.rhel, reportType: ReportType.cpu, type: CostOverviewWidgetType.cpuUsage, @@ -40,9 +37,6 @@ export const cpuUsageWidget: RhelCostOverviewWidget = { export const memoryUsageWidget: RhelCostOverviewWidget = { chartName: 'rhelMemoryWidget', id: getId(), - usage: { - showCapacityOnGroupBy: ['cluster'], - }, reportPathsType: ReportPathsType.rhel, reportType: ReportType.memory, type: CostOverviewWidgetType.memoryUsage, @@ -52,12 +46,12 @@ export const projectSummaryWidget: RhelCostOverviewWidget = { id: getId(), reportSummary: { reportGroupBy: 'project', - showWidgetOnPlatformCategory: [platformCategoryKey], - showWidgetOnGroupBy: ['cluster'], usePlaceholder: true, }, reportType: ReportType.cost, reportPathsType: ReportPathsType.rhel, + showWidgetOnPlatformCategory: [platformCategoryKey], + showWidgetOnGroupBy: ['cluster'], type: CostOverviewWidgetType.reportSummary, }; diff --git a/src/store/breakdown/historicalData/common/historicalDataCommon.ts b/src/store/breakdown/historicalData/common/historicalDataCommon.ts index 7bdb0f9a2..81976df17 100644 --- a/src/store/breakdown/historicalData/common/historicalDataCommon.ts +++ b/src/store/breakdown/historicalData/common/historicalDataCommon.ts @@ -12,10 +12,8 @@ export const enum HistoricalDataWidgetType { export interface HistoricalDataWidget { chartName: string; // Will be the prefix for ids within the chart id: number; - network?: { - showWidgetOnGroupBy?: string[]; // Show network chart when group_by is matched - }; reportPathsType: ReportPathsType; // Report URL path reportType: ReportType; // Report type; cost, storage, etc. + showWidgetOnGroupBy?: string[]; // Show widget when group_by is matched type: HistoricalDataWidgetType; } diff --git a/src/store/breakdown/historicalData/ocpHistoricalData/ocpHistoricalDataWidgets.ts b/src/store/breakdown/historicalData/ocpHistoricalData/ocpHistoricalDataWidgets.ts index 7468b14ec..38c960c26 100644 --- a/src/store/breakdown/historicalData/ocpHistoricalData/ocpHistoricalDataWidgets.ts +++ b/src/store/breakdown/historicalData/ocpHistoricalData/ocpHistoricalDataWidgets.ts @@ -33,11 +33,9 @@ export const memoryUsageWidget: OcpHistoricalDataWidget = { export const networkUsageWidget: OcpHistoricalDataWidget = { chartName: 'ocpNetworkChart', id: getId(), - network: { - showWidgetOnGroupBy: ['cluster', 'node'], - }, reportPathsType: ReportPathsType.ocp, reportType: ReportType.network, + showWidgetOnGroupBy: ['cluster', 'node'], type: HistoricalDataWidgetType.network, }; @@ -46,5 +44,6 @@ export const volumeUsageWidget: OcpHistoricalDataWidget = { id: getId(), reportPathsType: ReportPathsType.ocp, reportType: ReportType.volume, + showWidgetOnGroupBy: ['cluster', 'node', 'project'], type: HistoricalDataWidgetType.volume, };