Skip to content

Commit

Permalink
Merge branch 'master' into vega-version
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Jun 12, 2020
2 parents e721bfe + 679118b commit 2984386
Show file tree
Hide file tree
Showing 99 changed files with 1,089 additions and 5,982 deletions.
1 change: 1 addition & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ files:
- 'x-pack/plugins/maps/**/*.s+(a|c)ss'
- 'x-pack/plugins/spaces/**/*.s+(a|c)ss'
- 'x-pack/plugins/security/**/*.s+(a|c)ss'
- 'x-pack/plugins/monitoring/**/*.s+(a|c)ss'
ignore:
- 'x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
rules:
Expand Down
2 changes: 0 additions & 2 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ include::accessibility.asciidoc[]

include::limitations.asciidoc[]

include::release-notes/highlights.asciidoc[]

include::migration.asciidoc[]

include::CHANGELOG.asciidoc[]
Expand Down
2 changes: 1 addition & 1 deletion docs/migration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ your application from one version of Kibana to another.

* <<breaking-changes-8.0>>

See also <<release-highlights>> and <<release-notes>>.
See also <<whats-new>> and <<release-notes>>.
--

include::migration/migrate_8_0.asciidoc[]
2 changes: 1 addition & 1 deletion docs/migration/migrate_8_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ your application to Kibana 8.0.

coming[8.0.0]

See also <<release-highlights>> and <<release-notes>>.
See also <<whats-new>> and <<release-notes>>.

* <<breaking_80_index_pattern_changes>>
* <<breaking_80_setting_changes>>
Expand Down
17 changes: 0 additions & 17 deletions docs/release-notes/highlights-8.0.0.asciidoc

This file was deleted.

13 changes: 0 additions & 13 deletions docs/release-notes/highlights.asciidoc

This file was deleted.

6 changes: 4 additions & 2 deletions docs/setup/docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,16 @@ services:
[[environment-variable-config]]
==== Environment variable configuration

Under Docker, Kibana can be configured via environment variables. When
Under Docker, {kib} can be configured via environment variables. When
the container starts, a helper process checks the environment for variables that
can be mapped to Kibana command-line arguments.

For compatibility with container orchestration systems, these
environment variables are written in all capitals, with underscores as
word separators. The helper translates these names to valid
Kibana setting names.
{kib} setting names.

WARNING: All information that you include in environment variables is visible through the `ps` command, including sensitive information.

Some example translations are shown here:

Expand Down
2 changes: 2 additions & 0 deletions docs/user/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include::introduction.asciidoc[]

include::whats-new.asciidoc[]

include::getting-started.asciidoc[]

include::setup.asciidoc[]
Expand Down
14 changes: 14 additions & 0 deletions docs/user/whats-new.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[whats-new]]
== What's new in 8.0

This section summarizes the most important changes in each release. For the
full list, see <<release-notes>> and <<breaking-changes>>.

coming[8.0.0]

//NOTE: The notable-highlights tagged regions are re-used in the
//Installation and Upgrade Guide

// tag::notable-highlights[]

