Skip to content

Commit

Permalink
Merge branch 'alerting/created_at-and-updated_at' into alerting/clien…
Browse files Browse the repository at this point in the history
…t-types

* alerting/created_at-and-updated_at:
  updatedAt should equal createdAt on creation
  Move index patterns: src/legacy/core_plugins/data 👉 src/plugins/data (#53794)
  moved Task Manager server code under "server" directory (#53777)
  Rename `/api/security/oidc` to `/api/security/oidc/callback`. (#53886)
  Updating transitive dependencies to use [email protected] (#53899)
  [Reporting/Tests] consolidate functional test configs (#52671)
  [Reporting] Correct the docvalue_fields params in the search query Download CSV from Dashboard Panel (#52833)
  [Test/Newsfeed] Re-enable test and add news item to be filtered (#53905)
  cleanup server-log action (#53326)
  [Uptime] Delete uptime eslint rule skip (#50912)
  [skip-ci] Expression Lifecycle Docs (#51494)
  [Endpoint] add react router to endpoint app (#53808)
  [SIEM][Detection Engine] Silence 409 errors on signal creation (#53859)
  [Maps] get max_result_window and max_inner_result_window from index settings (#53500)
  [ML] New Platform server shim: update analytics routes to use new platform router (#53521)
  fixes typo on engine detection page (#53877)
  [Maps] push mapbox value extraction from VectorStyle and into DynamicStyleProperty (#53806)
  Fix suggested value for time_zone in range query (#53841)
  Clean up generic hooks, use react-use instead (#53822)
  • Loading branch information
gmmorris committed Jan 3, 2020
2 parents c4817e5 + cf24b03 commit b04189e
Show file tree
Hide file tree
Showing 267 changed files with 9,402 additions and 6,265 deletions.
7 changes: 0 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,6 @@ module.exports = {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['x-pack/legacy/plugins/uptime/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'react-hooks/rules-of-hooks': 'off',
},
},

/**
* Files that require Apache 2.0 headers, settings
Expand Down
261 changes: 261 additions & 0 deletions docs/canvas/canvas-expression-lifecycle.asciidoc

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/maps/maps-aggregations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ To enable top hits:
. Set *Entity* to the field that identifies entities in your documents.
This field will be used in the terms aggregation to group your documents into entity buckets.
. Set *Documents per entity* to configure the maximum number of documents accumulated per entity.
This setting is limited to the `index.max_inner_result_window` index setting, which defaults to 100.

[role="screenshot"]
image::maps/images/top_hits.png[]
Expand Down
2 changes: 1 addition & 1 deletion docs/maps/vector-layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ See map.regionmap.* in <<settings>> for details.
*Documents*:: Vector data from a Kibana index pattern.
The index must contain at least one field mapped as {ref}/geo-point.html[geo_point] or {ref}/geo-shape.html[geo_shape].

NOTE: Document results are limited to the first 10000 matching documents.
NOTE: Document results are limited to the `index.max_result_window` index setting, which defaults to 10000.
Use <<maps-aggregations, aggregations>> to plot large data sets.

*Grid aggregation*:: Geospatial data grouped in grids with metrics for each gridded cell.
Expand Down
4 changes: 3 additions & 1 deletion docs/user/canvas.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ include::{kib-repo-dir}/canvas/canvas-present-workpad.asciidoc[]

include::{kib-repo-dir}/canvas/canvas-share-workpad.asciidoc[]

include::{kib-repo-dir}/canvas/canvas-expression-lifecycle.asciidoc[]

include::{kib-repo-dir}/canvas/canvas-function-reference.asciidoc[]

include::{kib-repo-dir}/canvas/canvas-tinymath-functions.asciidoc[]
include::{kib-repo-dir}/canvas/canvas-tinymath-functions.asciidoc[]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
"react-resize-detector": "^4.2.0",
"react-router-dom": "^5.1.2",
"react-sizeme": "^2.3.6",
"react-use": "^13.10.2",
"react-use": "^13.13.0",
"reactcss": "1.2.3",
"redux": "4.0.0",
"redux-actions": "2.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ filters.range = {
gt: 1,
lte: 20,
lt: 20,
time_zone: '+1:00',
time_zone: '+01:00',
format: 'dd/MM/yyyy||yyyy',
execution: { __one_of: ['index', 'fielddata'] },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ export function queryDsl(api) {
__one_of: [true, false],
},
tie_breaker: 0,
time_zone: '+1:00',
time_zone: '+01:00',
},
simple_query_string: {
__template: {
Expand All @@ -493,7 +493,7 @@ export function queryDsl(api) {
gt: 10,
lte: 20,
lt: 20,
time_zone: '+1:00',
time_zone: '+01:00',
boost: 1.0,
format: 'dd/MM/yyyy||yyyy',
},
Expand Down
3 changes: 0 additions & 3 deletions src/legacy/core_plugins/data/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export function plugin() {

/** @public types */
export { DataStart };

export { Field, FieldType, IFieldList, IndexPattern } from './index_patterns';
export { EsQuerySortValue, FetchOptions, ISearchSource, SortDirection } from './search/types';
export { SearchSourceFields } from './search/types';
export {
Expand All @@ -41,5 +39,4 @@ export {
/** @public static code */
export * from '../common';
export { FilterStateManager } from './filter/filter_manager';
export { getFromSavedObject, getRoutes, flattenHitWrapper } from './index_patterns';
export { getRequestInspectorStats, getResponseInspectorStats } from './search';
33 changes: 0 additions & 33 deletions src/legacy/core_plugins/data/public/index_patterns/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import React from 'react';
import { shallow } from 'enzyme';
import { JsonCodeBlock } from './json_code_block';
import { IndexPattern } from 'ui/index_patterns';
import { IndexPattern } from '../../../../../plugins/data/public';

it('returns the `JsonCodeEditor` component', () => {
const props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/
import React from 'react';
import { mount } from 'enzyme';
import { IndexPattern } from 'ui/index_patterns';
// @ts-ignore
import { findTestSubject } from '@elastic/eui/lib/test';
import { flattenHitWrapper } from '../../../../data/public/';
import { DocViewTable } from './table';

import { IndexPattern, indexPatterns } from '../../../../../../plugins/data/public';

jest.mock('ui/new_platform');

// @ts-ignore
Expand Down Expand Up @@ -70,7 +70,7 @@ const indexPattern = {
formatHit: jest.fn(hit => hit._source),
} as IndexPattern;

indexPattern.flattenHit = flattenHitWrapper(indexPattern, indexPattern.metaFields);
indexPattern.flattenHit = indexPatterns.flattenHitWrapper(indexPattern, indexPattern.metaFields);

describe('DocViewTable at Discover', () => {
// At Discover's main view, all buttons are rendered
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ import {
unhashUrl,
VISUALIZE_EMBEDDABLE_TYPE,
} from '../legacy_imports';
import { FilterStateManager, IndexPattern } from '../../../../data/public';
import { Query, SavedQuery, IndexPatternsContract } from '../../../../../../plugins/data/public';
import { FilterStateManager } from '../../../../data/public';
import {
IndexPattern,
Query,
SavedQuery,
IndexPatternsContract,
} from '../../../../../../plugins/data/public';

import {
DashboardContainer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ const unmountComponentAtNode = jest.fn();

jest.doMock('react-dom', () => ({ render, unmountComponentAtNode }));

// If we don't mock this, Jest fails with the error `TypeError: Cannot redefine property: prototype
// at Function.defineProperties`.
jest.mock('ui/index_patterns', () => ({
INDEX_PATTERN_ILLEGAL_CHARACTERS: ['\\', '/', '?', '"', '<', '>', '|', ' '],
}));

jest.mock('ui/chrome', () => ({
getUiSettingsClient: () => ({
get: () => '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ const mockIndexPatternCreationType = {
checkIndicesForErrors: () => false,
getShowSystemIndices: () => false,
};
// If we don't mock this, Jest fails with the error `TypeError: Cannot redefine property: prototype
// at Function.defineProperties`.
jest.mock('ui/index_patterns', () => ({
INDEX_PATTERN_ILLEGAL_CHARACTERS: ['\\', '/', '?', '"', '<', '>', '|', ' '],
}));

jest.mock('ui/chrome', () => ({
getUiSettingsClient: () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { INDEX_PATTERN_ILLEGAL_CHARACTERS as ILLEGAL_CHARACTERS } from 'ui/index_patterns';
import { indexPatterns } from '../../../../../../../../../../plugins/data/public';
import { MAX_SEARCH_SIZE } from '../../constants';
import {
getIndices,
Expand Down Expand Up @@ -71,7 +71,7 @@ export class StepIndexPattern extends Component {
indexPatternName: indexPatternCreationType.getIndexPatternName(),
};

this.ILLEGAL_CHARACTERS = [...ILLEGAL_CHARACTERS];
this.ILLEGAL_CHARACTERS = [...indexPatterns.ILLEGAL_CHARACTERS];
this.lastQuery = null;
}

Expand Down Expand Up @@ -243,7 +243,7 @@ export class StepIndexPattern extends Component {
if (!query || !query.length || query === '.' || query === '..') {
// This is an error scenario but do not report an error
containsErrors = true;
} else if (containsIllegalCharacters(query, ILLEGAL_CHARACTERS)) {
} else if (containsIllegalCharacters(query, indexPatterns.ILLEGAL_CHARACTERS)) {
const errorMessage = i18n.translate(
'kbn.management.createIndexPattern.step.invalidCharactersErrorMessage',
{
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/ui/public/agg_types/agg_configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { TimeRange } from 'src/plugins/data/public';
import { Schema } from '../vis/editors/default/schemas';
import { AggConfig, AggConfigOptions } from './agg_config';
import { AggGroupNames } from '../vis/editors/default/agg_groups';
import { IndexPattern } from '../../../core_plugins/data/public';
import { IndexPattern } from '../../../../plugins/data/public';
import { ISearchSource, FetchOptions } from '../courier/types';

type Schemas = Record<string, any>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { IndexPattern } from 'ui/index_patterns';
import { IndexPattern } from '../../../../../plugins/data/public';
import { AggTypeFilters } from './agg_type_filters';
import { AggType } from '..';
import { AggConfig } from '../../vis';
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/ui/public/agg_types/filter/agg_type_filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { IndexPattern } from '../../index_patterns';
import { IndexPattern } from '../../../../../plugins/data/public';
import { AggConfig } from '../../vis';
import { AggType } from '..';

Expand Down
2 changes: 1 addition & 1 deletion src/legacy/ui/public/agg_types/param_types/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { FieldParamEditor } from '../../vis/editors/default/controls/field';
import { BaseParamType } from './base';
import { toastNotifications } from '../../notify';
import { propFilter } from '../filter';
import { Field, IFieldList } from '../../index_patterns';
import { Field, IFieldList } from '../../../../../plugins/data/public';

const filterByType = propFilter('type');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
* under the License.
*/

import { Field } from 'ui/index_patterns';
import { IndexedArray } from 'ui/indexed_array';
import { AggTypeFieldFilters } from './field_filters';
import { AggConfig } from 'ui/vis';
import { Field } from '../../../../../../plugins/data/public';

describe('AggTypeFieldFilters', () => {
let registry: AggTypeFieldFilters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
import { Field } from 'ui/index_patterns';
import { AggConfig } from '../../../vis';
import { Field } from '../../../../../../plugins/data/public';

type AggTypeFieldFilter = (field: Field, aggConfig: AggConfig) => boolean;

Expand Down
25 changes: 0 additions & 25 deletions src/legacy/ui/public/index_patterns/__mocks__/index.ts

This file was deleted.

40 changes: 0 additions & 40 deletions src/legacy/ui/public/index_patterns/index.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/legacy/ui/public/indices/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
* under the License.
*/

import { INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE } from '../../index_patterns';
import { indexPatterns } from '../../../../../plugins/data/public';

export const INDEX_ILLEGAL_CHARACTERS_VISIBLE = [...INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE, '*'];
export const INDEX_ILLEGAL_CHARACTERS_VISIBLE = [...indexPatterns.ILLEGAL_CHARACTERS_VISIBLE, '*'];

// Insert the comma into the middle, so it doesn't look as if it has grammatical meaning when
// these characters are rendered in the UI.
const insertionIndex = Math.floor(INDEX_PATTERN_ILLEGAL_CHARACTERS_VISIBLE.length / 2);
const insertionIndex = Math.floor(indexPatterns.ILLEGAL_CHARACTERS_VISIBLE.length / 2);
INDEX_ILLEGAL_CHARACTERS_VISIBLE.splice(insertionIndex, 0, ',');
2 changes: 1 addition & 1 deletion src/legacy/ui/public/registry/doc_views_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
import { IndexPattern } from 'src/legacy/core_plugins/data/public';
import { ComponentType } from 'react';
import { IScope } from 'angular';
import { IndexPattern } from '../../../../plugins/data/public';

export interface AngularDirective {
controller: (scope: AngularScope) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import _ from 'lodash';
import { EsResponse, SavedObject, SavedObjectConfig } from 'ui/saved_objects/types';
import { parseSearchSource } from 'ui/saved_objects/helpers/parse_search_source';
import { expandShorthand, SavedObjectNotFound } from '../../../../../plugins/kibana_utils/public';
import { IndexPattern } from '../../../../core_plugins/data/public';
import { IndexPattern } from '../../../../../plugins/data/public';

/**
* A given response of and ElasticSearch containing a plain saved object is applied to the given
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { TimeIntervalParam } from 'ui/vis/editors/config/types';
import { AggConfig } from '../..';
import { AggType } from '../../../agg_types';
import { IndexPattern } from '../../../index_patterns';
import { IndexPattern } from '../../../../../../plugins/data/public';
import { leastCommonMultiple } from '../../../utils/math';
import { parseEsInterval } from '../../../../../core_plugins/data/public';
import { leastCommonInterval } from '../../lib/least_common_interval';
Expand Down
Loading

0 comments on commit b04189e

Please sign in to comment.