-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[UII] Support integration-level outputs #189125
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
Changes from all commits
f4c1aa7
04821c3
d11b8d8
06aba09
3cf6b71
4358b9b
7739f10
a5fbc22
bb776fa
9ce8a8c
ccc4702
93bf7e5
d071843
9e2b219
5d15a12
cca9d2f
e964831
1a43c5c
8c1f570
fc4ff97
b760c92
2be5ddd
f97e138
5be583a
700e0b9
a52ed50
d0154c3
eef7592
7953757
7ca5a4f
1cbc17d
12023f0
9019534
43f2eea
7d092ba
f59c5ca
bd713b7
476971f
e2e7a99
560b078
0b0dfa6
0802091
617c3d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -629,6 +629,7 @@ | |
| "is_managed", | ||
| "name", | ||
| "namespace", | ||
| "output_id", | ||
| "overrides", | ||
| "package", | ||
| "package.name", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4804,7 +4804,6 @@ components: | |
| type: string | ||
| output_id: | ||
| type: string | ||
| deprecated: true | ||
| inputs: | ||
| type: array | ||
| items: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,6 @@ properties: | |
| type: string | ||
| output_id: | ||
| type: string | ||
| deprecated: true | ||
| inputs: | ||
| type: array | ||
| items: | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ import { | |
| EuiLink, | ||
| EuiCallOut, | ||
| EuiSpacer, | ||
| EuiSelect, | ||
| } from '@elastic/eui'; | ||
|
|
||
| import styled from 'styled-components'; | ||
|
|
@@ -32,6 +33,7 @@ import { isAdvancedVar } from '../../services'; | |
| import type { PackagePolicyValidationResults } from '../../services'; | ||
|
|
||
| import { PackagePolicyInputVarField } from './components'; | ||
| import { useOutputs } from './components/hooks'; | ||
|
|
||
| // on smaller screens, fields should be displayed in one column | ||
| const FormGroupResponsiveFields = styled(EuiDescribedFormGroup)` | ||
|
|
@@ -81,6 +83,14 @@ export const StepDefinePackagePolicy: React.FunctionComponent<{ | |
| }); | ||
| } | ||
|
|
||
| // Outputs | ||
| const { | ||
| isLoading: isOutputsLoading, | ||
| canUseOutputPerIntegration, | ||
| allowedOutputs, | ||
| } = useOutputs(packageInfo.name); | ||
|
|
||
| // Managed policy | ||
| const isManaged = packagePolicy.is_managed; | ||
|
|
||
| return validationResults ? ( | ||
|
|
@@ -245,6 +255,7 @@ export const StepDefinePackagePolicy: React.FunctionComponent<{ | |
| {isShowingAdvanced ? ( | ||
| <EuiFlexItem> | ||
| <EuiFlexGroup direction="column" gutterSize="m"> | ||
| {/* Namespace */} | ||
| <EuiFlexItem> | ||
| <EuiFormRow | ||
| isInvalid={!!validationResults.namespace} | ||
|
|
@@ -264,7 +275,7 @@ export const StepDefinePackagePolicy: React.FunctionComponent<{ | |
| ) : ( | ||
| <FormattedMessage | ||
| id="xpack.fleet.createPackagePolicy.stepConfigure.packagePolicyNamespaceHelpLabel" | ||
| defaultMessage="Change the default namespace inherited from the selected Agent policy. This setting changes the name of the integration's data stream. {learnMore}." | ||
| defaultMessage="Change the default namespace inherited from the parent agent policy. This setting changes the name of the integration's data stream. {learnMore}." | ||
| values={{ | ||
| learnMore: ( | ||
| <EuiLink | ||
|
|
@@ -304,6 +315,49 @@ export const StepDefinePackagePolicy: React.FunctionComponent<{ | |
| /> | ||
| </EuiFormRow> | ||
| </EuiFlexItem> | ||
|
|
||
| {/* Output */} | ||
| {canUseOutputPerIntegration && ( | ||
| <EuiFlexItem> | ||
| <EuiFormRow | ||
| label={ | ||
| <FormattedMessage | ||
| id="xpack.fleet.createPackagePolicy.stepConfigure.packagePolicyOutputInputLabel" | ||
| defaultMessage="Output" | ||
| /> | ||
| } | ||
| helpText={ | ||
| <FormattedMessage | ||
| id="xpack.fleet.createPackagePolicy.stepConfigure.packagePolicyOutputHelpLabel" | ||
| defaultMessage="Change the default output inherited from the parent agent policy. This setting changes where the integration's data is sent." | ||
| /> | ||
| } | ||
| > | ||
| <EuiSelect | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can address this in a follow up PR |
||
| data-test-subj="packagePolicyOutputInput" | ||
| isLoading={isOutputsLoading} | ||
| options={[ | ||
| { | ||
| value: '', | ||
| text: '', | ||
| }, | ||
| ...allowedOutputs.map((output) => ({ | ||
| value: output.id, | ||
| text: output.name, | ||
| })), | ||
| ]} | ||
| value={packagePolicy.output_id || ''} | ||
| onChange={(e) => { | ||
| updatePackagePolicy({ | ||
| output_id: e.target.value.trim() || null, | ||
| }); | ||
| }} | ||
| /> | ||
| </EuiFormRow> | ||
| </EuiFlexItem> | ||
| )} | ||
|
|
||
| {/* Data retention settings info */} | ||
| <EuiFlexItem> | ||
| <EuiFormRow | ||
| label={ | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.