// end::notable-highlights[]
64 changes: 33 additions & 31 deletions test/functional/apps/context/_discover_navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,52 +31,54 @@ export default function ({ getService, getPageObjects }) {
const filterBar = getService('filterBar');
const PageObjects = getPageObjects(['common', 'discover', 'timePicker']);

// FLAKY: https://github.com/elastic/kibana/issues/53308
describe.skip('context link in discover', function contextSize() {
before(async function () {
describe('context link in discover', () => {
before(async () => {
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await PageObjects.common.navigateToApp('discover');
await PageObjects.timePicker.setDefaultAbsoluteRange();
await Promise.all(
TEST_COLUMN_NAMES.map((columnName) =>
PageObjects.discover.clickFieldListItemAdd(columnName)
)
);

for (const columnName of TEST_COLUMN_NAMES) {
await PageObjects.discover.clickFieldListItemAdd(columnName);
}

for (const [columnName, value] of TEST_FILTER_COLUMN_NAMES) {
await PageObjects.discover.clickFieldListItem(columnName);
await PageObjects.discover.clickFieldListPlusFilter(columnName, value);
}
});
after(async () => {
await PageObjects.timePicker.resetDefaultAbsoluteRangeViaUiSettings();
});

it('should open the context view with the selected document as anchor', async function () {
// get the timestamp of the first row
const firstTimestamp = (await docTable.getFields())[0][0];

// navigate to the context view
await docTable.clickRowToggle({ rowIndex: 0 });
await (await docTable.getRowActions({ rowIndex: 0 }))[0].click();

it('should open the context view with the selected document as anchor', async () => {
// check the anchor timestamp in the context view
await retry.try(async () => {
const anchorTimestamp = (await docTable.getFields({ isAnchorRow: true }))[0][0];
expect(anchorTimestamp).to.equal(firstTimestamp);
await retry.waitFor('selected document timestamp matches anchor timestamp ', async () => {
// get the timestamp of the first row
const discoverFields = await docTable.getFields();
const firstTimestamp = discoverFields[0][0];

// navigate to the context view
await docTable.clickRowToggle({ rowIndex: 0 });
const rowActions = await docTable.getRowActions({ rowIndex: 0 });
await rowActions[0].click();
const contextFields = await docTable.getFields({ isAnchorRow: true });
const anchorTimestamp = contextFields[0][0];
return anchorTimestamp === firstTimestamp;
});
});

it('should open the context view with the same columns', async function () {
it('should open the context view with the same columns', async () => {
const columnNames = await docTable.getHeaderFields();
expect(columnNames).to.eql(['Time', ...TEST_COLUMN_NAMES]);
});

it('should open the context view with the filters disabled', async function () {
const hasDisabledFilters = (
await Promise.all(
TEST_FILTER_COLUMN_NAMES.map(([columnName, value]) =>
filterBar.hasFilter(columnName, value, false)
)
)
).reduce((result, hasDisabledFilter) => result && hasDisabledFilter, true);

expect(hasDisabledFilters).to.be(true);
it('should open the context view with the filters disabled', async () => {
let disabledFilterCounter = 0;
for (const [columnName, value] of TEST_FILTER_COLUMN_NAMES) {
if (await filterBar.hasFilter(columnName, value, false)) {
disabledFilterCounter++;
}
}
expect(disabledFilterCounter).to.be(TEST_FILTER_COLUMN_NAMES.length);
});
});
}
16 changes: 16 additions & 0 deletions test/functional/page_objects/time_picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function TimePickerProvider({ getService, getPageObjects }: FtrProviderCo
const browser = getService('browser');
const testSubjects = getService('testSubjects');
const { header, common } = getPageObjects(['header', 'common']);
const kibanaServer = getService('kibanaServer');

type CommonlyUsed =
| 'Today'
Expand All @@ -44,11 +45,26 @@ export function TimePickerProvider({ getService, getPageObjects }: FtrProviderCo
class TimePicker {
defaultStartTime = 'Sep 19, 2015 @ 06:31:44.000';
defaultEndTime = 'Sep 23, 2015 @ 18:31:44.000';
defaultStartTimeUTC = '2015-09-18T06:31:44.000Z';
defaultEndTimeUTC = '2015-09-23T18:31:44.000Z';

async setDefaultAbsoluteRange() {
await this.setAbsoluteRange(this.defaultStartTime, this.defaultEndTime);
}

/**
* the provides a quicker way to set the timepicker to the default range, saves a few seconds
*/
async setDefaultAbsoluteRangeViaUiSettings() {
await kibanaServer.uiSettings.update({
'timepicker:timeDefaults': `{ "from": "${this.defaultStartTimeUTC}", "to": "${this.defaultEndTimeUTC}"}`,
});
}

async resetDefaultAbsoluteRangeViaUiSettings() {
await kibanaServer.uiSettings.replace({});
}

private async getTimePickerPanel() {
return await find.byCssSelector('div.euiPopover__panel-isOpen');
}
Expand Down
3 changes: 3 additions & 0 deletions x-pack/plugins/maps/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ export enum ES_GEO_FIELD_TYPE {
GEO_SHAPE = 'geo_shape',
}

// Using strings instead of ES_GEO_FIELD_TYPE enum to avoid typeing errors where IFieldType.type is compared to value
export const ES_GEO_FIELD_TYPES = ['geo_point', 'geo_shape'];

export enum ES_SPATIAL_RELATIONS {
INTERSECTS = 'INTERSECTS',
DISJOINT = 'DISJOINT',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,25 @@ import _ from 'lodash';
import React, { Fragment, Component } from 'react';
import PropTypes from 'prop-types';

import { ES_GEO_FIELD_TYPES } from '../../../../common/constants';
import { SingleFieldSelect } from '../../../components/single_field_select';
import { getIndexPatternService, getIndexPatternSelectComponent } from '../../../kibana_services';
import { NoIndexPatternCallout } from '../../../components/no_index_pattern_callout';
import { i18n } from '@kbn/i18n';

import { EuiFormRow, EuiSpacer } from '@elastic/eui';
import { getAggregatableGeoFieldTypes, getFieldsWithGeoTileAgg } from '../../../index_pattern_util';
import {
getFieldsWithGeoTileAgg,
getGeoFields,
getGeoTileAggNotSupportedReason,
supportsGeoTileAgg,
} from '../../../index_pattern_util';
import { RenderAsSelect } from './render_as_select';

function doesNotSupportGeoTileAgg(field) {
return !supportsGeoTileAgg(field);
}

export class CreateSourceEditor extends Component {
static propTypes = {
onSourceConfigChange: PropTypes.func.isRequired,
Expand Down Expand Up @@ -87,9 +97,9 @@ export class CreateSourceEditor extends Component {
});

//make default selection
const geoFields = getFieldsWithGeoTileAgg(indexPattern.fields);
if (geoFields[0]) {
this._onGeoFieldSelect(geoFields[0].name);
const geoFieldsWithGeoTileAgg = getFieldsWithGeoTileAgg(indexPattern.fields);
if (geoFieldsWithGeoTileAgg[0]) {
this._onGeoFieldSelect(geoFieldsWithGeoTileAgg[0].name);
}
}, 300);

Expand Down Expand Up @@ -141,10 +151,10 @@ export class CreateSourceEditor extends Component {
value={this.state.geoField}
onChange={this._onGeoFieldSelect}
fields={
this.state.indexPattern
? getFieldsWithGeoTileAgg(this.state.indexPattern.fields)
: undefined
this.state.indexPattern ? getGeoFields(this.state.indexPattern.fields) : undefined
}
isFieldDisabled={doesNotSupportGeoTileAgg}
getFieldDisabledReason={getGeoTileAggNotSupportedReason}
/>
</EuiFormRow>
);
Expand Down Expand Up @@ -176,7 +186,7 @@ export class CreateSourceEditor extends Component {
placeholder={i18n.translate('xpack.maps.source.esGeoGrid.indexPatternPlaceholder', {
defaultMessage: 'Select index pattern',
})}
fieldTypes={getAggregatableGeoFieldTypes()}
fieldTypes={ES_GEO_FIELD_TYPES}
onNoIndexPatterns={this._onNoIndexPatterns}
/>
</EuiFormRow>
Expand Down
Loading

0 comments on commit 2984386

Please sign in to comment.