Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/api_integration/apis/custom_integration/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function ({ getService }: FtrProviderContext) {

expect(resp.body).to.be.an('array');

expect(resp.body.length).to.be(33);
expect(resp.body.length).to.be(34);

// Test for sample data card
expect(resp.body.findIndex((c: { id: string }) => c.id === 'sample_data_all')).to.be.above(
Expand All @@ -40,7 +40,7 @@ export default function ({ getService }: FtrProviderContext) {

expect(resp.body).to.be.an('array');

expect(resp.body.length).to.be.above(109); // at least the beats + apm
expect(resp.body.length).to.be(108); // the beats
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function RumHome() {
'Enable RUM with the APM agent to collect user experience data.',
}
),
href: core.http.basePath.prepend(`integrations/detail/apm`),
href: core.http.basePath.prepend(`/app/home#/tutorial/apm`),
},
},
docsLink: core.docLinks.links.observability.guide,
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/apm/server/tutorial/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ It allows you to monitor the performance of thousands of applications in real ti
}
),
euiIconType: 'apmApp',
eprPackageOverlap: 'apm',
integrationBrowserCategories: ['web'],
artifacts,
customStatusCheckName: 'apm_fleet_server_status_check',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,17 @@ describe('useMergeEprWithReplacements', () => {
]);
});

test('should filter out apm from package list', () => {
const eprPackages: PackageListItem[] = mockEprPackages([
{
name: 'apm',
release: 'beta',
},
]);

expect(useMergeEprPackagesWithReplacements(eprPackages, [])).toEqual([]);
});

test('should consists of all 3 types (ga eprs, replacements for non-ga eprs, replacements without epr equivalent', () => {
const eprPackages: PackageListItem[] = mockEprPackages([
{
Expand All @@ -136,6 +147,10 @@ describe('useMergeEprWithReplacements', () => {
name: 'activemq',
release: 'beta',
},
{
name: 'apm',
release: 'ga',
},
]);
const replacements: CustomIntegration[] = mockIntegrations([
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@ function findReplacementsForEprPackage(
}

export function useMergeEprPackagesWithReplacements(
eprPackages: PackageListItem[],
rawEprPackages: PackageListItem[],
replacements: CustomIntegration[]
): Array<PackageListItem | CustomIntegration> {
const merged: Array<PackageListItem | CustomIntegration> = [];
const filteredReplacements = replacements;

// APM EPR-packages should _never_ show. They have special handling.
const eprPackages = rawEprPackages.filter((p) => {
return p.name !== 'apm';
Comment thread
thomasneirynck marked this conversation as resolved.
Outdated
});

// Either select replacement or select beat
eprPackages.forEach((eprPackage: PackageListItem) => {
const hits = findReplacementsForEprPackage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export const AvailablePackages: React.FC = memo(() => {
if (selectedCategory === '') {
return true;
}

return c.categories.includes(selectedCategory);
});

Expand Down Expand Up @@ -255,7 +256,7 @@ export const AvailablePackages: React.FC = memo(() => {
defaultMessage:
'Monitor, detect and diagnose complex performance issues from your application.',
})}
href={addBasePath('/app/integrations/detail/apm')}
href={addBasePath('/app/home#/tutorial/apm')}
icon={<EuiIcon type="logoObservability" size="xxl" />}
/>
</TrackApplicationView>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const TutorialModuleNotice: TutorialModuleNoticeComponent = memo(({ moduleName }
const pkgInfo =
!isLoading &&
packagesData?.response &&
packagesData.response.find((pkg) => pkg.name === moduleName);
packagesData.response.find((pkg) => pkg.name === moduleName && pkg.name !== 'apm'); // APM needs special handling
Comment thread
thomasneirynck marked this conversation as resolved.
Outdated

if (hasIngestManager && pkgInfo) {
return (
Expand Down