Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/elastic/kibana into disk-…
Browse files Browse the repository at this point in the history
…usage-alerting
  • Loading branch information
igoristic committed Sep 4, 2020
2 parents 6f0007f + ae093e5 commit 6f3e35f
Show file tree
Hide file tree
Showing 172 changed files with 8,562 additions and 1,332 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"**/istanbul-instrumenter-loader/schema-utils": "1.0.0",
"**/image-diff/gm/debug": "^2.6.9",
"**/load-grunt-config/lodash": "^4.17.20",
"**/node-jose/node-forge": "^0.10.0",
"**/react-dom": "^16.12.0",
"**/react": "^16.12.0",
"**/react-test-renderer": "^16.12.0",
Expand Down Expand Up @@ -191,7 +192,7 @@
"moment-timezone": "^0.5.27",
"mustache": "2.3.2",
"node-fetch": "1.7.3",
"node-forge": "^0.9.1",
"node-forge": "^0.10.0",
"opn": "^5.5.0",
"oppsy": "^2.0.0",
"p-map": "^4.0.0",
Expand Down Expand Up @@ -305,7 +306,7 @@
"@types/moment-timezone": "^0.5.12",
"@types/mustache": "^0.8.31",
"@types/node": ">=10.17.17 <10.20.0",
"@types/node-forge": "^0.9.0",
"@types/node-forge": "^0.9.5",
"@types/normalize-path": "^3.0.0",
"@types/opn": "^5.1.0",
"@types/pegjs": "^0.10.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ export const selectRangeTrigger: Trigger<'SELECT_RANGE_TRIGGER'> = {
defaultMessage: 'Range selection',
}),
description: i18n.translate('uiActions.triggers.selectRangeDescription', {
defaultMessage: 'Select a group of values',
defaultMessage: 'A range of values on the visualization',
}),
};
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ export const valueClickTrigger: Trigger<'VALUE_CLICK_TRIGGER'> = {
defaultMessage: 'Single click',
}),
description: i18n.translate('uiActions.triggers.valueClickDescription', {
defaultMessage: 'A single point clicked on a visualization',
defaultMessage: 'A single point on the visualization',
}),
};
4 changes: 1 addition & 3 deletions test/functional/apps/discover/_discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ export default function ({ getService, getPageObjects }) {
await kibanaServer.uiSettings.replace({ 'dateFormat:tz': 'America/Phoenix' });
await PageObjects.common.navigateToApp('discover');
await PageObjects.header.awaitKibanaChrome();
await queryBar.setQuery('');
// To remove focus of the of the search bar so date/time picker can show
await PageObjects.discover.selectIndexPattern(defaultSettings.defaultIndex);
await queryBar.clearQuery();
await PageObjects.timePicker.setDefaultAbsoluteRange();

log.debug(
Expand Down
3 changes: 1 addition & 2 deletions test/functional/apps/visualize/_tsvb_chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.visualBuilder.checkVisualBuilderIsPresent();
});

