Skip to content

Commit

Permalink
Merge branch 'master' into feat/network-top-f-flow-search-strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Sep 4, 2020
2 parents c4d32fe + 95a0b55 commit 5d14220
Show file tree
Hide file tree
Showing 85 changed files with 3,191 additions and 579 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export class FlyoutCreateDrilldownAction implements ActionByType<typeof OPEN_FLY
viewMode={'create'}
dynamicActionManager={embeddable.enhancements.dynamicActions}
supportedTriggers={ensureNestedTriggers(embeddable.supportedTriggers())}
placeContext={{ embeddable }}
/>
),
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class FlyoutEditDrilldownAction implements ActionByType<typeof OPEN_FLYOU
viewMode={'manage'}
dynamicActionManager={embeddable.enhancements.dynamicActions}
supportedTriggers={ensureNestedTriggers(embeddable.supportedTriggers())}
placeContext={{ embeddable }}
/>
),
{
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/embeddable_enhanced/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"version": "kibana",
"server": false,
"ui": true,
"requiredPlugins": ["embeddable", "uiActionsEnhanced"]
"requiredPlugins": ["embeddable", "kibanaReact", "uiActions", "uiActionsEnhanced"],
"requiredBundles": ["kibanaUtils"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/

export declare const addAllExtensions: any;
export * from './url_drilldown';
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Basic url drilldown implementation

Url drilldown allows navigating to external URL or to internal kibana URL.
By using variables in url template result url can be dynamic and depend on user's interaction.

URL drilldown has 3 sources for variables:

- Global static variables like, for example, `kibanaUrl`. Such variables won’t change depending on a place where url drilldown is used.
- Context variables are dynamic and different depending on where drilldown is created and used.
- Event variables depend on a trigger context. These variables are dynamically extracted from the action context when drilldown is executed.

Difference between `event` and `context` variables, is that real `context` variables are available during drilldown creation (e.g. embeddable panel),
but `event` variables mapped from trigger context. Since there is no trigger context during drilldown creation, we have to provide some _mock_ variables for validating and previewing the URL.

In current implementation url drilldown has to be used inside the embeddable and with `ValueClickTrigger` or `RangeSelectTrigger`.

- `context` variables extracted from `embeddable`
- `event` variables extracted from `trigger` context

In future this basic url drilldown implementation would allow injecting more variables into `context` (e.g. `dashboard` app specific variables) and would allow providing support for new trigger types from outside.
This extensibility improvements are tracked here: https://github.com/elastic/kibana/issues/55324

In case a solution app has a use case for url drilldown that has to be different from current basic implementation and
just extending variables list is not enough, then recommendation is to create own custom url drilldown and reuse building blocks from `ui_actions_enhanced`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { i18n } from '@kbn/i18n';

export const txtUrlDrilldownDisplayName = i18n.translate(
'xpack.embeddableEnhanced.drilldowns.urlDrilldownDisplayName',
{
defaultMessage: 'Go to URL',
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export { UrlDrilldown } from './url_drilldown';
Loading

0 comments on commit 5d14220

Please sign in to comment.