-
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.
Reintroduce NAME_FIELDS for displayable names.
- Loading branch information
Showing
2 changed files
with
20 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { InfraNodeType } from '../graphql/types'; | ||
|
||
// Used for metadata and snapshots resolvers to find the field that contains | ||
// a displayable name of a node. | ||
// Intentionally not the same as xpack.infra.sources.default.fields.{host,container,pod}. | ||
// TODO: consider moving this to source configuration too. | ||
export const NAME_FIELDS = { | ||
[InfraNodeType.host]: 'host.name', | ||
[InfraNodeType.pod]: 'kubernetes.pod.name', | ||
[InfraNodeType.container]: 'container.name', | ||
}; |