-
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.
Add kubernetes charts to the host detail view
- Loading branch information
1 parent
0e2775f
commit 1f72855
Showing
37 changed files
with
505 additions
and
241 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.