Skip to content

Commit

Permalink
Small improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
crespocarlos committed Sep 14, 2023
1 parent 1f72855 commit d0519f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ import { kubernetesCharts } from './host/kubernetes_charts';
export { type KPIChartProps };
export const assetDetailsDashboards = {
host: { hostMetricFlyoutCharts, hostMetricChartsFullPage, hostKPICharts, keyField: 'host.name' },
nginx: { nginxStubstatusCharts, nginxAccessCharts, keyField: 'host.name' },
kubernetes: { kubernetesCharts, keyField: 'kubernetes.node.name' },
nginx: {
nginxStubstatusCharts,
nginxAccessCharts,
keyField: 'host.name',
dependsOn: ['nginx.stubstatus', 'nginx.access'],
},
kubernetes: {
kubernetesCharts,
keyField: 'kubernetes.node.name',
dependsOn: ['kubernetes.node'],
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const MetricsGrid = React.memo(
data-test-subj="infraAssetDetailsMetricsChart"
/>
</Section>
<Section dependsOn={['kubernetes.node']} title={KubernetesMetricsSectionTitle}>
<Section dependsOn={kubernetes.dependsOn} title={KubernetesMetricsSectionTitle}>
<ChartGrid
assetName={assetName}
timeRange={timeRange}
Expand All @@ -52,11 +52,11 @@ export const MetricsGrid = React.memo(
data-test-subj="infraAssetDetailsNginxMetricsChart"
/>
</Section>
<Section dependsOn={['nginx.stubstatus', 'nginx.access']} title={NginxMetricsSectionTitle}>
<Section dependsOn={nginx.dependsOn} title={NginxMetricsSectionTitle}>
<ChartGrid
assetName={assetName}
timeRange={timeRange}
filterFieldName={host.keyField}
filterFieldName={nginx.keyField}
charts={[
...nginx.nginxStubstatusCharts.map((chart) => ({
...chart,
Expand Down

0 comments on commit d0519f9

Please sign in to comment.