-
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
[SecuritySolution] Entity Engine status tab #201235
Merged
+1,663
−516
Merged
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
ecffe68
wip
machadoum 1845efb
Delete entity store stats API
machadoum 6d6ce5a
Self-code review 1/10
machadoum ae45c47
Delete EntityStoreResource const in favout of OpenAPi enum
machadoum 974494a
Add unit tests
machadoum 082721c
Add error message to UI and improve unit
machadoum 41edd60
[CI] Auto-commit changed files from 'yarn openapi:bundle'
kibanamachine 71996b1
[CI] Auto-commit changed files from 'make api-docs'
kibanamachine 676a888
[CI] Auto-commit changed files from 'yarn openapi:generate'
kibanamachine 54ee5d2
Update i18n
machadoum be4d9fa
Remove unucessary change
machadoum 5af6bb0
Merge remote-tracking branch 'kibana/main' into siem-ea-10989
machadoum e007277
Please code review
machadoum bdb9a09
Fix conflict issues
machadoum 5d5386f
Rename API flag to include_components
machadoum de9e7cd
[CI] Auto-commit changed files from 'yarn openapi:bundle'
kibanamachine 93ee4e2
[CI] Auto-commit changed files from 'make api-docs'
kibanamachine de00917
Fix CI
machadoum 1196c6d
Fix UI issues
machadoum ce320e1
Fix unit test
machadoum 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
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
39 changes: 0 additions & 39 deletions
39
...ck/plugins/security_solution/common/api/entity_analytics/entity_store/engine/stats.gen.ts
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
...ugins/security_solution/common/api/entity_analytics/entity_store/engine/stats.schema.yaml
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
x-pack/plugins/security_solution/common/api/entity_analytics/entity_store/status.gen.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,43 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
/* | ||
* NOTICE: Do not edit this file manually. | ||
* This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. | ||
* | ||
* info: | ||
* title: Enable Entity Store | ||
* version: 2023-10-31 | ||
*/ | ||
|
||
import { z } from '@kbn/zod'; | ||
import { BooleanFromString } from '@kbn/zod-helpers'; | ||
|
||
import { StoreStatus, EngineDescriptor, EngineComponentStatus } from './common.gen'; | ||
|
||
export type GetEntityStoreStatusRequestQuery = z.infer<typeof GetEntityStoreStatusRequestQuery>; | ||
export const GetEntityStoreStatusRequestQuery = z.object({ | ||
/** | ||
* If true returns a detailed status of the engine including all it's components | ||
*/ | ||
withComponents: BooleanFromString.optional(), | ||
}); | ||
export type GetEntityStoreStatusRequestQueryInput = z.input< | ||
typeof GetEntityStoreStatusRequestQuery | ||
>; | ||
|
||
export type GetEntityStoreStatusResponse = z.infer<typeof GetEntityStoreStatusResponse>; | ||
export const GetEntityStoreStatusResponse = z.object({ | ||
status: StoreStatus, | ||
engines: z.array( | ||
EngineDescriptor.merge( | ||
z.object({ | ||
components: z.array(EngineComponentStatus).optional(), | ||
}) | ||
) | ||
), | ||
}); |
44 changes: 44 additions & 0 deletions
44
x-pack/plugins/security_solution/common/api/entity_analytics/entity_store/status.schema.yaml
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,44 @@ | ||
openapi: 3.0.0 | ||
|
||
info: | ||
title: Enable Entity Store | ||
version: '2023-10-31' | ||
paths: | ||
/api/entity_store/status: | ||
get: | ||
x-labels: [ess, serverless] | ||
x-codegen-enabled: true | ||
operationId: GetEntityStoreStatus | ||
summary: Get the status of the Entity Store | ||
|
||
parameters: | ||
- name: withComponents | ||
in: query | ||
schema: | ||
type: boolean | ||
description: If true returns a detailed status of the engine including all it's components | ||
|
||
responses: | ||
'200': | ||
description: Successful response | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- status | ||
- engines | ||
properties: | ||
status: | ||
$ref: './common.schema.yaml#/components/schemas/StoreStatus' | ||
engines: | ||
type: array | ||
items: | ||
allOf: | ||
- $ref: './common.schema.yaml#/components/schemas/EngineDescriptor' | ||
- type: object | ||
properties: | ||
components: | ||
type: array | ||
items: | ||
$ref: './common.schema.yaml#/components/schemas/EngineComponentStatus' |
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.
too many things called status 😅
Each engine has a status field, then my upcoming PR also has a whole store Status thing. Now this one 🤔
Can we come up with some different nomenclature? I'm thinking just
Health
for this?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.
Hmm 🤔
This is supposed to be a component-by-component breakdown of the Entity Descriptor status. Inside the components, there is already a
health
property, which is currently only used by the transform.The status API also returns it, so I am struggling to find a better name. 😓