-
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.
Revert "[ECO][Inventory v2] Ad hoc data view: Add get entities defini…
…tion endpoint using sources (#203424) (#204012) This reverts commit 5bacf1f. Reverting because it's blocked by #202296
- Loading branch information
1 parent
8d5cd4f
commit fe67c95
Showing
6 changed files
with
39 additions
and
89 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
27 changes: 27 additions & 0 deletions
27
x-pack/plugins/observability_solution/inventory/public/hooks/use_fetch_entity_definition.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,27 @@ | ||
/* | ||
* 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 { useAbortableAsync } from '@kbn/observability-utils-browser/hooks/use_abortable_async'; | ||
import { useKibana } from './use_kibana'; | ||
|
||
export const useFetchEntityDefinition = (id: string) => { | ||
const { | ||
services: { entityManager }, | ||
} = useKibana(); | ||
|
||
const { value, loading } = useAbortableAsync( | ||
({ signal }) => { | ||
return entityManager.entityClient.getEntityDefinition(id); | ||
}, | ||
[entityManager.entityClient, id] | ||
); | ||
|
||
return { | ||
entityDefinitions: value?.definitions, | ||
isEntityDefinitionLoading: loading, | ||
}; | ||
}; |
34 changes: 0 additions & 34 deletions
34
...servability_solution/inventory/public/hooks/use_fetch_entity_definition_index_patterns.ts
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
...bservability_solution/inventory/server/routes/entity_definition/get_entity_definitions.ts
This file was deleted.
Oops, something went wrong.
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