-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Inventory] Inventory plugin #191798
Merged
Merged
[Inventory] Inventory plugin #191798
Changes from 8 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
eb7569e
[Inventory] Inventory plugin
dgieselaar 570f78d
Extract datasets
dgieselaar f5727e8
Disable inventory plugin by default
dgieselaar 88cefe5
Fix types
dgieselaar e53b3b3
Disable by default
dgieselaar fe471af
Fix lint errors & CODEOWNERS
dgieselaar bc0b98c
Update codeowners via kibana.jsonc
dgieselaar f49bdac
Use right team
dgieselaar 4336608
Add limits
dgieselaar e4bb64d
Separate repository client in fetch/stream
dgieselaar a709bec
Merge branch 'main' of github.com:elastic/kibana into inventory-plugin
dgieselaar cad3bb3
Update README
dgieselaar 745b9da
Merge branch 'main' of github.com:elastic/kibana into inventory-plugin
dgieselaar ab9f8f9
Use KibanaRenderContextProvider
dgieselaar 296ed2a
[CI] Auto-commit changed files from 'node scripts/yarn_deduplicate'
kibanamachine 8dddf03
Fix types & tests
dgieselaar 21003d7
Fix APM E2E test
dgieselaar b46a785
Fix bug in SSE formatting
dgieselaar b2fe459
Merge branch 'main' of github.com:elastic/kibana into inventory-plugin
dgieselaar 171a8df
Merge branch 'main' of github.com:elastic/kibana into inventory-plugin
dgieselaar 2f22a5d
Remove AI work
dgieselaar d73d1e5
Update CODEOWNERS
dgieselaar a4e7b65
Update CODEOWNERS
dgieselaar cd20fc0
[CI] Auto-commit changed files from 'node scripts/lint_packages --fix'
kibanamachine a61864e
Add back changes to menu
dgieselaar 2c39d89
Merge branch 'inventory-plugin' of github.com:dgieselaar/kibana into …
dgieselaar 70b0742
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine ae4e035
Resolve merge conflict correctly
dgieselaar 0b94e16
Fix tests
dgieselaar 0238a8c
Fix type issues in routes
dgieselaar 87b8924
Allow primitives as return types
dgieselaar 4670089
Merge branch 'main' of github.com:elastic/kibana into inventory-plugin
dgieselaar 6370430
Allow any as a value
dgieselaar a039dae
Update README.md
dgieselaar 62e3ed0
[CI] Auto-commit changed files from 'node scripts/lint_packages --fix'
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -362,7 +362,7 @@ packages/deeplinks/devtools @elastic/kibana-management | |||||
packages/deeplinks/fleet @elastic/fleet | ||||||
packages/deeplinks/management @elastic/kibana-management | ||||||
packages/deeplinks/ml @elastic/ml-ui | ||||||
packages/deeplinks/observability @elastic/obs-ux-logs-team | ||||||
packages/deeplinks/observability @elastic/obs-ux-management | ||||||
packages/deeplinks/search @elastic/search-kibana | ||||||
packages/deeplinks/security @elastic/security-solution | ||||||
packages/deeplinks/shared @elastic/appex-sharedux | ||||||
|
@@ -522,6 +522,7 @@ x-pack/plugins/integration_assistant @elastic/security-scalability | |||||
src/plugins/interactive_setup @elastic/kibana-security | ||||||
test/interactive_setup_api_integration/plugins/test_endpoints @elastic/kibana-security | ||||||
packages/kbn-interpreter @elastic/kibana-visualizations | ||||||
x-pack/plugins/observability_solution/inventory @elastic/obs-ai-assistant | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cheers, will update this in the kibana.jsonc file |
||||||
x-pack/plugins/observability_solution/investigate_app @elastic/obs-ux-management-team | ||||||
x-pack/plugins/observability_solution/investigate @elastic/obs-ux-management-team | ||||||
packages/kbn-investigation-shared @elastic/obs-ux-management-team | ||||||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"type": "shared-common", | ||
"id": "@kbn/deeplinks-observability", | ||
"owner": "@elastic/obs-ux-logs-team" | ||
"owner": "@elastic/obs-ux-management-team" | ||
} |
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
35 changes: 35 additions & 0 deletions
35
packages/kbn-server-route-repository/src/observable_into_event_source_stream.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,35 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { map, Observable } from 'rxjs'; | ||
import { PassThrough } from 'stream'; | ||
|
||
export function observableIntoEventSourceStream(source$: Observable<unknown>): PassThrough { | ||
const withSerializedErrors$ = source$.pipe( | ||
map((event) => { | ||
return `data: ${JSON.stringify(event)}\n\n`; | ||
}) | ||
); | ||
|
||
const stream = new PassThrough(); | ||
|
||
withSerializedErrors$.subscribe({ | ||
next: (line) => { | ||
stream.write(line); | ||
}, | ||
complete: () => { | ||
stream.end(); | ||
}, | ||
error: (error) => { | ||
stream.write(`data: ${JSON.stringify(error)}\n\n`); | ||
stream.end(); | ||
}, | ||
}); | ||
|
||
return stream; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* 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 { take } from 'lodash'; | ||
|
||
export function truncateList<T>(values: T[], limit: number): Array<T | string> { | ||
if (values.length <= limit) { | ||
return values; | ||
} | ||
|
||
return [...take(values, limit), `${values.length - limit} more values`]; | ||
} |
28 changes: 28 additions & 0 deletions
28
x-pack/plugins/observability_solution/entity_manager/server/lib/client/index.ts
miltonhultgren marked this conversation as resolved.
Show resolved
Hide resolved
|
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,28 @@ | ||
/* | ||
* 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 type { IScopedClusterClient, SavedObjectsClientContract } from '@kbn/core/server'; | ||
import { findEntityDefinitions } from '../entities/find_entity_definition'; | ||
import type { EntityDefinitionWithState } from '../entities/types'; | ||
|
||
export class EntityManagerClient { | ||
constructor( | ||
private readonly esClient: IScopedClusterClient, | ||
private readonly soClient: SavedObjectsClientContract | ||
) {} | ||
|
||
findEntityDefinitions({ page, perPage }: { page?: number; perPage?: number } = {}): Promise< | ||
EntityDefinitionWithState[] | ||
> { | ||
return findEntityDefinitions({ | ||
esClient: this.esClient.asCurrentUser, | ||
soClient: this.soClient, | ||
page, | ||
perPage, | ||
}); | ||
} | ||
} |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!