-
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
[Telemetry] Add method to enable endpoint security data usage example #80940
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems much more simple than what we initially discussed. Great approach!
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.
🌔 🚀 ✨ LGTM ✨ 🚀 🌔
Can this not go out in |
@pjhampton whoops. fixed |
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.
code review only,
LGTM
@@ -29,6 +29,7 @@ describe('TelemetryManagementSectionComponent', () => { | |||
|
|||
it('renders as expected', () => { | |||
const onQueryMatchChange = jest.fn(); | |||
const isSecurityExampleEnabled = jest.fn().mockReturnValue(true); |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed pluralization of 'example', I think? "See an example of...." or "See examples of...." ?
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.
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
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.
Fixed. thanks!
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.
Looks good, really just the minor pluralization thing in telemetry_management_section.tsx
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.
Desk tested this with securitySolution both enabled and disabled. LGTM 👍
…point_security_example_setup_method
public setup( | ||
core: CoreSetup, | ||
{ advancedSettings, telemetry: { telemetryService } }: TelemetryManagementSectionPluginDepsSetup | ||
) { | ||
advancedSettings.component.register( | ||
advancedSettings.component.componentType.PAGE_FOOTER_COMPONENT, | ||
telemetryManagementSectionWrapper(telemetryService), | ||
telemetryManagementSectionWrapper(telemetryService, this.shouldShowSecuritySolutionExample), |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Out
Stack Trace
Metrics [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