-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Infra UI] Add kubernetes charts to the host detail view (#166383)
closes #162944 ## Summary This PR adds the Kubernetes Overview section to the Host Detail view. **Old view** <img width="778" alt="image" src="https://github.com/elastic/kibana/assets/2767137/2c6c3341-7aa3-48e4-a5d5-e9580b2e2c13"> **New view** <img width="778" alt="image" src="https://github.com/elastic/kibana/assets/2767137/357ef56d-b783-41ed-8d7f-e9a3369d13b0"> There was some reog in the formulas folder too, separating nginx and kubernetes from hosts formulas. ### How to test - Start a local Kibana pointing to a oblt cluster - Navigate to `Infrastructure` > `Hosts` - Click on a `gke` host to navigate to the detail view
- Loading branch information
1 parent
1de3917
commit f94b4c2
Showing
42 changed files
with
624 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
...nfra/public/common/visualizations/lens/dashboards/asset_details/host/kubernetes_charts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import { kubernetesLensFormulas } from '../../../formulas'; | ||
import { XY_OVERRIDES } from '../../constants'; | ||
import type { XYConfig } from '../metric_charts/types'; | ||
|
||
export const kubernetesCharts: XYConfig[] = [ | ||
{ | ||
id: 'nodeCpuCapacity', | ||
title: i18n.translate('xpack.infra.assetDetails.metricsCharts.kubernetes.nodeCpuCapacity', { | ||
defaultMessage: 'Node CPU Capacity', | ||
}), | ||
|
||
layers: [ | ||
{ | ||
data: [kubernetesLensFormulas.nodeCpuCapacity, kubernetesLensFormulas.nodeCpuUsed], | ||
type: 'visualization', | ||
options: { | ||
seriesType: 'area', | ||
}, | ||
}, | ||
], | ||
dataViewOrigin: 'metrics', | ||
overrides: { | ||
settings: XY_OVERRIDES.settings, | ||
}, | ||
}, | ||
{ | ||
id: 'nodeMemoryCapacity', | ||
title: i18n.translate('xpack.infra.assetDetails.metricsCharts.nginx.nodeMemoryCapacity', { | ||
defaultMessage: 'Node Memory Capacity', | ||
}), | ||
|
||
layers: [ | ||
{ | ||
data: [kubernetesLensFormulas.nodeMemoryCapacity, kubernetesLensFormulas.nodeMemoryUsed], | ||
type: 'visualization', | ||
options: { | ||
seriesType: 'area', | ||
}, | ||
}, | ||
], | ||
dataViewOrigin: 'metrics', | ||
overrides: { | ||
settings: XY_OVERRIDES.settings, | ||
}, | ||
}, | ||
{ | ||
id: 'nodeDiskCapacity', | ||
title: i18n.translate('xpack.infra.assetDetails.metricsCharts.nginx.nodeDiskCapacity', { | ||
defaultMessage: 'Node Disk Capacity', | ||
}), | ||
|
||
layers: [ | ||
{ | ||
data: [kubernetesLensFormulas.nodeDiskCapacity, kubernetesLensFormulas.nodeDiskUsed], | ||
type: 'visualization', | ||
options: { | ||
seriesType: 'area', | ||
}, | ||
}, | ||
], | ||
dataViewOrigin: 'metrics', | ||
overrides: { | ||
settings: XY_OVERRIDES.settings, | ||
}, | ||
}, | ||
{ | ||
id: 'nodePodCapacity', | ||
title: i18n.translate('xpack.infra.assetDetails.metricsCharts.nginx.nodePodCapacity', { | ||
defaultMessage: 'Node Pod Capacity', | ||
}), | ||
|
||
layers: [ | ||
{ | ||
data: [kubernetesLensFormulas.nodePodCapacity, kubernetesLensFormulas.nodePodUsed], | ||
type: 'visualization', | ||
options: { | ||
seriesType: 'area', | ||
}, | ||
}, | ||
], | ||
dataViewOrigin: 'metrics', | ||
overrides: { | ||
settings: XY_OVERRIDES.settings, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.