Skip to content
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

[APM] "Backends" naming #110523

Merged
merged 4 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all 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 x-pack/plugins/apm/common/backends.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import {
import { environmentQuery } from './utils/environment_query';

export const kueryBarPlaceholder = i18n.translate(
'xpack.apm.backends.kueryBarPlaceholder',
'xpack.apm.dependencies.kueryBarPlaceholder',
{
defaultMessage: `Search backend metrics (e.g. span.destination.service.resource:elasticsearch)`,
defaultMessage: `Search dependency metrics (e.g. span.destination.service.resource:elasticsearch)`,
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ describe('Service Overview', () => {
cy.contains('Service Map');
// Waits until the agent request is finished to check the tab.
cy.wait('@agentRequest');
cy.contains('Dependencies').should('not.exist');
cy.get('.euiTabs .euiTab__content').then((elements) => {
elements.map((index, element) => {
expect(element.innerText).to.not.equal('Dependencies');
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { useApmParams } from '../../../hooks/use_apm_params';
import { useApmRouter } from '../../../hooks/use_apm_router';
import { SearchBar } from '../../shared/search_bar';
import { BackendLatencyChart } from './backend_latency_chart';
import { BackendInventoryTitle } from '../../routing/home';
import { DependenciesInventoryTitle } from '../../routing/home';
import { BackendDetailDependenciesTable } from './backend_detail_dependencies_table';
import { BackendThroughputChart } from './backend_throughput_chart';
import { BackendFailedTransactionRateChart } from './backend_error_rate_chart';
Expand All @@ -39,7 +39,7 @@ export function BackendDetailOverview() {

useBreadcrumb([
{
title: BackendInventoryTitle,
title: DependenciesInventoryTitle,
href: apmRouter.link('/backends', {
query: { rangeFrom, rangeTo, environment, kuery },
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ export function BackendInventoryDependenciesTable() {
dependencies={dependencies}
title={null}
nameColumnTitle={i18n.translate(
'xpack.apm.backendInventory.dependenciesTableColumnBackend',
'xpack.apm.backendInventory.dependencyTableColumn',
{
defaultMessage: 'Backend',
defaultMessage: 'Dependency',
}
)}
status={status}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ export function BackendContents({
});
}}
>
{i18n.translate('xpack.apm.serviceMap.backendDetailsButtonText', {
defaultMessage: 'Backend Details',
{i18n.translate('xpack.apm.serviceMap.dependencyDetailsButtonText', {
defaultMessage: 'Dependency Details',
})}
</EuiButton>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const { Backend, ExternalsList, Resource, Service } = composeStories(stories);

describe('Popover', () => {
describe('with backend data', () => {
it('renders a backend link', async () => {
it('renders a dependency link', async () => {
render(<Backend />);

await waitFor(() => {
expect(
screen.getByRole('link', { name: /backend details/i })
screen.getByRole('link', { name: /Dependency Details/i })
).toBeInTheDocument();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ export function ServiceOverviewDependenciesTable({
title={i18n.translate(
'xpack.apm.serviceOverview.dependenciesTableTitle',
{
defaultMessage: 'Downstream services and backends',
defaultMessage: 'Dependencies',
}
)}
nameColumnTitle={i18n.translate(
'xpack.apm.serviceOverview.dependenciesTableColumnBackend',
'xpack.apm.serviceOverview.dependenciesTableColumn',
{
defaultMessage: 'Backend',
defaultMessage: 'Dependency',
}
)}
status={status}
Expand Down
8 changes: 4 additions & 4 deletions x-pack/plugins/apm/public/components/routing/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export const ServiceInventoryTitle = i18n.translate(
}
);

export const BackendInventoryTitle = i18n.translate(
'xpack.apm.views.backendInventory.title',
export const DependenciesInventoryTitle = i18n.translate(
'xpack.apm.views.dependenciesInventory.title',
{
defaultMessage: 'Backends',
defaultMessage: 'Dependencies',
}
);

Expand Down Expand Up @@ -114,7 +114,7 @@ export const home = {
},
page({
path: '/',
title: BackendInventoryTitle,
title: DependenciesInventoryTitle,
element: <BackendInventory />,
}),
],
Expand Down
13 changes: 8 additions & 5 deletions x-pack/plugins/apm/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,12 @@ const serviceMapTitle = i18n.translate('xpack.apm.navigation.serviceMapTitle', {
defaultMessage: 'Service Map',
});

const backendsTitle = i18n.translate('xpack.apm.navigation.backendsTitle', {
defaultMessage: 'Backends',
});
const dependenciesTitle = i18n.translate(
'xpack.apm.navigation.dependenciesTitle',
{
defaultMessage: 'Dependencies',
}
);

export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> {
constructor(
Expand Down Expand Up @@ -126,7 +129,7 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> {
{ label: servicesTitle, app: 'apm', path: '/services' },
{ label: tracesTitle, app: 'apm', path: '/traces' },
{
label: backendsTitle,
label: dependenciesTitle,
app: 'apm',
path: '/backends',
isNewFeature: true,
Expand Down Expand Up @@ -270,7 +273,7 @@ export class ApmPlugin implements Plugin<ApmPluginSetup, ApmPluginStart> {
{ id: 'services', title: servicesTitle, path: '/services' },
{ id: 'traces', title: tracesTitle, path: '/traces' },
{ id: 'service-map', title: serviceMapTitle, path: '/service-map' },
{ id: 'backends', title: backendsTitle, path: '/backends' },
{ id: 'backends', title: dependenciesTitle, path: '/backends' },
],

async mount(appMountParameters: AppMountParameters<unknown>) {
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -5657,7 +5657,6 @@
"xpack.apm.serviceNodeMetrics.unidentifiedServiceNodesWarningTitle": "JVM を特定できませんでした",
"xpack.apm.serviceNodeNameMissing": " (空) ",
"xpack.apm.serviceOveriew.errorsTableOccurrences": "{occurrencesCount} occ.",
"xpack.apm.serviceOverview.dependenciesTableColumnBackend": "バックエンド",
"xpack.apm.serviceOverview.dependenciesTableTitle": "依存関係",
"xpack.apm.serviceOverview.errorsTableColumnLastSeen": "前回の認識",
"xpack.apm.serviceOverview.errorsTableColumnName": "名前",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -5685,7 +5685,6 @@
"xpack.apm.serviceNodeMetrics.unidentifiedServiceNodesWarningTitle": "找不到 JVM",
"xpack.apm.serviceNodeNameMissing": "(空)",
"xpack.apm.serviceOveriew.errorsTableOccurrences": "{occurrencesCount} 次",
"xpack.apm.serviceOverview.dependenciesTableColumnBackend": "后端",
"xpack.apm.serviceOverview.dependenciesTableTitle": "依赖项",
"xpack.apm.serviceOverview.errorsTableColumnLastSeen": "最后看到时间",
"xpack.apm.serviceOverview.errorsTableColumnName": "名称",
Expand Down