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

[Fleet] show dataset combo box for input packages #147015

Merged
merged 7 commits into from
Dec 6, 2022

Conversation

juliaElastic
Copy link
Contributor

@juliaElastic juliaElastic commented Dec 5, 2022

Summary

Closes #145903

Added datasets combo box to input type packages Dataset name variable with the option of creating a new one.

Using the existing /data_streams API to show the list of all datasets.

Package policy create/edit API already supports setting the value of data_stream.dataset (input packages should have this variable as described in #133296)

To verify:

  • Start local EPR with input type packages as described here
  • Add Custom Logs integration
  • Verify that Dataset name displays a dropdown and the selected value is persisted.
  • Verify that a new value can be entered in Dataset name
  • Verify that Edit integration policy displays the existing value and allows selecting/creating another one.

image

image

image

Added ordering of datasets to move up those that start with the package name e.g. system* datasets come first if adding a system integration. Other than that ordering datasets alphabetically.

image

The rest of the requirements seem to be already implemented, see comments

Checklist

@juliaElastic juliaElastic added release_note:feature Makes this part of the condensed release notes v8.7.0 labels Dec 5, 2022
@juliaElastic juliaElastic self-assigned this Dec 5, 2022
@juliaElastic juliaElastic requested a review from a team as a code owner December 5, 2022 15:44
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Dec 5, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

id="xpack.fleet.createPackagePolicy.stepConfigure.inputVarFieldOptionalLabel"
defaultMessage="Optional"
if (name === 'data_stream.dataset' && packageType === 'input') {
return <DatasetComboBox datasets={datasets} value={value} onChange={onChange} />;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the only real change here, look without whitespace

@juliaElastic juliaElastic changed the title show dataset combo box for input packages [WIP] show dataset combo box for input packages Dec 5, 2022
@juliaElastic juliaElastic changed the title [WIP] show dataset combo box for input packages show dataset combo box for input packages Dec 6, 2022
@nchaulet nchaulet self-requested a review December 6, 2022 13:31
},
]);

if (!value) onChange(defaultOption);
Copy link
Member

Choose a reason for hiding this comment

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

Should we wrap this an useEffect?

@nchaulet
Copy link
Member

nchaulet commented Dec 6, 2022

Should we not allow user to clear dataset? EuiCombobox accept isClearable=false to remove that clear button

Screen Shot 2022-12-06 at 8 58 32 AM

@kpollich kpollich changed the title show dataset combo box for input packages [Fleet] show dataset combo box for input packages Dec 6, 2022
Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@juliaElastic juliaElastic enabled auto-merge (squash) December 6, 2022 16:27
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 752 754 +2

Async chunks

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

id before after diff
fleet 891.2KB 892.5KB +1.3KB
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 109 115 +6
securitySolution 443 449 +6
total +20

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 68 74 +6
osquery 110 117 +7
securitySolution 520 526 +6
total +21

History

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

cc @juliaElastic

@juliaElastic juliaElastic merged commit 286aaa1 into elastic:main Dec 6, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:feature Makes this part of the condensed release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Allow configuration of dataset value for Input packages
5 participants