Skip to content

Commit

Permalink
Merge branch 'master' into date-picker
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Sep 1, 2021
2 parents 890b64b + 29b4588 commit 70d1627
Show file tree
Hide file tree
Showing 36 changed files with 178 additions and 229 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.5
14.17.6
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.5
14.17.6
12 changes: 6 additions & 6 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ check_rules_nodejs_version(minimum_version_string = "3.8.0")
# we can update that rule.
node_repositories(
node_repositories = {
"14.17.5-darwin_amd64": ("node-v14.17.5-darwin-x64.tar.gz", "node-v14.17.5-darwin-x64", "2e40ab625b45b9bdfcb963ddd4d65d87ddf1dd37a86b6f8b075cf3d77fe9dc09"),
"14.17.5-linux_arm64": ("node-v14.17.5-linux-arm64.tar.xz", "node-v14.17.5-linux-arm64", "3a2e674b6db50dfde767c427e8f077235bbf6f9236e1b12a4cc3496b12f94bae"),
"14.17.5-linux_s390x": ("node-v14.17.5-linux-s390x.tar.xz", "node-v14.17.5-linux-s390x", "7d40eee3d54241403db12fb3bc420cd776e2b02e89100c45cf5e74a73942e7f6"),
"14.17.5-linux_amd64": ("node-v14.17.5-linux-x64.tar.xz", "node-v14.17.5-linux-x64", "2d759de07a50cd7f75bd73d67e97b0d0e095ee3c413efac7d1b3d1e84ed76fff"),
"14.17.5-windows_amd64": ("node-v14.17.5-win-x64.zip", "node-v14.17.5-win-x64", "a99b7ee08e846e5d1f4e70c4396265542819d79ed9cebcc27760b89571f03cbf"),
"14.17.6-darwin_amd64": ("node-v14.17.6-darwin-x64.tar.gz", "node-v14.17.6-darwin-x64", "e3e4c02240d74fb1dc8a514daa62e5de04f7eaee0bcbca06a366ece73a52ad88"),
"14.17.6-linux_arm64": ("node-v14.17.6-linux-arm64.tar.xz", "node-v14.17.6-linux-arm64", "9c4f3a651e03cd9b5bddd33a80e8be6a6eb15e518513e410bb0852a658699156"),
"14.17.6-linux_s390x": ("node-v14.17.6-linux-s390x.tar.xz", "node-v14.17.6-linux-s390x", "3677f35b97608056013b5368f86eecdb044bdccc1b3976c1d4448736c37b6a0c"),
"14.17.6-linux_amd64": ("node-v14.17.6-linux-x64.tar.xz", "node-v14.17.6-linux-x64", "3bbe4faf356738d88b45be222bf5e858330541ff16bd0d4cfad36540c331461b"),
"14.17.6-windows_amd64": ("node-v14.17.6-win-x64.zip", "node-v14.17.6-win-x64", "b83e9ce542fda7fc519cec6eb24a2575a84862ea4227dedc171a8e0b5b614ac0"),
},
node_version = "14.17.5",
node_version = "14.17.6",
node_urls = [
"https://nodejs.org/dist/v{version}/{filename}",
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"**/underscore": "^1.13.1"
},
"engines": {
"node": "14.17.5",
"node": "14.17.6",
"yarn": "^1.21.1"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/dev/build/tasks/package_json/find_used_dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export async function findUsedDependencies(listedPkgDependencies: any, baseDir:
];

const discoveredPluginEntries = await globby([
normalize(Path.resolve(baseDir, `src/plugins/*/server/index.js`)),
normalize(Path.resolve(baseDir, `src/plugins/**/server/index.js`)),
`!${normalize(Path.resolve(baseDir, `/src/plugins/**/public`))}`,
normalize(Path.resolve(baseDir, `x-pack/plugins/*/server/index.js`)),
normalize(Path.resolve(baseDir, `x-pack/plugins/**/server/index.js`)),
`!${normalize(Path.resolve(baseDir, `/x-pack/plugins/**/public`))}`,
]);

Expand Down
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
1 change: 1 addition & 0 deletions x-pack/plugins/apm/ftr_e2e/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ async function config({ readConfigFile }: FtrConfigProviderContext) {
...xpackFunctionalTestsConfig.get('kbnTestServer.serverArgs'),
'--home.disableWelcomeScreen=true',
'--csp.strict=false',
'--csp.warnLegacyBrowsers=false',
// define custom kibana server args here
`--elasticsearch.ssl.certificateAuthorities=${CA_CERT_PATH}`,
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

const basePath = '/app/apm/settings/customize-ui';

describe('Custom links', () => {
beforeEach(() => {
cy.loginAsPowerUser();
});

it('shows empty message and create button', () => {
cy.visit(basePath);
cy.contains('No links found');
cy.contains('Create custom link');
});

it('creates custom link', () => {
cy.visit(basePath);
const emptyPrompt = cy.get('[data-test-subj="customLinksEmptyPrompt"]');
cy.contains('Create custom link').click();
cy.contains('Create link');
cy.contains('Save').should('be.disabled');
cy.get('input[name="label"]').type('foo');
cy.get('input[name="url"]').type('https://foo.com');
cy.contains('Save').should('not.be.disabled');
cy.contains('Save').click();
emptyPrompt.should('not.exist');
cy.contains('foo');
cy.contains('https://foo.com');
cy.get('[data-test-subj="editCustomLink"]').click();
cy.contains('Delete').click();
});
});
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');
});
});
});
});
4 changes: 2 additions & 2 deletions x-pack/plugins/apm/ftr_e2e/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Cypress.Commands.add('loginAsReadOnlyUser', () => {
cy.loginAs({ username: 'apm_read_user', password: 'changeme' });
});

