-
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
[Inventory] Inventory plugin #191798
Changes from 10 commits
eb7569e
570f78d
f5727e8
88cefe5
e53b3b3
fe471af
bc0b98c
f49bdac
4336608
e4bb64d
a709bec
cad3bb3
745b9da
ab9f8f9
296ed2a
8dddf03
21003d7
b46a785
b2fe459
171a8df
2f22a5d
d73d1e5
a4e7b65
cd20fc0
a61864e
2c39d89
70b0742
ae4e035
0b94e16
0238a8c
87b8924
4670089
6370430
a039dae
62e3ed0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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-team | ||
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 | ||
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 | ||
|
@@ -876,6 +877,9 @@ packages/kbn-sort-predicates @elastic/kibana-visualizations | |
x-pack/plugins/spaces @elastic/kibana-security | ||
x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin @elastic/kibana-security | ||
packages/kbn-spec-to-console @elastic/kibana-management | ||
packages/kbn-sse-utils @elastic/knowledge-team | ||
packages/kbn-sse-utils-client @elastic/knowledge-team | ||
packages/kbn-sse-utils-server @elastic/knowledge-team | ||
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. The team is not valid. Did you mean 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, my bad! 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. Are we sure that the Knowledge team should be the owner though? 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. I don't think that is practical tbh in this case. I've assigned the same CODEOWNER as @kbn/server-route-repository in this case. 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. Yeah, which was also in the list of packages that maybe should be owned by Obs UI, but I'm not sure if action is being taken on that idea. cc @jasonrhodes 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. I'd love to get route repository owned by the overall UI team to keep it unblocked, but I don't have an opinion on this code, especially while it's in an early exploratory phase. |
||
x-pack/plugins/stack_alerts @elastic/response-ops | ||
x-pack/plugins/stack_connectors @elastic/response-ops | ||
x-pack/test/usage_collection/plugins/stack_management_usage_test @elastic/kibana-management | ||
|
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" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* 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 { createParser } from 'eventsource-parser'; | ||
import { Observable, throwError } from 'rxjs'; | ||
|
||
export interface StreamedHttpResponse { | ||
response?: { body: ReadableStream<Uint8Array> | null | undefined }; | ||
} | ||
|
||
class NoReadableStreamError extends Error { | ||
constructor() { | ||
super(`No readable stream found in response`); | ||
} | ||
} | ||
|
||
export function isNoReadableStreamError(error: any): error is NoReadableStreamError { | ||
return error instanceof NoReadableStreamError; | ||
} | ||
|
||
export function createObservableFromHttpResponse( | ||
response: StreamedHttpResponse | ||
): Observable<string> { | ||
const rawResponse = response.response; | ||
|
||
const body = rawResponse?.body; | ||
if (!body) { | ||
return throwError(() => { | ||
throw new NoReadableStreamError(); | ||
}); | ||
} | ||
|
||
return new Observable<string>((subscriber) => { | ||
const parser = createParser((event) => { | ||
if (event.type === 'event') { | ||
subscriber.next(event.data); | ||
} | ||
}); | ||
|
||
const readStream = async () => { | ||
const reader = body.getReader(); | ||
const decoder = new TextDecoder(); | ||
|
||
// Function to process each chunk | ||
const processChunk = ({ | ||
done, | ||
value, | ||
}: ReadableStreamReadResult<Uint8Array>): Promise<void> => { | ||
if (done) { | ||
return Promise.resolve(); | ||
} | ||
|
||
parser.feed(decoder.decode(value, { stream: true })); | ||
|
||
return reader.read().then(processChunk); | ||
}; | ||
|
||
// Start reading the stream | ||
return reader.read().then(processChunk); | ||
}; | ||
|
||
readStream() | ||
.then(() => { | ||
subscriber.complete(); | ||
}) | ||
.catch((error) => { | ||
subscriber.error(error); | ||
}); | ||
}); | ||
} |
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.
cheers, will update this in the kibana.jsonc file