// FLAKY: https://github.com/elastic/kibana/issues/75127
describe.skip('metric', () => {
describe('metric', () => {
beforeEach(async () => {
await PageObjects.visualBuilder.resetPage();
await PageObjects.visualBuilder.clickMetric();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export default function ({ getService, getPageObjects }) {
const find = getService('find');
const comboBox = getService('comboBox');

// FLAKY: https://github.com/elastic/kibana/issues/68472
describe.skip('chained controls', function () {
describe('chained controls', function () {
this.tags('includeFirefox');

before(async () => {
Expand Down
4 changes: 4 additions & 0 deletions test/functional/page_objects/common_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
await browser.pressKeys(browser.keys.ENTER);
}

async pressTabKey() {
await browser.pressKeys(browser.keys.TAB);
}

// Pause the browser at a certain place for debugging
// Not meant for usage in CI, only for dev-usage
async pause() {
Expand Down
5 changes: 5 additions & 0 deletions test/functional/services/query_bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export function QueryBarProvider({ getService, getPageObjects }: FtrProviderCont
});
}

public async clearQuery(): Promise<void> {
await this.setQuery('');
await PageObjects.common.pressTabKey();
}

public async submitQuery(): Promise<void> {
log.debug('QueryBar.submitQuery');
await testSubjects.click('queryInput');
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions x-pack/examples/ui_actions_enhanced_examples/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
AdvancedUiActionsStart,
} from '../../../../x-pack/plugins/ui_actions_enhanced/public';
import { DashboardHelloWorldDrilldown } from './dashboard_hello_world_drilldown';
import { DashboardToUrlDrilldown } from './dashboard_to_url_drilldown';
import { DashboardToDiscoverDrilldown } from './dashboard_to_discover_drilldown';
import { createStartServicesGetter } from '../../../../src/plugins/kibana_utils/public';
import { DiscoverSetup, DiscoverStart } from '../../../../src/plugins/discover/public';
Expand Down Expand Up @@ -39,7 +38,6 @@ export class UiActionsEnhancedExamplesPlugin

uiActions.registerDrilldown(new DashboardHelloWorldDrilldown());
uiActions.registerDrilldown(new DashboardHelloWorldOnlyRangeSelectDrilldown());
uiActions.registerDrilldown(new DashboardToUrlDrilldown());
uiActions.registerDrilldown(new DashboardToDiscoverDrilldown({ start }));
}

Expand Down
2 changes: 1 addition & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"copy-to-clipboard": "^3.0.8",
"copy-webpack-plugin": "^6.0.2",
"cronstrue": "^1.51.0",
"cypress": "4.11.0",
"cypress": "5.0.0",
"cypress-multi-reporters": "^1.2.3",
"d3": "3.5.17",
"d3-scale": "1.0.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,64 +5,85 @@
*/

import React from 'react';
import { BreakdownGroup } from './BreakdownGroup';
import { BreakdownItem } from '../../../../../typings/ui_filters';
import { EuiSuperSelect } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import {
CLIENT_GEO_COUNTRY_ISO_CODE,
USER_AGENT_DEVICE,
USER_AGENT_NAME,
USER_AGENT_OS,
} from '../../../../../common/elasticsearch_fieldnames';
import { BreakdownItem } from '../../../../../typings/ui_filters';

interface Props {
id: string;
selectedBreakdowns: BreakdownItem[];
onBreakdownChange: (values: BreakdownItem[]) => void;
selectedBreakdown: BreakdownItem | null;
onBreakdownChange: (value: BreakdownItem | null) => void;
}

export function BreakdownFilter({
id,
selectedBreakdowns,
selectedBreakdown,
onBreakdownChange,
}: Props) {
const categories: BreakdownItem[] = [
const NO_BREAKDOWN = 'noBreakdown';

const items: BreakdownItem[] = [
{
name: 'Browser',
name: i18n.translate('xpack.apm.csm.breakDownFilter.noBreakdown', {
defaultMessage: 'No breakdown',
}),
fieldName: NO_BREAKDOWN,
type: 'category',
count: 0,
selected: selectedBreakdowns.some(({ name }) => name === 'Browser'),
fieldName: USER_AGENT_NAME,
},
{
name: 'OS',
name: i18n.translate('xpack.apm.csm.breakdownFilter.browser', {
defaultMessage: 'Browser',
}),
fieldName: USER_AGENT_NAME,
type: 'category',
count: 0,
selected: selectedBreakdowns.some(({ name }) => name === 'OS'),
fieldName: USER_AGENT_OS,
},
{
name: 'Device',
name: i18n.translate('xpack.apm.csm.breakdownFilter.os', {
defaultMessage: 'OS',
}),
fieldName: USER_AGENT_OS,
type: 'category',
count: 0,
selected: selectedBreakdowns.some(({ name }) => name === 'Device'),
fieldName: USER_AGENT_DEVICE,
},
{
name: 'Location',
name: i18n.translate('xpack.apm.csm.breakdownFilter.device', {
defaultMessage: 'Device',
}),
fieldName: USER_AGENT_DEVICE,
type: 'category',
count: 0,
selected: selectedBreakdowns.some(({ name }) => name === 'Location'),
},
{
name: i18n.translate('xpack.apm.csm.breakdownFilter.location', {
defaultMessage: 'Location',
}),
fieldName: CLIENT_GEO_COUNTRY_ISO_CODE,
type: 'category',
},
];

const options = items.map(({ name, fieldName }) => ({
inputDisplay: fieldName === NO_BREAKDOWN ? name : <strong>{name}</strong>,
value: fieldName,
dropdownDisplay: name,
}));

const onOptionChange = (value: string) => {
if (value === NO_BREAKDOWN) {
onBreakdownChange(null);
}
onBreakdownChange(items.find(({ fieldName }) => fieldName === value)!);
};

return (
<BreakdownGroup
id={id}
items={categories}
onChange={(selValues: BreakdownItem[]) => {
onBreakdownChange(selValues);
}}
<EuiSuperSelect
fullWidth
compressed
options={options}
valueOfSelected={selectedBreakdown?.fieldName ?? NO_BREAKDOWN}
onChange={(value) => onOptionChange(value)}
/>
);
}
Loading

0 comments on commit 6f3e35f

Please sign in to comment.