Cypress.Commands.add('loginAsSuperUser', () => {
cy.loginAs({ username: 'elastic', password: 'changeme' });
Cypress.Commands.add('loginAsPowerUser', () => {
cy.loginAs({ username: 'apm_power_user', password: 'changeme' });
});

Cypress.Commands.add(
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/ftr_e2e/cypress/support/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
declare namespace Cypress {
interface Chainable {
loginAsReadOnlyUser(): void;
loginAsSuperUser(): void;
loginAsPowerUser(): void;
loginAs(params: { username: string; password: string }): void;
changeTimeRange(value: string): void;
expectAPIsToHaveBeenCalledWith(params: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export function EmptyPrompt({
}) {
return (
<EuiEmptyPrompt
data-test-subj="customLinksEmptyPrompt"
iconType="link"
iconColor=""
title={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export function FlyoutFooter({
<DeleteButton customLinkId={customLinkId} onDelete={onDelete} />
)}
<EuiButton
form="customLink_form"
fill
type="submit"
isLoading={isSaving}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
EuiFlyout,
EuiFlyoutBody,
EuiFlyoutHeader,
EuiPortal,
EuiSpacer,
EuiText,
EuiTitle,
Expand Down Expand Up @@ -76,69 +75,67 @@ export function CreateEditCustomLinkFlyout({
};

return (
<EuiPortal>
<form onSubmit={onSubmit}>
<EuiFlyout ownFocus onClose={onClose} size="m">
<EuiFlyoutHeader hasBorder>
<EuiTitle size="s">
<h2>
{i18n.translate(
'xpack.apm.settings.customizeUI.customLink.flyout.title',
<form onSubmit={onSubmit} id="customLink_form">
<EuiFlyout ownFocus onClose={onClose} size="m">
<EuiFlyoutHeader hasBorder>
<EuiTitle size="s">
<h2>
{i18n.translate(
'xpack.apm.settings.customizeUI.customLink.flyout.title',
{
defaultMessage: 'Create link',
}
)}
</h2>
</EuiTitle>
</EuiFlyoutHeader>
<EuiFlyoutBody>
<EuiText>
<p>
{i18n.translate(
'xpack.apm.settings.customizeUI.customLink.flyout.label',
{
defaultMessage:
'Links will be available in the context of transaction details throughout the APM app. You can create an unlimited number of links. You can refer to dynamic variables by using any of the transaction metadata to fill in your URLs. More information, including examples, are available in the',
}
)}{' '}
<Documentation
label={i18n.translate(
'xpack.apm.settings.customizeUI.customLink.flyout.label.doc',
{
defaultMessage: 'Create link',
defaultMessage: 'documentation.',
}
)}
</h2>
</EuiTitle>
</EuiFlyoutHeader>
<EuiFlyoutBody>
<EuiText>
<p>
{i18n.translate(
'xpack.apm.settings.customizeUI.customLink.flyout.label',
{
defaultMessage:
'Links will be available in the context of transaction details throughout the APM app. You can create an unlimited number of links. You can refer to dynamic variables by using any of the transaction metadata to fill in your URLs. More information, including examples, are available in the',
}
)}{' '}
<Documentation
label={i18n.translate(
'xpack.apm.settings.customizeUI.customLink.flyout.label.doc',
{
defaultMessage: 'documentation.',
}
)}
/>
</p>
</EuiText>
/>
</p>
</EuiText>

<EuiSpacer size="l" />
<EuiSpacer size="l" />

<LinkSection
label={label}
onChangeLabel={setLabel}
url={url}
onChangeUrl={setUrl}
/>
<LinkSection
label={label}
onChangeLabel={setLabel}
url={url}
onChangeUrl={setUrl}
/>

<EuiSpacer size="l" />
<EuiSpacer size="l" />

<FiltersSection filters={filters} onChangeFilters={setFilters} />
<FiltersSection filters={filters} onChangeFilters={setFilters} />

<EuiSpacer size="l" />
<EuiSpacer size="l" />

<LinkPreview label={label} url={url} filters={filters} />
</EuiFlyoutBody>
<LinkPreview label={label} url={url} filters={filters} />
</EuiFlyoutBody>

<FlyoutFooter
isSaveButtonEnabled={isFormValid}
onClose={onClose}
isSaving={isSaving}
onDelete={onDelete}
customLinkId={customLinkId}
/>
</EuiFlyout>
</form>
</EuiPortal>
<FlyoutFooter
isSaveButtonEnabled={isFormValid}
onClose={onClose}
isSaving={isSaving}
onDelete={onDelete}
customLinkId={customLinkId}
/>
</EuiFlyout>
</form>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export function CustomLinkTable({ items = [], onCustomLinkSelected }: Props) {
icon: 'pencil',
color: 'primary',
type: 'icon',
'data-test-subj': 'editCustomLink',
onClick: (customLink: CustomLink) => {
onCustomLinkSelected(customLink);
},
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ export function ServiceOverviewThroughputChart({
height,
environment,
kuery,
transactionName,
}: {
height?: number;
environment: string;
kuery: string;
transactionName?: string;
}) {
const theme = useTheme();

Expand Down Expand Up @@ -80,6 +82,7 @@ export function ServiceOverviewThroughputChart({
transactionType,
comparisonStart,
comparisonEnd,
transactionName,
},
},
});
Expand All @@ -94,6 +97,7 @@ export function ServiceOverviewThroughputChart({
transactionType,
comparisonStart,
comparisonEnd,
transactionName,
]
);

Expand Down
Loading

0 comments on commit 70d1627

Please sign in to comment.