Skip to content

Commit

Permalink
[Fleet] Fix uninstall package validation accross space
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Jul 19, 2024
1 parent ef88274 commit 0943e88
Show file tree
Hide file tree
Showing 8 changed files with 407 additions and 372 deletions.
4 changes: 4 additions & 0 deletions x-pack/plugins/fleet/common/types/models/epm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,10 @@ export type PackageInfo =
| Installable<Merge<RegistryPackage, EpmPackageAdditions>>
| Installable<Merge<ArchivePackage, EpmPackageAdditions>>;

export interface PackageMetadata {
has_policies: true;
}

export type IntegrationCardReleaseLabel = 'beta' | 'preview' | 'ga' | 'rc';

export type PackageVerificationStatus = 'verified' | 'unverified' | 'unknown';
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/fleet/common/types/rest_spec/epm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import type {
SimpleSOAssetType,
AssetSOObject,
InstallResultStatus,
PackageMetadata,
} from '../models/epm';

export interface GetCategoriesRequest {
Expand Down Expand Up @@ -97,6 +98,7 @@ export interface GetInfoRequest {

export interface GetInfoResponse {
item: PackageInfo;
metadata?: PackageMetadata;
// deprecated in 8.0
response?: PackageInfo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export function Detail() {
pkgVersion,
{
prerelease: prereleaseIntegrationsEnabled,
withMetadata: true,
},
{
enabled: !authz.fleet.readSettings || !isSettingsInitialLoading, // Load only after settings are loaded
Expand Down Expand Up @@ -785,7 +786,11 @@ export function Detail() {
/>
</Route>
<Route path={INTEGRATIONS_ROUTING_PATHS.integration_details_settings}>
<SettingsPage packageInfo={packageInfo} startServices={services} />
<SettingsPage
packageInfo={packageInfo}
packageMetadata={packageInfoData?.metadata}
startServices={services}
/>
</Route>
<Route path={INTEGRATIONS_ROUTING_PATHS.integration_details_assets}>
<AssetsPage packageInfo={packageInfo} refetchPackageInfo={refetchPackageInfo} />
Expand Down
Loading

0 comments on commit 0943e88

Please sign in to comment.