Skip to content
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

141187 browser fields type #141600

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from
Draft

Conversation

jcger
Copy link
Contributor

@jcger jcger commented Sep 23, 2022

Summary

Closes #141187
Blocked by #141385 Merged

What this PR does:

  • This PR creates another, more specific, BrowserFields type that matches with the object used by the Field Browser component. (you can find the current BrowserFields definition here )
  • As the BrowserField type is being used in multiple places in throughout multiple plugins a mapper function that converts from the old BrowserField type to the new BrowserField type.
  • Every where we make use of the Field Browser component we convert from the old type to the new one, for example here

To discuss:

  • We think that the right way would be to only have type of Browser Field so we would like to discuss about which one would be the better fit and in case we decide to move towards the new definition, what the next steps would be.

QA - The fields browser feature in the alerts table should be working as before. You'll find this feature in Security Solution >> Alerts and in Observability >> Overview

Screenshot 2022-09-13 at 14 46 21

Screenshot 2022-09-27 at 13 05 39

Screenshot 2022-09-27 at 13 05 25

@@ -17,10 +17,6 @@ import { BrowserFields } from '@kbn/rule-registry-plugin/common';

describe('helpers', () => {
describe('categoryHasFields', () => {
test('it returns false if the category fields property is undefined', () => {
expect(categoryHasFields({})).toBe(false);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by definition a category will have to have the fields prop

@kibana-ci
Copy link
Collaborator

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Security Solution Tests #3 / Timelines Creates a timeline by clicking untitled timeline from bottom bar can be added notes

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
triggersActionsUi 484 485 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
ruleRegistry 213 204 -9
timelines 214 198 -16
triggersActionsUi 551 553 +2
total -23

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
triggersActionsUi 11 10 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 12.7MB 12.7MB +260.0B
threatIntelligence 49.7KB 49.8KB +89.0B
triggersActionsUi 699.7KB 684.6KB -15.1KB
total -14.7KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
triggersActionsUi 53 54 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff errors
threatIntelligence 31.3KB 31.4KB +147.0B
triggersActionsUi 114.5KB 129.4KB +15.0KB ❌ 13.2KB over limit
total +15.1KB
Unknown metric groups

API count

id before after diff
ruleRegistry 241 232 -9
timelines 257 241 -16
triggersActionsUi 580 582 +2
total -23

async chunk count

id before after diff
triggersActionsUi 54 53 -1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RAM] Field Browser type
4 participants