[Telemetry] Add method to enable endpoint security data usage example#80940
Conversation
| initTelemetry( | ||
| { | ||
| usageCollection: plugins.usageCollection, | ||
| telemetryManagementSection: plugins.telemetryManagementSection, |
There was a problem hiding this comment.
This seems much more simple than what we initially discussed. Great approach!
|
Can this not go out in |
|
@pjhampton whoops. fixed |
TinaHeiligers
left a comment
There was a problem hiding this comment.
code review only,
LGTM
|
|
||
| it('renders as expected', () => { | ||
| const onQueryMatchChange = jest.fn(); | ||
| const isSecurityExampleEnabled = jest.fn().mockReturnValue(true); |
There was a problem hiding this comment.
Just a nit, but might be more DRY to just set these (isSecurityExampleEnabled && onQueryMatchChange) in a beforeEach at the top of the relevant describe blocks since they don't seem to change for any of the tests
There was a problem hiding this comment.
I usually prefer to keep them like that in the tests to make it easier to read what is happening. each it has almost all it needs encapsulated inside it, so you can update/refactor the tests more easily if needed in the future.
| ) : ( | ||
| <FormattedMessage | ||
| id="telemetry.seeExampleOfClusterData" | ||
| defaultMessage="See example of the {clusterData} that we collect." |
There was a problem hiding this comment.
Missed pluralization of 'example', I think? "See an example of...." or "See examples of...." ?
There was a problem hiding this comment.
Its just 1 example of the clusterData. examples in the case we have 2 examples 1 for clusterData and the other for security solutions. I might be wrong but that was my reasning behind it
michaelolo24
left a comment
There was a problem hiding this comment.
Looks good, really just the minor pluralization thing in telemetry_management_section.tsx
rylnd
left a comment
There was a problem hiding this comment.
Desk tested this with securitySolution both enabled and disabled. LGTM 👍
…point_security_example_setup_method
| advancedSettings.component.register( | ||
| advancedSettings.component.componentType.PAGE_FOOTER_COMPONENT, | ||
| telemetryManagementSectionWrapper(telemetryService), | ||
| telemetryManagementSectionWrapper(telemetryService, this.shouldShowSecuritySolutionExample), |
There was a problem hiding this comment.
I am wondering if you really need to pass a function here, I feel like you can just pass this.showSecuritySolutionExample
There was a problem hiding this comment.
Since booleans are copied and not passed by reference; we need a function to get the latest value of the variable. Passing it as a value directly might cause unexpected bugs especially since most kibana does not referesh between pages now.
…point_security_example_setup_method
…point_security_example_setup_method
💛 Build succeeded, but was flaky
Test FailuresX-Pack APM API integration tests (basic).x-pack/test/apm_api_integration/basic/tests/correlations/slow_durations·ts.APM specs (basic) Correlations Slow durations with different scoring returns buckets for each scoreStandard OutStack TraceMetrics [docs]page load bundle size
History
To update your PR or re-run it, just comment with: |
…elastic#80940) # Conflicts: # x-pack/plugins/security_solution/public/plugin.tsx
* master: (64 commits) Rename Security Solution Bug Template (elastic#81187) Update links (elastic#81125) Specify format for date range query (elastic#81025) [Alerting] Improve toast when alert is created (elastic#80327) [UX] Add empty states (elastic#80904) Add TS config for kibana_legacy (elastic#80992) [Telemetry] Add method to enable endpoint security data usage example (elastic#80940) [Alerting] Add scoped cluster client to alerts and actions services (elastic#80794) Fix reactRouterNavigate when used with a string (elastic#80520) [Security Solution] [Detections] Read privileges for dependencies (elastic#80852) [ML] Fixing exclude frequent in advanced wizard (elastic#81121) Fix security solution template label (elastic#80976) [DOCS] Update index management docs (elastic#80893) [APM] Error rate on service list page is not in sync with the value at the transaction page (elastic#80814) skip flaky suite (elastic#81072) [Task Manager] Cleans up legacy plugin structure (elastic#80381) Support unsigned_long fields (elastic#81115) [Form lib] Export internal state instead of raw state (elastic#80842) [Lens] Add toast notification when visualization is saved (elastic#80788) Index pattern edit field formatter API (elastic#78352) ...
Closes #79859