Skip to content

Commit 281de65

Browse files
committed
Merge branch 'master' of github.com:elastic/kibana into fix/determine-correct-merge-base
2 parents 7fbc57a + 114a0a1 commit 281de65

File tree

173 files changed

+1372
-1872
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+1372
-1872
lines changed

docs/settings/apm-settings.asciidoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,29 +43,29 @@ Changing these settings may disable features of the APM App.
4343
| `xpack.apm.enabled`
4444
| Set to `false` to disable the APM app. Defaults to `true`.
4545

46-
| `xpack.apm.ui.enabled`
46+
| `xpack.apm.ui.enabled` {ess-icon}
4747
| Set to `false` to hide the APM app from the menu. Defaults to `true`.
4848

4949
| `xpack.apm.ui.transactionGroupBucketSize`
5050
| Number of top transaction groups displayed in the APM app. Defaults to `100`.
5151

52-
| `xpack.apm.ui.maxTraceItems`
52+
| `xpack.apm.ui.maxTraceItems` {ess-icon}
5353
| Maximum number of child items displayed when viewing trace details. Defaults to `1000`.
5454

55-
| `apm_oss.indexPattern`
55+
| `apm_oss.indexPattern` {ess-icon}
5656
| The index pattern used for integrations with Machine Learning and Query Bar.
5757
It must match all apm indices. Defaults to `apm-*`.
5858

59-
| `apm_oss.errorIndices`
59+
| `apm_oss.errorIndices` {ess-icon}
6060
| Matcher for all {apm-server-ref}/error-indices.html[error indices]. Defaults to `apm-*`.
6161

6262
| `apm_oss.onboardingIndices`
6363
| Matcher for all onboarding indices. Defaults to `apm-*`.
6464

65-
| `apm_oss.spanIndices`
65+
| `apm_oss.spanIndices` {ess-icon}
6666
| Matcher for all {apm-server-ref}/span-indices.html[span indices]. Defaults to `apm-*`.
6767

68-
| `apm_oss.transactionIndices`
68+
| `apm_oss.transactionIndices` {ess-icon}
6969
| Matcher for all {apm-server-ref}/transaction-indices.html[transaction indices]. Defaults to `apm-*`.
7070

7171
| `apm_oss.metricsIndices`

test/functional/page_objects/home_page.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ export function HomePageProvider({ getService, getPageObjects }: FtrProviderCont
5353

5454
async removeSampleDataSet(id: string) {
5555
// looks like overkill but we're hitting flaky cases where we click but it doesn't remove
56-
await testSubjects.isDisplayed(`removeSampleDataSet${id}`);
57-
await testSubjects.isEnabled(`removeSampleDataSet${id}`);
56+
await testSubjects.waitForEnabled(`removeSampleDataSet${id}`);
5857
await testSubjects.click(`removeSampleDataSet${id}`);
5958
await this._waitForSampleDataLoadingAction(id);
6059
}

test/functional/services/common/test_subjects.ts

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,10 @@ export function TestSubjectsProvider({ getService }: FtrProviderContext) {
9797
}
9898

9999
public async append(selector: string, text: string): Promise<void> {
100-
return await retry.try(async () => {
101-
log.debug(`TestSubjects.append(${selector}, ${text})`);
102-
const input = await this.find(selector);
103-
await input.click();
104-
await input.type(text);
105-
});
100+
log.debug(`TestSubjects.append(${selector}, ${text})`);
101+
const input = await this.find(selector);
102+
await input.click();
103+
await input.type(text);
106104
}
107105

108106
public async clickWhenNotDisabled(
@@ -119,12 +117,10 @@ export function TestSubjectsProvider({ getService }: FtrProviderContext) {
119117
}
120118

121119
public async doubleClick(selector: string, timeout: number = FIND_TIME): Promise<void> {
122-
return await retry.try(async () => {
123-
log.debug(`TestSubjects.doubleClick(${selector})`);
124-
const element = await this.find(selector, timeout);
125-
await element.moveMouseTo();
126-
await element.doubleClick();
127-
});
120+
log.debug(`TestSubjects.doubleClick(${selector})`);
121+
const element = await this.find(selector, timeout);
122+
await element.moveMouseTo();
123+
await element.doubleClick();
128124
}
129125

130126
async descendantExists(selector: string, parentElement: WebElementWrapper): Promise<boolean> {
@@ -210,27 +206,21 @@ export function TestSubjectsProvider({ getService }: FtrProviderContext) {
210206
}
211207

212208
public async isEnabled(selector: string): Promise<boolean> {
213-
return await retry.try(async () => {
214-
log.debug(`TestSubjects.isEnabled(${selector})`);
215-
const element = await this.find(selector);
216-
return await element.isEnabled();
217-
});
209+
log.debug(`TestSubjects.isEnabled(${selector})`);
210+
const element = await this.find(selector);
211+
return await element.isEnabled();
218212
}
219213

220214
public async isDisplayed(selector: string): Promise<boolean> {
221-
return await retry.try(async () => {
222-
log.debug(`TestSubjects.isDisplayed(${selector})`);
223-
const element = await this.find(selector);
224-
return await element.isDisplayed();
225-
});
215+
log.debug(`TestSubjects.isDisplayed(${selector})`);
216+
const element = await this.find(selector);
217+
return await element.isDisplayed();
226218
}
227219

228220
public async isSelected(selector: string): Promise<boolean> {
229-
return await retry.try(async () => {
230-
log.debug(`TestSubjects.isSelected(${selector})`);
231-
const element = await this.find(selector);
232-
return await element.isSelected();
233-
});
221+
log.debug(`TestSubjects.isSelected(${selector})`);
222+
const element = await this.find(selector);
223+
return await element.isSelected();
234224
}
235225

236226
public async isSelectedAll(selectorAll: string): Promise<boolean[]> {
@@ -241,11 +231,9 @@ export function TestSubjectsProvider({ getService }: FtrProviderContext) {
241231
}
242232

243233
public async getVisibleText(selector: string): Promise<string> {
244-
return await retry.try(async () => {
245-
log.debug(`TestSubjects.getVisibleText(${selector})`);
246-
const element = await this.find(selector);
247-
return await element.getVisibleText();
248-
});
234+
log.debug(`TestSubjects.getVisibleText(${selector})`);
235+
const element = await this.find(selector);
236+
return await element.getVisibleText();
249237
}
250238

251239
async getVisibleTextAll(selectorAll: string): Promise<string[]> {
@@ -298,6 +286,13 @@ export function TestSubjectsProvider({ getService }: FtrProviderContext) {
298286
await find.waitForElementHidden(element, timeout);
299287
}
300288

289+
public async waitForEnabled(selector: string, timeout: number = TRY_TIME): Promise<void> {
290+
await retry.tryForTime(timeout, async () => {
291+
const element = await this.find(selector);
292+
return (await element.isDisplayed()) && (await element.isEnabled());
293+
});
294+
}
295+
301296
public getCssSelector(selector: string): string {
302297
return testSubjSelector(selector);
303298
}

x-pack/legacy/plugins/reporting/common/get_absolute_url.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@
55
*/
66

77
import url from 'url';
8-
import { AbsoluteURLFactoryOptions } from '../types';
8+
9+
interface AbsoluteURLFactoryOptions {
10+
defaultBasePath: string;
11+
protocol: string;
12+
hostname: string;
13+
port: string | number;
14+
}
915

1016
export const getAbsoluteUrlFactory = ({
1117
protocol,

x-pack/legacy/plugins/reporting/export_types/common/constants.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,4 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
export const LayoutTypes = {
8-
PRESERVE_LAYOUT: 'preserve_layout',
9-
PRINT: 'print',
10-
};
11-
127
export const DEFAULT_PAGELOAD_SELECTOR = '.application';

x-pack/legacy/plugins/reporting/export_types/common/execute_job/decrypt_job_headers.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import { cryptoFactory } from '../../../server/lib/crypto';
8-
import { Logger } from '../../../types';
7+
import { cryptoFactory, LevelLogger } from '../../../server/lib';
98
import { decryptJobHeaders } from './decrypt_job_headers';
109

1110
const encryptHeaders = async (encryptionKey: string, headers: Record<string, string>) => {
@@ -23,7 +22,7 @@ describe('headers', () => {
2322
},
2423
logger: ({
2524
error: jest.fn(),
26-
} as unknown) as Logger,
25+
} as unknown) as LevelLogger,
2726
});
2827
await expect(getDecryptedHeaders()).rejects.toMatchInlineSnapshot(
2928
`[Error: Failed to decrypt report job data. Please ensure that xpack.reporting.encryptionKey is set and re-generate this report. Error: Invalid IV length]`
@@ -44,7 +43,7 @@ describe('headers', () => {
4443
type: 'csv',
4544
headers: encryptedHeaders,
4645
},
47-
logger: {} as Logger,
46+
logger: {} as LevelLogger,
4847
});
4948
expect(decryptedHeaders).toEqual(headers);
5049
});

x-pack/legacy/plugins/reporting/export_types/common/execute_job/decrypt_job_headers.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
*/
66

77
import { i18n } from '@kbn/i18n';
8-
import { cryptoFactory } from '../../../server/lib/crypto';
9-
import { Logger } from '../../../types';
8+
import { cryptoFactory, LevelLogger } from '../../../server/lib';
109

1110
interface HasEncryptedHeaders {
1211
headers?: string;
@@ -23,7 +22,7 @@ export const decryptJobHeaders = async <
2322
}: {
2423
encryptionKey?: string;
2524
job: JobDocPayloadType;
26-
logger: Logger;
25+
logger: LevelLogger;
2726
}): Promise<Record<string, string>> => {
2827
try {
2928
if (typeof job.headers !== 'string') {

x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_conditional_headers.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
*/
66

77
import sinon from 'sinon';
8+
import { ReportingConfig, ReportingCore } from '../../../server';
9+
import { JobDocPayload } from '../../../server/types';
810
import { createMockReportingCore } from '../../../test_helpers';
9-
import { ReportingConfig, ReportingCore } from '../../../server/types';
10-
import { JobDocPayload } from '../../../types';
1111
import { JobDocPayloadPDF } from '../../printable_pdf/types';
1212
import { getConditionalHeaders, getCustomLogo } from './index';
1313

x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_conditional_headers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import { ReportingConfig } from '../../../server/types';
8-
import { ConditionalHeaders } from '../../../types';
7+
import { ReportingConfig } from '../../../server';
8+
import { ConditionalHeaders } from '../../../server/types';
99

1010
export const getConditionalHeaders = <JobDocPayloadType>({
1111
config,

x-pack/legacy/plugins/reporting/export_types/common/execute_job/get_custom_logo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66

77
import { UI_SETTINGS_CUSTOM_PDF_LOGO } from '../../../common/constants';
8-
import { ReportingConfig, ReportingCore } from '../../../server/types';
9-
import { ConditionalHeaders } from '../../../types';
8+
import { ReportingConfig, ReportingCore } from '../../../server';
9+
import { ConditionalHeaders } from '../../../server/types';
1010
import { JobDocPayloadPDF } from '../../printable_pdf/types'; // Logo is PDF only
1111

1212
export const getCustomLogo = async ({

0 commit comments

Comments
 (0)