-
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
[Osquery] Refactor ECS editor field #130582
[Osquery] Refactor ECS editor field #130582
Conversation
b0c0cd3
to
58a180d
Compare
Pinging @elastic/security-asset-management (Team:Asset Management) |
@elasticmachine merge upstream |
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.
A lot of changes, but seems solid, thanks! previous ECS code was confusing for me
grouper.setTotalAgents(totalNumAgents); | ||
grouper.updateGroup(AGENT_GROUP_KEY.Platform, groups.platforms); | ||
grouper.updateGroup(AGENT_GROUP_KEY.Policy, groups.policies); | ||
grouper.setTotalAgents(agentGroupsData?.totalCount); |
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.
Are you sure that we need optional chaining? There is a check for agentGroupsData in line 154
import { SavedQueriesDropdown } from '../../saved_queries/saved_queries_dropdown'; | ||
|
||
const FORM_ID = 'liveQueryForm'; | ||
|
||
const StyledEuiAccordion = styled(EuiAccordion)` | ||
${({ isDisabled }: { isDisabled: boolean }) => isDisabled && 'display: none;'} | ||
${({ isDisabled }: { isDisabled?: boolean }) => isDisabled && 'display: none;'} |
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.
what would you say about typing isDisabled as 'isDisabled?: true' ? Since it may not exist, the value we want is true, never false.
x-pack/plugins/osquery/public/saved_queries/form/use_saved_query_form.tsx
Show resolved
Hide resolved
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.
Infra change looks good to me 👍🏼
…refactor # Conflicts: # x-pack/plugins/osquery/cypress/integration/all/live_query.spec.ts # x-pack/plugins/osquery/cypress/tasks/live_query.ts # x-pack/plugins/osquery/public/live_queries/form/index.tsx # x-pack/plugins/osquery/public/live_queries/index.tsx # x-pack/plugins/osquery/public/results/results_table.tsx # x-pack/plugins/osquery/public/routes/saved_queries/edit/tabs.tsx # x-pack/plugins/osquery/public/saved_queries/saved_query_flyout.tsx # x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx
💛 Build succeeded, but was flakyMetrics [docs]Module Count
Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Refactored ECS editor field to leverage updated
UseArray
field andform.updateFieldValues()
from:This PR is also removing steps from the Live Query form