Skip to content

Commit dab58e6

Browse files
Merge branch 'master' into lens/field-list-error-handling
2 parents 3b5ef08 + 564e91f commit dab58e6

104 files changed

Lines changed: 2670 additions & 666 deletions

File tree

Some content is hidden

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

.ci/end2end.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pipeline {
1414
HOME = "${env.WORKSPACE}"
1515
E2E_DIR = 'x-pack/plugins/apm/e2e'
1616
PIPELINE_LOG_LEVEL = 'DEBUG'
17+
KBN_OPTIMIZER_THEMES = 'v7light'
1718
}
1819
options {
1920
timeout(time: 1, unit: 'HOURS')

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
124124
"@babel/register": "^7.10.1",
125125
"@elastic/apm-rum": "^5.2.0",
126-
"@elastic/charts": "19.6.3",
126+
"@elastic/charts": "19.7.0",
127127
"@elastic/datemath": "5.0.3",
128128
"@elastic/ems-client": "7.9.3",
129129
"@elastic/eui": "24.1.0",

packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ afterAll(async () => {
6363
await del(TMP_DIR);
6464
});
6565

66-
it('builds expected bundles, saves bundle counts to metadata', async () => {
66+
// FLAKY: https://github.com/elastic/kibana/issues/70762
67+
it.skip('builds expected bundles, saves bundle counts to metadata', async () => {
6768
const config = OptimizerConfig.create({
6869
repoRoot: MOCK_REPO_DIR,
6970
pluginScanDirs: [Path.resolve(MOCK_REPO_DIR, 'plugins')],
@@ -167,7 +168,8 @@ it('builds expected bundles, saves bundle counts to metadata', async () => {
167168
`);
168169
});
169170

170-
it('uses cache on second run and exist cleanly', async () => {
171+
// FLAKY: https://github.com/elastic/kibana/issues/70764
172+
it.skip('uses cache on second run and exist cleanly', async () => {
171173
const config = OptimizerConfig.create({
172174
repoRoot: MOCK_REPO_DIR,
173175
pluginScanDirs: [Path.resolve(MOCK_REPO_DIR, 'plugins')],

packages/kbn-ui-shared-deps/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"kbn:watch": "node scripts/build --dev --watch"
1010
},
1111
"dependencies": {
12-
"@elastic/charts": "19.6.3",
12+
"@elastic/charts": "19.7.0",
1313
"@elastic/eui": "24.1.0",
1414
"@elastic/numeral": "^2.5.0",
1515
"@kbn/i18n": "1.0.0",
2.71 MB
Loading

src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export interface TutorialSchema {
8282
name: string;
8383
isBeta?: boolean;
8484
shortDescription: string;
85-
euiIconType?: IconType; // EUI icon type string, one of https://elastic.github.io/eui/#/icon;
85+
euiIconType?: IconType; // EUI icon type string, one of https://elastic.github.io/eui/#/display/icons;
8686
longDescription: string;
8787
completionTimeMinutes?: number;
8888
previewImagePath?: string;
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { i18n } from '@kbn/i18n';
21+
import { TutorialsCategory } from '../../services/tutorials';
22+
import {
23+
onPremInstructions,
24+
cloudInstructions,
25+
onPremCloudInstructions,
26+
} from '../instructions/metricbeat_instructions';
27+
import {
28+
TutorialContext,
29+
TutorialSchema,
30+
} from '../../services/tutorials/lib/tutorials_registry_types';
31+
32+
export function googlecloudMetricsSpecProvider(context: TutorialContext): TutorialSchema {
33+
const moduleName = 'googlecloud';
34+
return {
35+
id: 'googlecloudMetrics',
36+
name: i18n.translate('home.tutorials.googlecloudMetrics.nameTitle', {
37+
defaultMessage: 'Google Cloud metrics',
38+
}),
39+
category: TutorialsCategory.METRICS,
40+
shortDescription: i18n.translate('home.tutorials.googlecloudMetrics.shortDescription', {
41+
defaultMessage:
42+
'Fetch monitoring metrics from Google Cloud Platform using Stackdriver Monitoring API.',
43+
}),
44+
longDescription: i18n.translate('home.tutorials.googlecloudMetrics.longDescription', {
45+
defaultMessage:
46+
'The `googlecloud` Metricbeat module fetches monitoring metrics from Google Cloud Platform using Stackdriver Monitoring API. \
47+
[Learn more]({learnMoreLink}).',
48+
values: {
49+
learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-googlecloud.html',
50+
},
51+
}),
52+
euiIconType: 'logoGCP',
53+
isBeta: false,
54+
artifacts: {
55+
dashboards: [
56+
{
57+
id: 'f40ee870-5e4a-11ea-a4f6-717338406083',
58+
linkLabel: i18n.translate(
59+
'home.tutorials.googlecloudMetrics.artifacts.dashboards.linkLabel',
60+
{
61+
defaultMessage: 'Google Cloud metrics dashboard',
62+
}
63+
),
64+
isOverview: true,
65+
},
66+
],
67+
exportedFields: {
68+
documentationUrl: '{config.docs.beats.metricbeat}/exported-fields-googlecloud.html',
69+
},
70+
},
71+
completionTimeMinutes: 10,
72+
previewImagePath: '/plugins/home/assets/googlecloud_metrics/screenshot.png',
73+
onPrem: onPremInstructions(moduleName, context),
74+
elasticCloud: cloudInstructions(moduleName),
75+
onPremElasticCloud: onPremCloudInstructions(moduleName),
76+
};
77+
}

src/plugins/home/server/tutorials/register.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ import { openmetricsMetricsSpecProvider } from './openmetrics_metrics';
9191
import { oracleMetricsSpecProvider } from './oracle_metrics';
9292
import { iisMetricsSpecProvider } from './iis_metrics';
9393
import { azureLogsSpecProvider } from './azure_logs';
94+
import { googlecloudMetricsSpecProvider } from './googlecloud_metrics';
9495

9596
export const builtInTutorials = [
9697
systemLogsSpecProvider,
@@ -168,4 +169,5 @@ export const builtInTutorials = [
168169
oracleMetricsSpecProvider,
169170
iisMetricsSpecProvider,
170171
azureLogsSpecProvider,
172+
googlecloudMetricsSpecProvider,
171173
];

test/functional/apps/dashboard/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export default function ({ getService, loadTestFile }) {
4949
after(unloadCurrentData);
5050

5151
loadTestFile(require.resolve('./empty_dashboard'));
52+
loadTestFile(require.resolve('./url_field_formatter'));
5253
loadTestFile(require.resolve('./embeddable_rendering'));
5354
loadTestFile(require.resolve('./create_and_add_embeddables'));
5455
loadTestFile(require.resolve('./edit_embeddable_redirects'));
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import expect from '@kbn/expect';
21+
import { WebElementWrapper } from 'test/functional/services/lib/web_element_wrapper';
22+
import { FtrProviderContext } from '../../ftr_provider_context';
23+
24+
export default function ({ getService, getPageObjects }: FtrProviderContext) {
25+
const { common, dashboard, settings, timePicker, visChart } = getPageObjects([
26+
'common',
27+
'dashboard',
28+
'settings',
29+
'timePicker',
30+
'visChart',
31+
]);
32+
const esArchiver = getService('esArchiver');
33+
const kibanaServer = getService('kibanaServer');
34+
const testSubjects = getService('testSubjects');
35+
const browser = getService('browser');
36+
const fieldName = 'clientip';
37+
38+
const clickFieldAndCheckUrl = async (fieldLink: WebElementWrapper) => {
39+
const fieldValue = await fieldLink.getVisibleText();
40+
await fieldLink.click();
41+
const windowHandlers = await browser.getAllWindowHandles();
42+
expect(windowHandlers.length).to.equal(2);
43+
await browser.switchToWindow(windowHandlers[1]);
44+
const currentUrl = await browser.getCurrentUrl();
45+
const fieldUrl = common.getHostPort() + '/app/' + fieldValue;
46+
expect(currentUrl).to.equal(fieldUrl);
47+
};
48+
49+
describe('Changing field formatter to Url', () => {
50+
before(async function () {
51+
await esArchiver.load('dashboard/current/kibana');
52+
await kibanaServer.uiSettings.replace({
53+
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
54+
});
55+
await common.navigateToApp('settings');
56+
await settings.clickKibanaIndexPatterns();
57+
await settings.clickIndexPatternLogstash();
58+
await settings.filterField(fieldName);
59+
await settings.openControlsByName(fieldName);
60+
await settings.setFieldFormat('url');
61+
await settings.controlChangeSave();
62+
});
63+
64+
it('applied on dashboard', async () => {
65+
await common.navigateToApp('dashboard');
66+
await dashboard.loadSavedDashboard('dashboard with everything');
67+
await dashboard.waitForRenderComplete();
68+
const fieldLink = await visChart.getFieldLinkInVisTable(`${fieldName}: Descending`, 1);
69+
await clickFieldAndCheckUrl(fieldLink);
70+
});
71+
72+
it('applied on discover', async () => {
73+
await common.navigateToApp('discover');
74+
await timePicker.setAbsoluteRange(
75+
'Sep 19, 2017 @ 06:31:44.000',
76+
'Sep 23, 2018 @ 18:31:44.000'
77+
);
78+
await testSubjects.click('docTableExpandToggleColumn');
79+
const fieldLink = await testSubjects.find(`tableDocViewRow-${fieldName}-value`);
80+
await clickFieldAndCheckUrl(fieldLink);
81+
});
82+
83+
afterEach(async function () {
84+
const windowHandlers = await browser.getAllWindowHandles();
85+
if (windowHandlers.length > 1) {
86+
await browser.closeCurrentWindow();
87+
await browser.switchToWindow(windowHandlers[0]);
88+
}
89+
});
90+
});
91+
}

0 commit comments

Comments
 (0)