mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Cloud Posture] Adding cluster name to cluster card (#144667)
[Cloud security Posture] - Adding cluster name to cluster card
This commit is contained in:
parent
3d82d7e338
commit
f16c7d7140
3 changed files with 10 additions and 4 deletions
|
@ -12,8 +12,10 @@ import type { CspRuleMetadata } from './csp_rule_metadata';
|
|||
export interface CspFinding {
|
||||
'@timestamp': string;
|
||||
cluster_id: string;
|
||||
cluster?: {
|
||||
name?: string;
|
||||
orchestrator?: {
|
||||
cluster?: {
|
||||
name?: string;
|
||||
};
|
||||
};
|
||||
result: CspFindingResult;
|
||||
resource: CspFindingResource;
|
||||
|
|
|
@ -18,7 +18,11 @@ const mockClusterBuckets: ClusterBucket[] = [
|
|||
_id: '123',
|
||||
_index: '123',
|
||||
_source: {
|
||||
cluster: { name: 'cluster_name' },
|
||||
orchestrator: {
|
||||
cluster: {
|
||||
name: 'cluster_name',
|
||||
},
|
||||
},
|
||||
rule: { benchmark: { name: 'CIS Kubernetes', id: 'cis_k8s' } },
|
||||
'@timestamp': '123',
|
||||
},
|
||||
|
|
|
@ -71,7 +71,7 @@ export const getClustersFromAggs = (clusters: ClusterBucket[]): ClusterWithoutTr
|
|||
|
||||
const meta = {
|
||||
clusterId: cluster.key,
|
||||
clusterName: latestFindingHit._source.cluster?.name,
|
||||
clusterName: latestFindingHit._source.orchestrator?.cluster?.name,
|
||||
benchmarkName: latestFindingHit._source.rule.benchmark.name,
|
||||
benchmarkId: latestFindingHit._source.rule.benchmark.id,
|
||||
lastUpdate: latestFindingHit._source['@timestamp'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue