Skip to content

Commit c0ad03a

Browse files
authored
[Fleet] Show prerelease upgrade versions in Install integrations UI (#240317)
## Summary Closes #237003 Show prerelease upgrade versions if beta integrations are enabled. Verification: - Install a prerelease integration with an old version ``` POST kbn:/api/fleet/epm/packages/entityanalytics_ad/0.13.0 { "force": true } ``` - Switch on Show beta integrations on Integrations landing page - Go to Installed Integrations UI - Verify that the available upgrade is visible <img width="1532" height="721" alt="image" src="https://github.com/user-attachments/assets/d58180ee-25df-4da9-8d24-faecb1e5881c" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
1 parent dbb8eb9 commit c0ad03a

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/home/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ export const EPMHomePage: React.FC = () => {
123123
<Route path={INTEGRATIONS_ROUTING_PATHS.integrations_installed}>
124124
<DefaultLayout section="manage" notificationsBySection={notificationsBySection}>
125125
{installedIntegrationsTabularUI ? (
126-
<InstalledIntegrationsPage />
126+
<InstalledIntegrationsPage
127+
prereleaseIntegrationsEnabled={prereleaseIntegrationsEnabled}
128+
/>
127129
) : (
128130
<InstalledPackages installedPackages={installedPackages} isLoading={isLoading} />
129131
)}

x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/installed_integrations/hooks/use_installed_integrations.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ export function useInstalledIntegrations(
5858
pagination: Pagination,
5959
upgradingIntegrations?: InstalledPackageUIPackageListItem[],
6060
uninstallingIntegrations?: InstalledPackageUIPackageListItem[],
61-
rollingbackIntegrations?: InstalledPackageUIPackageListItem[]
61+
rollingbackIntegrations?: InstalledPackageUIPackageListItem[],
62+
prereleaseIntegrationsEnabled?: boolean
6263
) {
6364
const { data, isInitialLoading, isLoading } = useGetPackagesQuery({
6465
withPackagePoliciesCount: true,
66+
prerelease: prereleaseIntegrationsEnabled,
6567
});
6668

6769
const internalInstalledPackages: InstalledPackageUIPackageListItem[] = useMemo(

x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/installed_integrations/index.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ import { useInstalledIntegrationsActions } from './hooks/use_installed_integrati
2121
import { BulkActionContextProvider } from './hooks/use_bulk_actions_context';
2222
import { PackagePoliciesPanel } from './components/package_policies_panel';
2323

24-
const InstalledIntegrationsPageContent: React.FunctionComponent = () => {
24+
const InstalledIntegrationsPageContent: React.FunctionComponent<{
25+
prereleaseIntegrationsEnabled: boolean;
26+
}> = ({ prereleaseIntegrationsEnabled }) => {
2527
// State management
2628
const filters = useUrlFilters();
2729
const { selectedPackageViewPolicies } = useViewPolicies();
@@ -40,7 +42,8 @@ const InstalledIntegrationsPageContent: React.FunctionComponent = () => {
4042
pagination.pagination,
4143
upgradingIntegrations,
4244
uninstallingIntegrations,
43-
rollingbackIntegrations
45+
rollingbackIntegrations,
46+
prereleaseIntegrationsEnabled
4447
);
4548

4649
const [selectedItems, setSelectedItems] = useState<InstalledPackageUIPackageListItem[]>([]);
@@ -87,10 +90,14 @@ const InstalledIntegrationsPageContent: React.FunctionComponent = () => {
8790
);
8891
};
8992

90-
export const InstalledIntegrationsPage: React.FunctionComponent = () => {
93+
export const InstalledIntegrationsPage: React.FunctionComponent<{
94+
prereleaseIntegrationsEnabled: boolean;
95+
}> = ({ prereleaseIntegrationsEnabled }) => {
9196
return (
9297
<BulkActionContextProvider>
93-
<InstalledIntegrationsPageContent />
98+
<InstalledIntegrationsPageContent
99+
prereleaseIntegrationsEnabled={prereleaseIntegrationsEnabled}
100+
/>
94101
</BulkActionContextProvider>
95102
);
96103
};

0 commit comments

Comments
 (0)