-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Fleet] Add integration knowledge opt out UI setting and enable feature flag #245080
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
Merged
juliaElastic
merged 63 commits into
elastic:main
from
juliaElastic:integration-knowledge-ff
Dec 12, 2025
Merged
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
2751c19
Add integration knowledge opt out UI setting and enable feature flag
juliaElastic ff61180
Changes from node scripts/capture_oas_snapshot --include-path /api/…
kibanamachine 1fc7ff2
Changes from node scripts/check_mappings_update --fix
kibanamachine 5501cdb
skip reindex for packages not installed from registry
juliaElastic f8d63b6
Changes from make api-docs
kibanamachine 746029b
Changes from node scripts/jest_integration -u src/core/server/integra…
kibanamachine 0c3da93
reinstall package for bundled packages and skip for non-registry pack…
juliaElastic 7b56735
handle bundled packages
juliaElastic 530c600
skip reindex if knowledge base exists on installed version
juliaElastic a3011e7
fix tests
juliaElastic 6aa3047
fix tests
juliaElastic 757c46a
Merge branch 'main' into integration-knowledge-ff
juliaElastic a4f5161
Merge branch 'main' into integration-knowledge-ff
juliaElastic 32e2352
add tests
juliaElastic d0c5b69
add tests
juliaElastic 78ab0b9
disable action if license is not enterprise
juliaElastic 8161818
Update x-pack/platform/plugins/shared/fleet/public/applications/integ…
juliaElastic 5c9dc6e
Update x-pack/platform/plugins/shared/fleet/public/applications/integ…
juliaElastic afd59db
Update x-pack/platform/plugins/shared/fleet/public/applications/integ…
juliaElastic c9e1dca
Update x-pack/platform/plugins/shared/fleet/public/applications/integ…
juliaElastic 3177132
Update x-pack/platform/plugins/shared/fleet/public/applications/integ…
juliaElastic 1142a67
Merge branch 'main' into integration-knowledge-ff
juliaElastic 18dc14e
fix test
juliaElastic cb24e7c
review comments
juliaElastic 811f7ff
use abortController
juliaElastic e8e902d
Merge branch 'main' into integration-knowledge-ff
juliaElastic 3570795
pass abortController to use with esClient
juliaElastic 9595cde
fix tests
juliaElastic 5fd7133
fix test
juliaElastic f5ef80e
added tour and learn more link
juliaElastic 5041599
Fix i18n
juliaElastic 41f608a
Merge branch 'main' into integration-knowledge-ff
juliaElastic 3358168
Merge branch 'main' into integration-knowledge-ff
juliaElastic f1506ea
fix conflict
juliaElastic 0dd1abb
Changes from node scripts/jest_integration -u src/core/server/integra…
kibanamachine e9c347e
catch parse error
juliaElastic ccf38ac
fix checks
juliaElastic ab7ecd4
disable feature flag in test
juliaElastic e4ff368
replace newline
juliaElastic fcbfeb8
remove newlines and fix test
juliaElastic ba23179
fix test
juliaElastic 6b6e18c
fix tests
juliaElastic 530ba40
fix tests
juliaElastic 34e5e68
fix checks
juliaElastic 7729b4f
fix test
juliaElastic 068fcc6
Merge branch 'main' into integration-knowledge-ff
juliaElastic 249fecb
fix tests
juliaElastic aa1658f
address review comments
juliaElastic ca58b14
updated flyout copy
juliaElastic 80cf405
fix tests
juliaElastic fab37c5
fix test
juliaElastic 519c3ed
update ai assistant test
juliaElastic 222b3de
disable feature flag in ai assistant tests
juliaElastic 2320eca
add retry to test
juliaElastic 00e8077
fix test
juliaElastic 99841c5
Update x-pack/platform/plugins/shared/fleet/public/applications/integ…
juliaElastic fb01003
disable feature flag in ML test
juliaElastic ac2fb68
disable feature flag in ML test
juliaElastic 73af7d4
revert test changes
juliaElastic 053e0d3
revert change
juliaElastic 61cc206
move feature flag from base config
juliaElastic 6ce1e64
move ai assistant serverless test to feature flag config
juliaElastic 72f051b
fix checks
juliaElastic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,19 +20,17 @@ import { useInstalledIntegrationsActions } from '../hooks/use_installed_integrat | |
| import { ExperimentalFeaturesService } from '../../../../../services'; | ||
| import { useLicense } from '../../../../../hooks'; | ||
|
|
||
| import { IntegrationKnowledgeFlyout } from './integration_knowledge_flyout'; | ||
|
|
||
| export const InstalledIntegrationsActionMenu: React.FunctionComponent<{ | ||
| selectedItems: InstalledPackageUIPackageListItem[]; | ||
| }> = ({ selectedItems }) => { | ||
| const [isOpen, setIsOpen] = useState(false); | ||
| const [showIntegrationKnowledgeFlyout, setShowIntegrationKnowledgeFlyout] = useState(false); | ||
| const { enablePackageRollback } = ExperimentalFeaturesService.get(); | ||
| const licenseService = useLicense(); | ||
| const button = ( | ||
| <EuiButton | ||
| iconType="arrowDown" | ||
| disabled={selectedItems.length === 0} | ||
| iconSide="right" | ||
| onClick={() => setIsOpen((s) => !s)} | ||
| > | ||
| <EuiButton iconType="arrowDown" iconSide="right" onClick={() => setIsOpen((s) => !s)}> | ||
| <FormattedMessage | ||
| id="xpack.fleet.epmInstalledIntegrations.actionButton" | ||
| defaultMessage="Actions" | ||
|
|
@@ -63,6 +61,11 @@ export const InstalledIntegrationsActionMenu: React.FunctionComponent<{ | |
| return bulkRollbackIntegrationsWithConfirmModal(selectedItems); | ||
| }, [selectedItems, bulkRollbackIntegrationsWithConfirmModal]); | ||
|
|
||
| const openManageIntegrationKnowledgeFlyout = useCallback(() => { | ||
| setIsOpen(false); | ||
| setShowIntegrationKnowledgeFlyout(true); | ||
| }, []); | ||
|
|
||
| const items = useMemo(() => { | ||
| const hasUpgreadableIntegrations = selectedItems.some( | ||
| (item) => | ||
|
|
@@ -80,97 +83,124 @@ export const InstalledIntegrationsActionMenu: React.FunctionComponent<{ | |
| !!item.installationInfo?.previous_version && !item.installationInfo?.is_rollback_ttl_expired | ||
| ); | ||
|
|
||
| return [ | ||
| const menuItems = [ | ||
| <EuiContextMenuItem | ||
| key="upgrade" | ||
| icon="refresh" | ||
| disabled={!hasUpgreadableIntegrations} | ||
| onClick={openUpgradeModal} | ||
| key="integrationKnowledge" | ||
| icon="gear" | ||
| onClick={openManageIntegrationKnowledgeFlyout} | ||
| > | ||
| <FormattedMessage | ||
| id="xpack.fleet.epmInstalledIntegrations.bulkUpgradeButton" | ||
| defaultMessage={'Upgrade {count, plural, one {# integration} other {# integrations}}'} | ||
| values={{ | ||
| count: selectedItems.length, | ||
| }} | ||
| id="xpack.fleet.epmInstalledIntegrations.manageIntegrationKnowledgeButton" | ||
| defaultMessage={'Manage integration knowledge'} | ||
| /> | ||
| </EuiContextMenuItem>, | ||
| <EuiContextMenuItem | ||
| key="uninstall" | ||
| icon="trash" | ||
| disabled={hasUninstallableIntegrations} | ||
| onClick={openUninstallModal} | ||
| > | ||
| {hasUninstallableIntegrations ? ( | ||
| <EuiToolTip | ||
| position="right" | ||
| content={ | ||
| <FormattedMessage | ||
| id="xpack.fleet.epmInstalledIntegrations.uninstallDisabledTooltip" | ||
| defaultMessage="Can't uninstall integrations that are attached to agent policies" | ||
| /> | ||
| } | ||
| ]; | ||
|
|
||
| if (selectedItems.length > 0) { | ||
|
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. Previously the Actions button was disabled if there were no integrations selected. |
||
| menuItems.push( | ||
| ...[ | ||
| <EuiContextMenuItem | ||
| key="upgrade" | ||
| icon="refresh" | ||
| disabled={!hasUpgreadableIntegrations} | ||
| onClick={openUpgradeModal} | ||
| > | ||
| <FormattedMessage | ||
| id="xpack.fleet.epmInstalledIntegrations.bulkUninstallButton" | ||
| defaultMessage={ | ||
| 'Uninstall {count, plural, one {# integration} other {# integrations}}' | ||
| } | ||
| id="xpack.fleet.epmInstalledIntegrations.bulkUpgradeButton" | ||
| defaultMessage={'Upgrade {count, plural, one {# integration} other {# integrations}}'} | ||
| values={{ | ||
| count: selectedItems.length, | ||
| }} | ||
| /> | ||
| </EuiToolTip> | ||
| ) : ( | ||
| <FormattedMessage | ||
| id="xpack.fleet.epmInstalledIntegrations.bulkUninstallButton" | ||
| defaultMessage={'Uninstall {count, plural, one {# integration} other {# integrations}}'} | ||
| values={{ | ||
| count: selectedItems.length, | ||
| }} | ||
| /> | ||
| )} | ||
| </EuiContextMenuItem>, | ||
| ...(enablePackageRollback | ||
| ? [ | ||
| <EuiContextMenuItem | ||
| key="rollback" | ||
| icon="returnKey" | ||
| disabled={!hasRollbackableIntegrations || !licenseService.isEnterprise()} | ||
| onClick={openRollbackModal} | ||
| > | ||
| </EuiContextMenuItem>, | ||
| <EuiContextMenuItem | ||
| key="uninstall" | ||
| icon="trash" | ||
| disabled={hasUninstallableIntegrations} | ||
| onClick={openUninstallModal} | ||
| > | ||
| {hasUninstallableIntegrations ? ( | ||
| <EuiToolTip | ||
| position="right" | ||
| content={ | ||
| <FormattedMessage | ||
| id="xpack.fleet.epmInstalledIntegrations.uninstallDisabledTooltip" | ||
| defaultMessage="Can't uninstall integrations that are attached to agent policies" | ||
| /> | ||
| } | ||
| > | ||
| <FormattedMessage | ||
| id="xpack.fleet.epmInstalledIntegrations.bulkUninstallButton" | ||
| defaultMessage={ | ||
| 'Uninstall {count, plural, one {# integration} other {# integrations}}' | ||
| } | ||
| values={{ | ||
| count: selectedItems.length, | ||
| }} | ||
| /> | ||
| </EuiToolTip> | ||
| ) : ( | ||
| <FormattedMessage | ||
| id="xpack.fleet.epmInstalledIntegrations.bulkRollbackButton" | ||
| id="xpack.fleet.epmInstalledIntegrations.bulkUninstallButton" | ||
| defaultMessage={ | ||
| 'Rollback {count, plural, one {# integration} other {# integrations}}' | ||
| 'Uninstall {count, plural, one {# integration} other {# integrations}}' | ||
| } | ||
| values={{ | ||
| count: selectedItems.length, | ||
| }} | ||
| /> | ||
| </EuiContextMenuItem>, | ||
| ] | ||
| : []), | ||
| ]; | ||
| )} | ||
| </EuiContextMenuItem>, | ||
| ...(enablePackageRollback | ||
| ? [ | ||
| <EuiContextMenuItem | ||
| key="rollback" | ||
| icon="returnKey" | ||
| disabled={!hasRollbackableIntegrations || !licenseService.isEnterprise()} | ||
| onClick={openRollbackModal} | ||
| > | ||
| <FormattedMessage | ||
| id="xpack.fleet.epmInstalledIntegrations.bulkRollbackButton" | ||
| defaultMessage={ | ||
| 'Rollback {count, plural, one {# integration} other {# integrations}}' | ||
|
juliaElastic marked this conversation as resolved.
Outdated
|
||
| } | ||
| values={{ | ||
| count: selectedItems.length, | ||
| }} | ||
| /> | ||
| </EuiContextMenuItem>, | ||
| ] | ||
| : []), | ||
| ] | ||
| ); | ||
| } | ||
|
|
||
| return menuItems; | ||
| }, [ | ||
| selectedItems, | ||
| openUninstallModal, | ||
| openUpgradeModal, | ||
| openRollbackModal, | ||
| enablePackageRollback, | ||
| licenseService, | ||
| openManageIntegrationKnowledgeFlyout, | ||
| ]); | ||
|
|
||
| return ( | ||
| <EuiPopover | ||
| id="fleet.epmInstalledIntegrations.bulkActionPopover" | ||
| button={button} | ||
| isOpen={isOpen} | ||
| closePopover={() => setIsOpen(false)} | ||
| panelPaddingSize="none" | ||
| anchorPosition="downLeft" | ||
| > | ||
| <EuiContextMenuPanel size="s" items={items} /> | ||
| </EuiPopover> | ||
| <> | ||
| <EuiPopover | ||
| id="fleet.epmInstalledIntegrations.bulkActionPopover" | ||
| button={button} | ||
| isOpen={isOpen} | ||
| closePopover={() => setIsOpen(false)} | ||
| panelPaddingSize="none" | ||
| anchorPosition="downLeft" | ||
| > | ||
| <EuiContextMenuPanel size="s" items={items} /> | ||
| </EuiPopover> | ||
| {showIntegrationKnowledgeFlyout && ( | ||
| <IntegrationKnowledgeFlyout onClose={() => setShowIntegrationKnowledgeFlyout(false)} /> | ||
| )} | ||
| </> | ||
| ); | ||
| }; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.