From c24b17f334fed777f65d34ddae104c80be3ec9c9 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Wed, 5 Aug 2020 10:49:36 +0200 Subject: [PATCH 01/34] [Discover] Inline noWhiteSpace function (#74331) * Inline noWhiteSpace function * Fix TypeScript * Remove unused function file --- .../kibana/common/utils/no_white_space.js | 37 ------------------- .../angular/doc_table/components/table_row.ts | 21 +++++++---- 2 files changed, 14 insertions(+), 44 deletions(-) delete mode 100644 src/legacy/core_plugins/kibana/common/utils/no_white_space.js diff --git a/src/legacy/core_plugins/kibana/common/utils/no_white_space.js b/src/legacy/core_plugins/kibana/common/utils/no_white_space.js deleted file mode 100644 index 580418eb3423f..0000000000000 --- a/src/legacy/core_plugins/kibana/common/utils/no_white_space.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -const TAGS_WITH_WS = />\s+<'); -} diff --git a/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts b/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts index 7b862ec518a04..e7fafde2e68d0 100644 --- a/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts +++ b/src/plugins/discover/public/application/angular/doc_table/components/table_row.ts @@ -17,13 +17,10 @@ * under the License. */ -import _ from 'lodash'; +import { find, template } from 'lodash'; import $ from 'jquery'; -// @ts-ignore import rison from 'rison-node'; import '../../doc_viewer'; -// @ts-ignore -import { noWhiteSpace } from '../../../../../../../legacy/core_plugins/kibana/common/utils/no_white_space'; import openRowHtml from './table_row/open.html'; import detailsHtml from './table_row/details.html'; @@ -35,6 +32,16 @@ import truncateByHeightTemplateHtml from '../components/table_row/truncate_by_he import { esFilters } from '../../../../../../data/public'; import { getServices } from '../../../../kibana_services'; +const TAGS_WITH_WS = />\s+<'); +} + // guesstimate at the minimum number of chars wide cells in the table should be const MIN_LINE_LENGTH = 20; @@ -43,8 +50,8 @@ interface LazyScope extends ng.IScope { } export function createTableRowDirective($compile: ng.ICompileService, $httpParamSerializer: any) { - const cellTemplate = _.template(noWhiteSpace(cellTemplateHtml)); - const truncateByHeightTemplate = _.template(noWhiteSpace(truncateByHeightTemplateHtml)); + const cellTemplate = template(noWhiteSpace(cellTemplateHtml)); + const truncateByHeightTemplate = template(noWhiteSpace(truncateByHeightTemplateHtml)); return { restrict: 'A', @@ -169,7 +176,7 @@ export function createTableRowDirective($compile: ng.ICompileService, $httpParam const $cell = $cells.eq(i); if ($cell.data('discover:html') === html) return; - const reuse = _.find($cells.slice(i + 1), function (cell: any) { + const reuse = find($cells.slice(i + 1), function (cell: any) { return $.data(cell, 'discover:html') === html; }); From 22d6f09d317b54cf2832ec4cac51df42db17c28f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez?= Date: Wed, 5 Aug 2020 11:19:41 +0200 Subject: [PATCH 02/34] [Logs UI] Correct trial period duration in anomaly splash screen (#74249) --- .../logging/log_analysis_setup/subscription_splash_content.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/infra/public/components/logging/log_analysis_setup/subscription_splash_content.tsx b/x-pack/plugins/infra/public/components/logging/log_analysis_setup/subscription_splash_content.tsx index e0e293b1cc3e7..81f52f986cab8 100644 --- a/x-pack/plugins/infra/public/components/logging/log_analysis_setup/subscription_splash_content.tsx +++ b/x-pack/plugins/infra/public/components/logging/log_analysis_setup/subscription_splash_content.tsx @@ -61,7 +61,7 @@ export const SubscriptionSplashContent: React.FC = () => { description = ( ); From beb7b8245d0b28662a988efb6c856af8fb35d280 Mon Sep 17 00:00:00 2001 From: John Schulz Date: Wed, 5 Aug 2020 07:08:04 -0400 Subject: [PATCH 03/34] [Ingest Manager] prevent crash on unhandled rejection from setupIngestManager (#74300) * Add test to ensure setup rejects if errors thrown. * Return the promise from setup so test passes --- .../server/services/setup.test.ts | 44 +++++++++++++++++++ .../ingest_manager/server/services/setup.ts | 5 +++ 2 files changed, 49 insertions(+) create mode 100644 x-pack/plugins/ingest_manager/server/services/setup.test.ts diff --git a/x-pack/plugins/ingest_manager/server/services/setup.test.ts b/x-pack/plugins/ingest_manager/server/services/setup.test.ts new file mode 100644 index 0000000000000..474b2fde23c81 --- /dev/null +++ b/x-pack/plugins/ingest_manager/server/services/setup.test.ts @@ -0,0 +1,44 @@ +/* + * 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 { setupIngestManager } from './setup'; +import { savedObjectsClientMock } from 'src/core/server/mocks'; + +describe('setupIngestManager', () => { + it('returned promise should reject if errors thrown', async () => { + const { savedObjectsClient, callClusterMock } = makeErrorMocks(); + const setupPromise = setupIngestManager(savedObjectsClient, callClusterMock); + await expect(setupPromise).rejects.toThrow('mocked'); + }); +}); + +function makeErrorMocks() { + jest.mock('./app_context'); // else fails w/"Logger not set." + jest.mock('./epm/registry/registry_url', () => { + return { + fetchUrl: () => { + throw new Error('mocked registry#fetchUrl'); + }, + }; + }); + + const callClusterMock = jest.fn(); + const savedObjectsClient = savedObjectsClientMock.create(); + savedObjectsClient.find = jest.fn().mockImplementation(() => { + throw new Error('mocked SO#find'); + }); + savedObjectsClient.get = jest.fn().mockImplementation(() => { + throw new Error('mocked SO#get'); + }); + savedObjectsClient.update = jest.fn().mockImplementation(() => { + throw new Error('mocked SO#update'); + }); + + return { + savedObjectsClient, + callClusterMock, + }; +} diff --git a/x-pack/plugins/ingest_manager/server/services/setup.ts b/x-pack/plugins/ingest_manager/server/services/setup.ts index c91cae98e17d2..4ef093d38879a 100644 --- a/x-pack/plugins/ingest_manager/server/services/setup.ts +++ b/x-pack/plugins/ingest_manager/server/services/setup.ts @@ -127,6 +127,11 @@ export async function setupIngestManager( // if anything errors, reject/fail onSetupReject(error); } + + // be sure to return the promise because it has the resolved/rejected status attached to it + // otherwise, we effectively return success every time even if there are errors + // because `return undefined` -> `Promise.resolve(undefined)` in an `async` function + return setupIngestStatus; } export async function setupFleet( From 8231b0ccfc12f9756dedf16ba7c36d8dcae0769a Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Wed, 5 Aug 2020 13:18:29 +0200 Subject: [PATCH 04/34] [ML] Fix initial plugin's bundle size (#74047) * [ML] use dynamic imports * [ML] fix react-use imports * [ML] change embeddables imports * [ML] embeddable exports * [ML] move SCSS import * [ML] management page styles * [ML] refactor with types and constants files * [ML] move declarations --- .../plugins/ml/public/application/_index.scss | 6 -- x-pack/plugins/ml/public/application/app.tsx | 1 + .../components/data_grid/use_column_chart.tsx | 2 +- .../explorer/add_to_dashboard_control.tsx | 6 +- .../explorer/swimlane_container.tsx | 7 +- .../public/application/management/_index.scss | 1 - .../management/jobs_list/_index.scss | 5 +- .../application/management/jobs_list/index.ts | 1 + .../application/routing/routes/jobs_list.tsx | 2 +- .../routing/routes/timeseriesexplorer.tsx | 2 +- .../public/application/routing/use_refresh.ts | 2 +- .../public/application/util/string_utils.ts | 4 +- .../anomaly_swimlane_embeddable.tsx | 74 +++---------------- ...omaly_swimlane_embeddable_factory.test.tsx | 6 +- .../anomaly_swimlane_embeddable_factory.ts | 28 ++++--- .../anomaly_swimlane_initializer.tsx | 2 +- .../anomaly_swimlane_setup_flyout.tsx | 6 +- .../embeddable_swim_lane_container.test.tsx | 7 +- .../embeddable_swim_lane_container.tsx | 16 ++-- .../embeddables/anomaly_swimlane/index.ts | 1 - .../swimlane_input_resolver.test.ts | 5 +- .../swimlane_input_resolver.ts | 10 +-- .../ml/public/embeddables/constants.ts | 7 ++ x-pack/plugins/ml/public/embeddables/index.ts | 3 + x-pack/plugins/ml/public/embeddables/types.ts | 66 +++++++++++++++++ x-pack/plugins/ml/public/index.scss | 1 - x-pack/plugins/ml/public/index.ts | 1 - x-pack/plugins/ml/public/plugin.ts | 25 +++---- .../apply_influencer_filters_action.tsx | 7 +- .../ui_actions/apply_time_range_action.tsx | 7 +- .../ui_actions/edit_swimlane_panel_action.tsx | 16 ++-- x-pack/plugins/ml/public/ui_actions/index.ts | 10 ++- .../open_in_anomaly_explorer_action.tsx | 7 +- x-pack/plugins/ml/public/url_generator.ts | 12 ++- 34 files changed, 180 insertions(+), 176 deletions(-) delete mode 100644 x-pack/plugins/ml/public/application/management/_index.scss create mode 100644 x-pack/plugins/ml/public/embeddables/constants.ts create mode 100644 x-pack/plugins/ml/public/embeddables/types.ts delete mode 100644 x-pack/plugins/ml/public/index.scss diff --git a/x-pack/plugins/ml/public/application/_index.scss b/x-pack/plugins/ml/public/application/_index.scss index 65e914a1ac923..45b14543946c7 100644 --- a/x-pack/plugins/ml/public/application/_index.scss +++ b/x-pack/plugins/ml/public/application/_index.scss @@ -1,11 +1,6 @@ // ML has it's own variables for coloring @import 'variables'; -// Kibana management page ML section -#kibanaManagementMLSection { - @import 'management/index'; -} - // Protect the rest of Kibana from ML generic namespacing // SASSTODO: Prefix ml selectors instead .ml-app { @@ -24,7 +19,6 @@ // Components @import 'components/annotations/annotation_description_list/index'; // SASSTODO: This file overwrites EUI directly @import 'components/anomalies_table/index'; // SASSTODO: This file overwrites EUI directly - @import 'components/chart_tooltip/index'; @import 'components/color_range_legend/index'; @import 'components/controls/index'; @import 'components/entity_cell/index'; diff --git a/x-pack/plugins/ml/public/application/app.tsx b/x-pack/plugins/ml/public/application/app.tsx index cc3af9d7f4980..42c462fa9d869 100644 --- a/x-pack/plugins/ml/public/application/app.tsx +++ b/x-pack/plugins/ml/public/application/app.tsx @@ -5,6 +5,7 @@ */ import React, { FC } from 'react'; +import './_index.scss'; import ReactDOM from 'react-dom'; import { AppMountParameters, CoreStart, HttpStart } from 'kibana/public'; diff --git a/x-pack/plugins/ml/public/application/components/data_grid/use_column_chart.tsx b/x-pack/plugins/ml/public/application/components/data_grid/use_column_chart.tsx index a762c44e243bf..6b5fbbb22120d 100644 --- a/x-pack/plugins/ml/public/application/components/data_grid/use_column_chart.tsx +++ b/x-pack/plugins/ml/public/application/components/data_grid/use_column_chart.tsx @@ -8,7 +8,7 @@ import moment from 'moment'; import { BehaviorSubject } from 'rxjs'; import React from 'react'; -import { useObservable } from 'react-use'; +import useObservable from 'react-use/lib/useObservable'; import { euiPaletteColorBlind, EuiDataGridColumn } from '@elastic/eui'; diff --git a/x-pack/plugins/ml/public/application/explorer/add_to_dashboard_control.tsx b/x-pack/plugins/ml/public/application/explorer/add_to_dashboard_control.tsx index 3ad749c9d0631..04ce7f79e1c02 100644 --- a/x-pack/plugins/ml/public/application/explorer/add_to_dashboard_control.tsx +++ b/x-pack/plugins/ml/public/application/explorer/add_to_dashboard_control.tsx @@ -25,13 +25,11 @@ import { EuiInMemoryTable } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { useMlKibana } from '../contexts/kibana'; import { SavedObjectDashboard } from '../../../../../../src/plugins/dashboard/public'; -import { - ANOMALY_SWIMLANE_EMBEDDABLE_TYPE, - getDefaultPanelTitle, -} from '../../embeddables/anomaly_swimlane/anomaly_swimlane_embeddable'; +import { getDefaultPanelTitle } from '../../embeddables/anomaly_swimlane/anomaly_swimlane_embeddable'; import { useDashboardService } from '../services/dashboard_service'; import { SWIMLANE_TYPE, SwimlaneType } from './explorer_constants'; import { JobId } from '../../../common/types/anomaly_detection_jobs'; +import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE } from '../../embeddables'; export interface DashboardItem { id: string; diff --git a/x-pack/plugins/ml/public/application/explorer/swimlane_container.tsx b/x-pack/plugins/ml/public/application/explorer/swimlane_container.tsx index 51ea0f00d5f6a..0fefa71dea48b 100644 --- a/x-pack/plugins/ml/public/application/explorer/swimlane_container.tsx +++ b/x-pack/plugins/ml/public/application/explorer/swimlane_container.tsx @@ -15,12 +15,9 @@ import { } from '@elastic/eui'; import { throttle } from 'lodash'; -import { - ExplorerSwimlane, - ExplorerSwimlaneProps, -} from '../../application/explorer/explorer_swimlane'; +import { ExplorerSwimlane, ExplorerSwimlaneProps } from './explorer_swimlane'; -import { MlTooltipComponent } from '../../application/components/chart_tooltip'; +import { MlTooltipComponent } from '../components/chart_tooltip'; import { SwimLanePagination } from './swimlane_pagination'; import { SWIMLANE_TYPE } from './explorer_constants'; import { ViewBySwimLaneData } from './explorer_utils'; diff --git a/x-pack/plugins/ml/public/application/management/_index.scss b/x-pack/plugins/ml/public/application/management/_index.scss deleted file mode 100644 index e14df2d7c2039..0000000000000 --- a/x-pack/plugins/ml/public/application/management/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'jobs_list/index'; diff --git a/x-pack/plugins/ml/public/application/management/jobs_list/_index.scss b/x-pack/plugins/ml/public/application/management/jobs_list/_index.scss index 841415620d691..d4928a4126c1b 100644 --- a/x-pack/plugins/ml/public/application/management/jobs_list/_index.scss +++ b/x-pack/plugins/ml/public/application/management/jobs_list/_index.scss @@ -1 +1,4 @@ -@import 'components/index'; +// Kibana management page ML section +#kibanaManagementMLSection { + @import 'components/index'; +} diff --git a/x-pack/plugins/ml/public/application/management/jobs_list/index.ts b/x-pack/plugins/ml/public/application/management/jobs_list/index.ts index b16f680a2a362..81190a412abc0 100644 --- a/x-pack/plugins/ml/public/application/management/jobs_list/index.ts +++ b/x-pack/plugins/ml/public/application/management/jobs_list/index.ts @@ -12,6 +12,7 @@ import { MlStartDependencies } from '../../../plugin'; import { JobsListPage } from './components'; import { getJobsListBreadcrumbs } from '../breadcrumbs'; import { setDependencyCache, clearCache } from '../../util/dependency_cache'; +import './_index.scss'; const renderApp = (element: HTMLElement, coreStart: CoreStart) => { ReactDOM.render(React.createElement(JobsListPage, { coreStart }), element); diff --git a/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx b/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx index db58b6a537e06..38a7900916ba8 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/jobs_list.tsx @@ -5,7 +5,7 @@ */ import React, { useEffect, FC } from 'react'; -import { useObservable } from 'react-use'; +import useObservable from 'react-use/lib/useObservable'; import { i18n } from '@kbn/i18n'; import { NavigateToPath } from '../../contexts/kibana'; diff --git a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx index 6486db818e113..1f122ed18a851 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer.tsx @@ -6,7 +6,7 @@ import { isEqual } from 'lodash'; import React, { FC, useCallback, useEffect, useState } from 'react'; -import { usePrevious } from 'react-use'; +import usePrevious from 'react-use/lib/usePrevious'; import moment from 'moment'; import { i18n } from '@kbn/i18n'; diff --git a/x-pack/plugins/ml/public/application/routing/use_refresh.ts b/x-pack/plugins/ml/public/application/routing/use_refresh.ts index 539ce6f88a421..332677e3c5796 100644 --- a/x-pack/plugins/ml/public/application/routing/use_refresh.ts +++ b/x-pack/plugins/ml/public/application/routing/use_refresh.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { useObservable } from 'react-use'; +import useObservable from 'react-use/lib/useObservable'; import { merge } from 'rxjs'; import { map } from 'rxjs/operators'; diff --git a/x-pack/plugins/ml/public/application/util/string_utils.ts b/x-pack/plugins/ml/public/application/util/string_utils.ts index 55dd16082a07c..88900c8b0ce71 100644 --- a/x-pack/plugins/ml/public/application/util/string_utils.ts +++ b/x-pack/plugins/ml/public/application/util/string_utils.ts @@ -7,7 +7,6 @@ /* * Contains utility functions for performing operations on Strings. */ -import _ from 'lodash'; import d3 from 'd3'; import he from 'he'; @@ -28,7 +27,8 @@ export function replaceStringTokens( ) { return String(str).replace(/\$([^?&$\'"]+)\$/g, (match, name) => { // Use lodash get to allow nested JSON fields to be retrieved. - let tokenValue = _.get(valuesByTokenName, name, null); + let tokenValue = + valuesByTokenName && valuesByTokenName[name] !== undefined ? valuesByTokenName[name] : null; if (encodeForURI === true && tokenValue !== null) { tokenValue = encodeURIComponent(tokenValue); } diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx index 9f96b73d67c57..e837cabf0b494 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx @@ -9,29 +9,17 @@ import ReactDOM from 'react-dom'; import { CoreStart } from 'kibana/public'; import { i18n } from '@kbn/i18n'; import { Subject } from 'rxjs'; -import { - Embeddable, - EmbeddableInput, - EmbeddableOutput, - IContainer, - IEmbeddable, -} from '../../../../../../src/plugins/embeddable/public'; +import { Embeddable, IContainer } from '../../../../../../src/plugins/embeddable/public'; import { EmbeddableSwimLaneContainer } from './embeddable_swim_lane_container'; -import { AnomalyDetectorService } from '../../application/services/anomaly_detector_service'; import { JobId } from '../../../common/types/anomaly_detection_jobs'; -import { AnomalyTimelineService } from '../../application/services/anomaly_timeline_service'; -import { - Filter, - Query, - RefreshInterval, - TimeRange, -} from '../../../../../../src/plugins/data/common'; -import { SwimlaneType } from '../../application/explorer/explorer_constants'; import { MlDependencies } from '../../application/app'; -import { AppStateSelectedCells } from '../../application/explorer/explorer_utils'; -import { SWIM_LANE_SELECTION_TRIGGER } from '../../ui_actions/triggers'; - -export const ANOMALY_SWIMLANE_EMBEDDABLE_TYPE = 'ml_anomaly_swimlane'; +import { SWIM_LANE_SELECTION_TRIGGER } from '../../ui_actions'; +import { + ANOMALY_SWIMLANE_EMBEDDABLE_TYPE, + AnomalySwimlaneEmbeddableInput, + AnomalySwimlaneEmbeddableOutput, + AnomalySwimlaneServices, +} from '..'; export const getDefaultPanelTitle = (jobIds: JobId[]) => i18n.translate('xpack.ml.swimlaneEmbeddable.title', { @@ -39,51 +27,7 @@ export const getDefaultPanelTitle = (jobIds: JobId[]) => values: { jobIds: jobIds.join(', ') }, }); -export interface AnomalySwimlaneEmbeddableCustomInput { - jobIds: JobId[]; - swimlaneType: SwimlaneType; - viewBy?: string; - perPage?: number; - - // Embeddable inputs which are not included in the default interface - filters: Filter[]; - query: Query; - refreshConfig: RefreshInterval; - timeRange: TimeRange; -} - -export interface EditSwimlanePanelContext { - embeddable: IEmbeddable; -} - -export interface SwimLaneDrilldownContext extends EditSwimlanePanelContext { - /** - * Optional data provided by swim lane selection - */ - data?: AppStateSelectedCells; -} - -export type AnomalySwimlaneEmbeddableInput = EmbeddableInput & AnomalySwimlaneEmbeddableCustomInput; - -export type AnomalySwimlaneEmbeddableOutput = EmbeddableOutput & - AnomalySwimlaneEmbeddableCustomOutput; - -export interface AnomalySwimlaneEmbeddableCustomOutput { - perPage?: number; - fromPage?: number; - interval?: number; -} - -export interface AnomalySwimlaneServices { - anomalyDetectorService: AnomalyDetectorService; - anomalyTimelineService: AnomalyTimelineService; -} - -export type AnomalySwimlaneEmbeddableServices = [ - CoreStart, - MlDependencies, - AnomalySwimlaneServices -]; +export type IAnomalySwimlaneEmbeddable = typeof AnomalySwimlaneEmbeddable; export class AnomalySwimlaneEmbeddable extends Embeddable< AnomalySwimlaneEmbeddableInput, diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.test.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.test.tsx index 243369982ac1f..12813ad6277aa 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.test.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.test.tsx @@ -7,10 +7,8 @@ import { AnomalySwimlaneEmbeddableFactory } from './anomaly_swimlane_embeddable_factory'; import { coreMock } from '../../../../../../src/core/public/mocks'; import { dataPluginMock } from '../../../../../../src/plugins/data/public/mocks'; -import { - AnomalySwimlaneEmbeddable, - AnomalySwimlaneEmbeddableInput, -} from './anomaly_swimlane_embeddable'; +import { AnomalySwimlaneEmbeddable } from './anomaly_swimlane_embeddable'; +import { AnomalySwimlaneEmbeddableInput } from '..'; jest.mock('./anomaly_swimlane_embeddable', () => ({ AnomalySwimlaneEmbeddable: jest.fn(), diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.ts b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.ts index 14fbf77544b21..9d2fd07e11be5 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.ts +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.ts @@ -10,23 +10,16 @@ import { StartServicesAccessor } from 'kibana/public'; import { EmbeddableFactoryDefinition, - ErrorEmbeddable, IContainer, } from '../../../../../../src/plugins/embeddable/public'; +import { HttpService } from '../../application/services/http_service'; +import { MlPluginStart, MlStartDependencies } from '../../plugin'; +import { MlDependencies } from '../../application/app'; import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE, - AnomalySwimlaneEmbeddable, AnomalySwimlaneEmbeddableInput, AnomalySwimlaneEmbeddableServices, -} from './anomaly_swimlane_embeddable'; -import { HttpService } from '../../application/services/http_service'; -import { AnomalyDetectorService } from '../../application/services/anomaly_detector_service'; -import { AnomalyTimelineService } from '../../application/services/anomaly_timeline_service'; -import { mlResultsServiceProvider } from '../../application/services/results_service'; -import { resolveAnomalySwimlaneUserInput } from './anomaly_swimlane_setup_flyout'; -import { mlApiServicesProvider } from '../../application/services/ml_api_service'; -import { MlPluginStart, MlStartDependencies } from '../../plugin'; -import { MlDependencies } from '../../application/app'; +} from '..'; export class AnomalySwimlaneEmbeddableFactory implements EmbeddableFactoryDefinition { @@ -50,6 +43,7 @@ export class AnomalySwimlaneEmbeddableFactory const [coreStart] = await this.getServices(); try { + const { resolveAnomalySwimlaneUserInput } = await import('./anomaly_swimlane_setup_flyout'); return await resolveAnomalySwimlaneUserInput(coreStart); } catch (e) { return Promise.reject(); @@ -59,6 +53,15 @@ export class AnomalySwimlaneEmbeddableFactory private async getServices(): Promise { const [coreStart, pluginsStart] = await this.getStartServices(); + const { AnomalyDetectorService } = await import( + '../../application/services/anomaly_detector_service' + ); + const { AnomalyTimelineService } = await import( + '../../application/services/anomaly_timeline_service' + ); + const { mlApiServicesProvider } = await import('../../application/services/ml_api_service'); + const { mlResultsServiceProvider } = await import('../../application/services/results_service'); + const httpService = new HttpService(coreStart.http); const anomalyDetectorService = new AnomalyDetectorService(httpService); const anomalyTimelineService = new AnomalyTimelineService( @@ -77,8 +80,9 @@ export class AnomalySwimlaneEmbeddableFactory public async create( initialInput: AnomalySwimlaneEmbeddableInput, parent?: IContainer - ): Promise { + ): Promise { const services = await this.getServices(); + const { AnomalySwimlaneEmbeddable } = await import('./anomaly_swimlane_embeddable'); return new AnomalySwimlaneEmbeddable(initialInput, services, parent); } } diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx index e5a13adca05db..026d4e225f45b 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx @@ -22,7 +22,7 @@ import { import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; import { SWIMLANE_TYPE, SwimlaneType } from '../../application/explorer/explorer_constants'; -import { AnomalySwimlaneEmbeddableInput } from './anomaly_swimlane_embeddable'; +import { AnomalySwimlaneEmbeddableInput } from '..'; export interface AnomalySwimlaneInitializerProps { defaultTitle: string; diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx index 1ffdadb60aaa3..3a3597a7fa927 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx @@ -16,12 +16,10 @@ import { AnomalySwimlaneInitializer } from './anomaly_swimlane_initializer'; import { JobSelectorFlyout } from '../../application/components/job_selector/job_selector_flyout'; import { AnomalyDetectorService } from '../../application/services/anomaly_detector_service'; import { getInitialGroupsMap } from '../../application/components/job_selector/job_selector'; -import { - AnomalySwimlaneEmbeddableInput, - getDefaultPanelTitle, -} from './anomaly_swimlane_embeddable'; +import { getDefaultPanelTitle } from './anomaly_swimlane_embeddable'; import { getMlGlobalServices } from '../../application/app'; import { HttpService } from '../../application/services/http_service'; +import { AnomalySwimlaneEmbeddableInput } from '..'; export async function resolveAnomalySwimlaneUserInput( coreStart: CoreStart, diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/embeddable_swim_lane_container.test.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/embeddable_swim_lane_container.test.tsx index 23045834eae5f..ff621953cc577 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/embeddable_swim_lane_container.test.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/embeddable_swim_lane_container.test.tsx @@ -12,11 +12,7 @@ import { } from './embeddable_swim_lane_container'; import { BehaviorSubject, Observable } from 'rxjs'; import { I18nProvider } from '@kbn/i18n/react'; -import { - AnomalySwimlaneEmbeddable, - AnomalySwimlaneEmbeddableInput, - AnomalySwimlaneServices, -} from './anomaly_swimlane_embeddable'; +import { AnomalySwimlaneEmbeddable } from './anomaly_swimlane_embeddable'; import { CoreStart } from 'kibana/public'; import { useSwimlaneInputResolver } from './swimlane_input_resolver'; import { SWIMLANE_TYPE } from '../../application/explorer/explorer_constants'; @@ -25,6 +21,7 @@ import { MlDependencies } from '../../application/app'; import { uiActionsPluginMock } from 'src/plugins/ui_actions/public/mocks'; import { TriggerContract } from 'src/plugins/ui_actions/public/triggers'; import { TriggerId } from 'src/plugins/ui_actions/public'; +import { AnomalySwimlaneEmbeddableInput, AnomalySwimlaneServices } from '..'; jest.mock('./swimlane_input_resolver', () => ({ useSwimlaneInputResolver: jest.fn(() => { diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/embeddable_swim_lane_container.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/embeddable_swim_lane_container.tsx index 8ee4e391fcdde..60681446ac7aa 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/embeddable_swim_lane_container.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/embeddable_swim_lane_container.tsx @@ -10,12 +10,7 @@ import { Observable } from 'rxjs'; import { CoreStart } from 'kibana/public'; import { FormattedMessage } from '@kbn/i18n/react'; -import { - AnomalySwimlaneEmbeddable, - AnomalySwimlaneEmbeddableInput, - AnomalySwimlaneEmbeddableOutput, - AnomalySwimlaneServices, -} from './anomaly_swimlane_embeddable'; +import { IAnomalySwimlaneEmbeddable } from './anomaly_swimlane_embeddable'; import { useSwimlaneInputResolver } from './swimlane_input_resolver'; import { SwimlaneType } from '../../application/explorer/explorer_constants'; import { @@ -24,11 +19,16 @@ import { } from '../../application/explorer/swimlane_container'; import { AppStateSelectedCells } from '../../application/explorer/explorer_utils'; import { MlDependencies } from '../../application/app'; -import { SWIM_LANE_SELECTION_TRIGGER } from '../../ui_actions/triggers'; +import { SWIM_LANE_SELECTION_TRIGGER } from '../../ui_actions'; +import { + AnomalySwimlaneEmbeddableInput, + AnomalySwimlaneEmbeddableOutput, + AnomalySwimlaneServices, +} from '..'; export interface ExplorerSwimlaneContainerProps { id: string; - embeddableContext: AnomalySwimlaneEmbeddable; + embeddableContext: InstanceType; embeddableInput: Observable; services: [CoreStart, MlDependencies, AnomalySwimlaneServices]; refresh: Observable; diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/index.ts b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/index.ts index c0b02960d5144..ba2e1c88b3ea8 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/index.ts +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/index.ts @@ -5,4 +5,3 @@ */ export { AnomalySwimlaneEmbeddableFactory } from './anomaly_swimlane_embeddable_factory'; -export { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE } from './anomaly_swimlane_embeddable'; diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.test.ts b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.test.ts index a34955adebf62..258b72067cddd 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.test.ts +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.test.ts @@ -8,12 +8,9 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { processFilters, useSwimlaneInputResolver } from './swimlane_input_resolver'; import { BehaviorSubject, Observable, of, Subject } from 'rxjs'; import { SWIMLANE_TYPE } from '../../application/explorer/explorer_constants'; -import { - AnomalySwimlaneEmbeddableInput, - AnomalySwimlaneServices, -} from './anomaly_swimlane_embeddable'; import { CoreStart, IUiSettingsClient } from 'kibana/public'; import { MlStartDependencies } from '../../plugin'; +import { AnomalySwimlaneEmbeddableInput, AnomalySwimlaneServices } from '..'; describe('useSwimlaneInputResolver', () => { let embeddableInput: BehaviorSubject>; diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.ts b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.ts index f17c779a00252..6ddb1e954e57b 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.ts +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/swimlane_input_resolver.ts @@ -20,11 +20,6 @@ import { } from 'rxjs/operators'; import { CoreStart } from 'kibana/public'; import { TimeBuckets } from '../../application/util/time_buckets'; -import { - AnomalySwimlaneEmbeddableInput, - AnomalySwimlaneEmbeddableOutput, - AnomalySwimlaneServices, -} from './anomaly_swimlane_embeddable'; import { MlStartDependencies } from '../../plugin'; import { ANOMALY_SWIM_LANE_HARD_LIMIT, @@ -41,6 +36,11 @@ import { AnomalyDetectorService } from '../../application/services/anomaly_detec import { isViewBySwimLaneData } from '../../application/explorer/swimlane_container'; import { ViewMode } from '../../../../../../src/plugins/embeddable/public'; import { CONTROLLED_BY_SWIM_LANE_FILTER } from '../../ui_actions/apply_influencer_filters_action'; +import { + AnomalySwimlaneEmbeddableInput, + AnomalySwimlaneEmbeddableOutput, + AnomalySwimlaneServices, +} from '..'; const FETCH_RESULTS_DEBOUNCE_MS = 500; diff --git a/x-pack/plugins/ml/public/embeddables/constants.ts b/x-pack/plugins/ml/public/embeddables/constants.ts new file mode 100644 index 0000000000000..054cb8ba4b0bc --- /dev/null +++ b/x-pack/plugins/ml/public/embeddables/constants.ts @@ -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 const ANOMALY_SWIMLANE_EMBEDDABLE_TYPE = 'ml_anomaly_swimlane'; diff --git a/x-pack/plugins/ml/public/embeddables/index.ts b/x-pack/plugins/ml/public/embeddables/index.ts index db9f094d5721e..cc4bec0b67836 100644 --- a/x-pack/plugins/ml/public/embeddables/index.ts +++ b/x-pack/plugins/ml/public/embeddables/index.ts @@ -8,6 +8,9 @@ import { AnomalySwimlaneEmbeddableFactory } from './anomaly_swimlane'; import { MlCoreSetup } from '../plugin'; import { EmbeddableSetup } from '../../../../../src/plugins/embeddable/public'; +export * from './constants'; +export * from './types'; + export function registerEmbeddables(embeddable: EmbeddableSetup, core: MlCoreSetup) { const anomalySwimlaneEmbeddableFactory = new AnomalySwimlaneEmbeddableFactory( core.getStartServices diff --git a/x-pack/plugins/ml/public/embeddables/types.ts b/x-pack/plugins/ml/public/embeddables/types.ts new file mode 100644 index 0000000000000..93ec79d9b8310 --- /dev/null +++ b/x-pack/plugins/ml/public/embeddables/types.ts @@ -0,0 +1,66 @@ +/* + * 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 { CoreStart } from 'kibana/public'; +import { JobId } from '../../common/types/anomaly_detection_jobs'; +import { SwimlaneType } from '../application/explorer/explorer_constants'; +import { Filter } from '../../../../../src/plugins/data/common/es_query/filters'; +import { Query, RefreshInterval, TimeRange } from '../../../../../src/plugins/data/common/query'; +import { + EmbeddableInput, + EmbeddableOutput, + IEmbeddable, +} from '../../../../../src/plugins/embeddable/public'; +import { AnomalyDetectorService } from '../application/services/anomaly_detector_service'; +import { AnomalyTimelineService } from '../application/services/anomaly_timeline_service'; +import { MlDependencies } from '../application/app'; +import { AppStateSelectedCells } from '../application/explorer/explorer_utils'; + +export interface AnomalySwimlaneEmbeddableCustomInput { + jobIds: JobId[]; + swimlaneType: SwimlaneType; + viewBy?: string; + perPage?: number; + + // Embeddable inputs which are not included in the default interface + filters: Filter[]; + query: Query; + refreshConfig: RefreshInterval; + timeRange: TimeRange; +} + +export type AnomalySwimlaneEmbeddableInput = EmbeddableInput & AnomalySwimlaneEmbeddableCustomInput; + +export interface AnomalySwimlaneServices { + anomalyDetectorService: AnomalyDetectorService; + anomalyTimelineService: AnomalyTimelineService; +} + +export type AnomalySwimlaneEmbeddableServices = [ + CoreStart, + MlDependencies, + AnomalySwimlaneServices +]; + +export interface AnomalySwimlaneEmbeddableCustomOutput { + perPage?: number; + fromPage?: number; + interval?: number; +} + +export type AnomalySwimlaneEmbeddableOutput = EmbeddableOutput & + AnomalySwimlaneEmbeddableCustomOutput; + +export interface EditSwimlanePanelContext { + embeddable: IEmbeddable; +} + +export interface SwimLaneDrilldownContext extends EditSwimlanePanelContext { + /** + * Optional data provided by swim lane selection + */ + data?: AppStateSelectedCells; +} diff --git a/x-pack/plugins/ml/public/index.scss b/x-pack/plugins/ml/public/index.scss deleted file mode 100644 index 9bd47b6473372..0000000000000 --- a/x-pack/plugins/ml/public/index.scss +++ /dev/null @@ -1 +0,0 @@ -@import './application/index'; diff --git a/x-pack/plugins/ml/public/index.ts b/x-pack/plugins/ml/public/index.ts index 5a956651c86d8..80308977735d2 100755 --- a/x-pack/plugins/ml/public/index.ts +++ b/x-pack/plugins/ml/public/index.ts @@ -5,7 +5,6 @@ */ import { PluginInitializer, PluginInitializerContext } from 'kibana/public'; -import './index.scss'; import { MlPlugin, MlPluginSetup, diff --git a/x-pack/plugins/ml/public/plugin.ts b/x-pack/plugins/ml/public/plugin.ts index a8e1e804c2fe3..aa6163379f9c0 100644 --- a/x-pack/plugins/ml/public/plugin.ts +++ b/x-pack/plugins/ml/public/plugin.ts @@ -6,36 +6,35 @@ import { i18n } from '@kbn/i18n'; import { - Plugin, - CoreStart, - CoreSetup, AppMountParameters, + CoreSetup, + CoreStart, + Plugin, PluginInitializerContext, } from 'kibana/public'; import { BehaviorSubject } from 'rxjs'; import { take } from 'rxjs/operators'; import { ManagementSetup } from 'src/plugins/management/public'; -import { SharePluginSetup, SharePluginStart, UrlGeneratorState } from 'src/plugins/share/public'; +import { SharePluginSetup, SharePluginStart } from 'src/plugins/share/public'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/server'; import { DataPublicPluginStart } from 'src/plugins/data/public'; import { HomePublicPluginSetup } from 'src/plugins/home/public'; import { EmbeddableSetup } from 'src/plugins/embeddable/public'; -import { AppStatus, AppUpdater } from '../../../../src/core/public'; +import { AppStatus, AppUpdater, DEFAULT_APP_CATEGORIES } from '../../../../src/core/public'; import { SecurityPluginSetup } from '../../security/public'; import { LicensingPluginSetup } from '../../licensing/public'; import { registerManagementSection } from './application/management'; import { LicenseManagementUIPluginSetup } from '../../license_management/public'; import { setDependencyCache } from './application/util/dependency_cache'; -import { PLUGIN_ID, PLUGIN_ICON } from '../common/constants/app'; +import { PLUGIN_ICON, PLUGIN_ID } from '../common/constants/app'; import { registerFeature } from './register_feature'; -import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/public'; -import { registerEmbeddables } from './embeddables'; import { UiActionsSetup, UiActionsStart } from '../../../../src/plugins/ui_actions/public'; import { registerMlUiActions } from './ui_actions'; import { KibanaLegacyStart } from '../../../../src/plugins/kibana_legacy/public'; -import { registerUrlGenerator, MlUrlGeneratorState, ML_APP_URL_GENERATOR } from './url_generator'; -import { isMlEnabled, isFullLicense } from '../common/license'; +import { registerUrlGenerator } from './url_generator'; +import { isFullLicense, isMlEnabled } from '../common/license'; +import { registerEmbeddables } from './embeddables'; export interface MlStartDependencies { data: DataPublicPluginStart; @@ -56,12 +55,6 @@ export interface MlSetupDependencies { share: SharePluginSetup; } -declare module '../../../../src/plugins/share/public' { - export interface UrlGeneratorStateMapping { - [ML_APP_URL_GENERATOR]: UrlGeneratorState; - } -} - export type MlCoreSetup = CoreSetup; export class MlPlugin implements Plugin { diff --git a/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx b/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx index 3af39993d39fd..9e50410751c37 100644 --- a/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/apply_influencer_filters_action.tsx @@ -6,13 +6,10 @@ import { i18n } from '@kbn/i18n'; import { ActionContextMapping, createAction } from '../../../../../src/plugins/ui_actions/public'; -import { - AnomalySwimlaneEmbeddable, - SwimLaneDrilldownContext, -} from '../embeddables/anomaly_swimlane/anomaly_swimlane_embeddable'; import { MlCoreSetup } from '../plugin'; import { SWIMLANE_TYPE, VIEW_BY_JOB_LABEL } from '../application/explorer/explorer_constants'; import { Filter, FilterStateStore } from '../../../../../src/plugins/data/common'; +import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE, SwimLaneDrilldownContext } from '../embeddables'; export const APPLY_INFLUENCER_FILTERS_ACTION = 'applyInfluencerFiltersAction'; @@ -73,7 +70,7 @@ export function createApplyInfluencerFiltersAction( async isCompatible({ embeddable, data }: SwimLaneDrilldownContext) { // Only compatible with view by influencer swim lanes and single selection return ( - embeddable instanceof AnomalySwimlaneEmbeddable && + embeddable.type === ANOMALY_SWIMLANE_EMBEDDABLE_TYPE && data !== undefined && data.type === SWIMLANE_TYPE.VIEW_BY && data.viewByFieldName !== VIEW_BY_JOB_LABEL && diff --git a/x-pack/plugins/ml/public/ui_actions/apply_time_range_action.tsx b/x-pack/plugins/ml/public/ui_actions/apply_time_range_action.tsx index ec59ba20acf98..325e903de0e2d 100644 --- a/x-pack/plugins/ml/public/ui_actions/apply_time_range_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/apply_time_range_action.tsx @@ -7,11 +7,8 @@ import { i18n } from '@kbn/i18n'; import moment from 'moment'; import { ActionContextMapping, createAction } from '../../../../../src/plugins/ui_actions/public'; -import { - AnomalySwimlaneEmbeddable, - SwimLaneDrilldownContext, -} from '../embeddables/anomaly_swimlane/anomaly_swimlane_embeddable'; import { MlCoreSetup } from '../plugin'; +import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE, SwimLaneDrilldownContext } from '../embeddables'; export const APPLY_TIME_RANGE_SELECTION_ACTION = 'applyTimeRangeSelectionAction'; @@ -52,7 +49,7 @@ export function createApplyTimeRangeSelectionAction( }); }, async isCompatible({ embeddable, data }: SwimLaneDrilldownContext) { - return embeddable instanceof AnomalySwimlaneEmbeddable && data !== undefined; + return embeddable.type === ANOMALY_SWIMLANE_EMBEDDABLE_TYPE && data !== undefined; }, }); } diff --git a/x-pack/plugins/ml/public/ui_actions/edit_swimlane_panel_action.tsx b/x-pack/plugins/ml/public/ui_actions/edit_swimlane_panel_action.tsx index cfd90f92e3238..c40d1e175ec77 100644 --- a/x-pack/plugins/ml/public/ui_actions/edit_swimlane_panel_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/edit_swimlane_panel_action.tsx @@ -6,13 +6,9 @@ import { i18n } from '@kbn/i18n'; import { ActionContextMapping, createAction } from '../../../../../src/plugins/ui_actions/public'; -import { - AnomalySwimlaneEmbeddable, - EditSwimlanePanelContext, -} from '../embeddables/anomaly_swimlane/anomaly_swimlane_embeddable'; -import { resolveAnomalySwimlaneUserInput } from '../embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout'; import { ViewMode } from '../../../../../src/plugins/embeddable/public'; import { MlCoreSetup } from '../plugin'; +import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE, EditSwimlanePanelContext } from '../embeddables'; export const EDIT_SWIMLANE_PANEL_ACTION = 'editSwimlanePanelAction'; @@ -27,7 +23,7 @@ export function createEditSwimlanePanelAction(getStartServices: MlCoreSetup['get i18n.translate('xpack.ml.actions.editSwimlaneTitle', { defaultMessage: 'Edit swim lane', }), - execute: async ({ embeddable }: EditSwimlanePanelContext) => { + async execute({ embeddable }: EditSwimlanePanelContext) { if (!embeddable) { throw new Error('Not possible to execute an action without the embeddable context'); } @@ -35,15 +31,19 @@ export function createEditSwimlanePanelAction(getStartServices: MlCoreSetup['get const [coreStart] = await getStartServices(); try { + const { resolveAnomalySwimlaneUserInput } = await import( + '../embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout' + ); + const result = await resolveAnomalySwimlaneUserInput(coreStart, embeddable.getInput()); embeddable.updateInput(result); } catch (e) { return Promise.reject(); } }, - isCompatible: async ({ embeddable }: EditSwimlanePanelContext) => { + async isCompatible({ embeddable }: EditSwimlanePanelContext) { return ( - embeddable instanceof AnomalySwimlaneEmbeddable && + embeddable.type === ANOMALY_SWIMLANE_EMBEDDABLE_TYPE && embeddable.getInput().viewMode === ViewMode.EDIT ); }, diff --git a/x-pack/plugins/ml/public/ui_actions/index.ts b/x-pack/plugins/ml/public/ui_actions/index.ts index b7262a330b310..437a38acf6f8b 100644 --- a/x-pack/plugins/ml/public/ui_actions/index.ts +++ b/x-pack/plugins/ml/public/ui_actions/index.ts @@ -13,7 +13,6 @@ import { createOpenInExplorerAction, OPEN_IN_ANOMALY_EXPLORER_ACTION, } from './open_in_anomaly_explorer_action'; -import { EditSwimlanePanelContext } from '../embeddables/anomaly_swimlane/anomaly_swimlane_embeddable'; import { UiActionsSetup } from '../../../../../src/plugins/ui_actions/public'; import { MlPluginStart, MlStartDependencies } from '../plugin'; import { CONTEXT_MENU_TRIGGER } from '../../../../../src/plugins/embeddable/public'; @@ -22,11 +21,18 @@ import { createApplyInfluencerFiltersAction, } from './apply_influencer_filters_action'; import { SWIM_LANE_SELECTION_TRIGGER, swimLaneSelectionTrigger } from './triggers'; -import { SwimLaneDrilldownContext } from '../embeddables/anomaly_swimlane/anomaly_swimlane_embeddable'; import { APPLY_TIME_RANGE_SELECTION_ACTION, createApplyTimeRangeSelectionAction, } from './apply_time_range_action'; +import { EditSwimlanePanelContext, SwimLaneDrilldownContext } from '../embeddables'; + +export { APPLY_TIME_RANGE_SELECTION_ACTION } from './apply_time_range_action'; +export { EDIT_SWIMLANE_PANEL_ACTION } from './edit_swimlane_panel_action'; +export { APPLY_INFLUENCER_FILTERS_ACTION } from './apply_influencer_filters_action'; +export { OPEN_IN_ANOMALY_EXPLORER_ACTION } from './open_in_anomaly_explorer_action'; + +export { SWIM_LANE_SELECTION_TRIGGER } from './triggers'; /** * Register ML UI actions diff --git a/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx b/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx index 211840467e38c..e18f593145f9c 100644 --- a/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx @@ -6,12 +6,9 @@ import { i18n } from '@kbn/i18n'; import { ActionContextMapping, createAction } from '../../../../../src/plugins/ui_actions/public'; -import { - AnomalySwimlaneEmbeddable, - SwimLaneDrilldownContext, -} from '../embeddables/anomaly_swimlane/anomaly_swimlane_embeddable'; import { MlCoreSetup } from '../plugin'; import { ML_APP_URL_GENERATOR } from '../url_generator'; +import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE, SwimLaneDrilldownContext } from '../embeddables'; export const OPEN_IN_ANOMALY_EXPLORER_ACTION = 'openInAnomalyExplorerAction'; @@ -60,7 +57,7 @@ export function createOpenInExplorerAction(getStartServices: MlCoreSetup['getSta await application.navigateToUrl(anomalyExplorerUrl!); }, async isCompatible({ embeddable }: SwimLaneDrilldownContext) { - return embeddable instanceof AnomalySwimlaneEmbeddable; + return embeddable.type === ANOMALY_SWIMLANE_EMBEDDABLE_TYPE; }, }); } diff --git a/x-pack/plugins/ml/public/url_generator.ts b/x-pack/plugins/ml/public/url_generator.ts index b7cf64159a827..4e08c57c0b2e0 100644 --- a/x-pack/plugins/ml/public/url_generator.ts +++ b/x-pack/plugins/ml/public/url_generator.ts @@ -5,13 +5,23 @@ */ import { CoreSetup } from 'kibana/public'; -import { SharePluginSetup, UrlGeneratorsDefinition } from '../../../../src/plugins/share/public'; +import { + SharePluginSetup, + UrlGeneratorsDefinition, + UrlGeneratorState, +} from '../../../../src/plugins/share/public'; import { TimeRange } from '../../../../src/plugins/data/public'; import { setStateToKbnUrl } from '../../../../src/plugins/kibana_utils/public'; import { JobId } from '../../reporting/common/types'; import { ExplorerAppState } from './application/explorer/explorer_dashboard_service'; import { MlStartDependencies } from './plugin'; +declare module '../../../../src/plugins/share/public' { + export interface UrlGeneratorStateMapping { + [ML_APP_URL_GENERATOR]: UrlGeneratorState; + } +} + export const ML_APP_URL_GENERATOR = 'ML_APP_URL_GENERATOR'; export interface ExplorerUrlState { From b26bd6175d11d52c577e62ebfc3186dea9d7ec58 Mon Sep 17 00:00:00 2001 From: Sonja Krause-Harder Date: Wed, 5 Aug 2020 13:48:11 +0200 Subject: [PATCH 05/34] [Ingest Manager] Adjust dataset aggs to use datastream fields instead (#74342) * [Ingest Manager] Adjust dataset aggs to use datastream fields instead Elastic Agent and Elasticsearch are switching over from using dataset.* to datastream.*. This adjust the aggregation on the dataset page to get the datastreams. For this to work properly, the most recent version of Elasticsearch 7.9 must be used and is pending updates on all the packages to ship also the datastream fields, see https://github.com/elastic/integrations/pull/213 * Update datastream to data_stream * Update data stream name generation * Fix typo * Temporarily use datastream instead of data_stream * updating to use `data_stream` instead of `datastream` Co-authored-by: ruflin Co-authored-by: Jen Huang --- .../server/routes/data_streams/handlers.ts | 10 +++++----- .../services/epm/elasticsearch/template/template.ts | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/x-pack/plugins/ingest_manager/server/routes/data_streams/handlers.ts b/x-pack/plugins/ingest_manager/server/routes/data_streams/handlers.ts index df37aeb27c75c..43ae2b72f6077 100644 --- a/x-pack/plugins/ingest_manager/server/routes/data_streams/handlers.ts +++ b/x-pack/plugins/ingest_manager/server/routes/data_streams/handlers.ts @@ -31,12 +31,12 @@ export const getListHandler: RequestHandler = async (context, request, response) must: [ { exists: { - field: 'dataset.namespace', + field: 'data_stream.namespace', }, }, { exists: { - field: 'dataset.name', + field: 'data_stream.dataset', }, }, ], @@ -54,19 +54,19 @@ export const getListHandler: RequestHandler = async (context, request, response) aggs: { dataset: { terms: { - field: 'dataset.name', + field: 'data_stream.dataset', size: 1, }, }, namespace: { terms: { - field: 'dataset.namespace', + field: 'data_stream.namespace', size: 1, }, }, type: { terms: { - field: 'dataset.type', + field: 'data_stream.type', size: 1, }, }, diff --git a/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/template.ts b/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/template.ts index a739806d5868b..71e49acf1766f 100644 --- a/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/template.ts +++ b/x-pack/plugins/ingest_manager/server/services/epm/elasticsearch/template/template.ts @@ -393,14 +393,14 @@ const updateExistingIndex = async ({ // are added in https://github.com/elastic/kibana/issues/66551. namespace value we will continue // to skip updating and assume the value in the index mapping is correct delete mappings.properties.stream; - delete mappings.properties.dataset; + delete mappings.properties.data_stream; - // get the dataset values from the index template to compose data stream name + // get the data_stream values from the index template to compose data stream name const indexMappings = await getIndexMappings(indexName, callCluster); - const dataset = indexMappings[indexName].mappings.properties.dataset.properties; - if (!dataset.type.value || !dataset.name.value || !dataset.namespace.value) - throw new Error(`dataset values are missing from the index template ${indexName}`); - const dataStreamName = `${dataset.type.value}-${dataset.name.value}-${dataset.namespace.value}`; + const dataStream = indexMappings[indexName].mappings.properties.data_stream.properties; + if (!dataStream.type.value || !dataStream.dataset.value || !dataStream.namespace.value) + throw new Error(`data_stream values are missing from the index template ${indexName}`); + const dataStreamName = `${dataStream.type.value}-${dataStream.dataset.value}-${dataStream.namespace.value}`; // try to update the mappings first try { From 7a1b09dcf1189ef9b5c950678d36ac0844572140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Marcondes?= <55978943+cauemarcondes@users.noreply.github.com> Date: Wed, 5 Aug 2020 13:28:13 +0100 Subject: [PATCH 06/34] [APM] Average for transaction error rate includes null values (#74345) --- .../shared/charts/ErroneousTransactionsRateChart/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugins/apm/public/components/shared/charts/ErroneousTransactionsRateChart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/ErroneousTransactionsRateChart/index.tsx index a433b0b507239..8214c081e6ce1 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/ErroneousTransactionsRateChart/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/ErroneousTransactionsRateChart/index.tsx @@ -6,7 +6,6 @@ import { EuiTitle } from '@elastic/eui'; import theme from '@elastic/eui/dist/eui_theme_light.json'; import { i18n } from '@kbn/i18n'; -import { mean } from 'lodash'; import React, { useCallback } from 'react'; import { EuiPanel } from '@elastic/eui'; import { useChartsSync } from '../../../../hooks/useChartsSync'; @@ -79,7 +78,7 @@ export function ErroneousTransactionsRateChart() { { color: theme.euiColorVis7, data: [], - legendValue: tickFormatY(mean(errorRates.map((rate) => rate.y))), + legendValue: tickFormatY(data?.average), legendClickDisabled: true, title: i18n.translate('xpack.apm.errorRateChart.avgLabel', { defaultMessage: 'Avg.', From f9fc83fb1d0b2e44c4a080ef7e96f7123072fd96 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Wed, 5 Aug 2020 14:28:56 +0200 Subject: [PATCH 07/34] Add README files for Kibana app plugins (#74277) * Add README files for Kibana app plugins * Update src/plugins/timelion/README.md Co-authored-by: Matthias Wilhelm * Update src/plugins/vis_type_vislib/README.md Co-authored-by: Matthias Wilhelm Co-authored-by: Matthias Wilhelm --- .github/CODEOWNERS | 1 - src/plugins/dashboard/README.md | 1 + src/plugins/discover/README.md | 1 + src/plugins/input_control_vis/README.md | 1 + src/plugins/timelion/README.md | 2 ++ src/plugins/vis_type_markdown/README.md | 1 + src/plugins/vis_type_metric/README.md | 1 + src/plugins/vis_type_table/README.md | 1 + src/plugins/vis_type_tagcloud/README.md | 1 + src/plugins/vis_type_timelion/README.md | 2 ++ src/plugins/vis_type_timeseries/README.md | 1 + src/plugins/vis_type_vega/README.md | 1 + src/plugins/vis_type_vislib/README.md | 2 ++ src/plugins/vis_type_xy/README.md | 2 ++ src/plugins/visualizations/README.md | 2 ++ src/plugins/visualize/README.md | 2 ++ x-pack/plugins/dashboard_enhanced/README.md | 2 +- x-pack/plugins/dashboard_mode/README.md | 1 + x-pack/plugins/discover_enhanced/README.md | 1 + 19 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 src/plugins/dashboard/README.md create mode 100644 src/plugins/discover/README.md create mode 100644 src/plugins/input_control_vis/README.md create mode 100644 src/plugins/timelion/README.md create mode 100644 src/plugins/vis_type_markdown/README.md create mode 100644 src/plugins/vis_type_metric/README.md create mode 100644 src/plugins/vis_type_table/README.md create mode 100644 src/plugins/vis_type_tagcloud/README.md create mode 100644 src/plugins/vis_type_timeseries/README.md create mode 100644 src/plugins/vis_type_vega/README.md create mode 100644 src/plugins/vis_type_vislib/README.md create mode 100644 src/plugins/vis_type_xy/README.md create mode 100644 src/plugins/visualizations/README.md create mode 100644 src/plugins/visualize/README.md create mode 100644 x-pack/plugins/dashboard_mode/README.md create mode 100644 x-pack/plugins/discover_enhanced/README.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f1a374445657f..73fb10532fd8d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -7,7 +7,6 @@ /x-pack/plugins/discover_enhanced/ @elastic/kibana-app /x-pack/plugins/lens/ @elastic/kibana-app /x-pack/plugins/graph/ @elastic/kibana-app -/src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app /src/plugins/dashboard/ @elastic/kibana-app /src/plugins/discover/ @elastic/kibana-app /src/plugins/input_control_vis/ @elastic/kibana-app diff --git a/src/plugins/dashboard/README.md b/src/plugins/dashboard/README.md new file mode 100644 index 0000000000000..f44bd943eaca9 --- /dev/null +++ b/src/plugins/dashboard/README.md @@ -0,0 +1 @@ +Contains the dashboard application. \ No newline at end of file diff --git a/src/plugins/discover/README.md b/src/plugins/discover/README.md new file mode 100644 index 0000000000000..a914d651eef35 --- /dev/null +++ b/src/plugins/discover/README.md @@ -0,0 +1 @@ +Contains the Discover application and the saved search embeddable. \ No newline at end of file diff --git a/src/plugins/input_control_vis/README.md b/src/plugins/input_control_vis/README.md new file mode 100644 index 0000000000000..67266079dede5 --- /dev/null +++ b/src/plugins/input_control_vis/README.md @@ -0,0 +1 @@ +Contains the input control visualization allowing to place custom filter controls on a dashboard. \ No newline at end of file diff --git a/src/plugins/timelion/README.md b/src/plugins/timelion/README.md new file mode 100644 index 0000000000000..d29a33028e967 --- /dev/null +++ b/src/plugins/timelion/README.md @@ -0,0 +1,2 @@ +Contains the deprecated timelion application. For the timelion visualization, +which also contains the timelion APIs and backend, look at the vis_type_timelion plugin. diff --git a/src/plugins/vis_type_markdown/README.md b/src/plugins/vis_type_markdown/README.md new file mode 100644 index 0000000000000..ae79a4822d4ac --- /dev/null +++ b/src/plugins/vis_type_markdown/README.md @@ -0,0 +1 @@ +The markdown visualization that can be used to place text panels on dashboards. \ No newline at end of file diff --git a/src/plugins/vis_type_metric/README.md b/src/plugins/vis_type_metric/README.md new file mode 100644 index 0000000000000..78df92832bdbf --- /dev/null +++ b/src/plugins/vis_type_metric/README.md @@ -0,0 +1 @@ +Contains the metric visualization. \ No newline at end of file diff --git a/src/plugins/vis_type_table/README.md b/src/plugins/vis_type_table/README.md new file mode 100644 index 0000000000000..cf37e133ed1cf --- /dev/null +++ b/src/plugins/vis_type_table/README.md @@ -0,0 +1 @@ +Contains the data table visualization, that allows presenting data in a simple table format. \ No newline at end of file diff --git a/src/plugins/vis_type_tagcloud/README.md b/src/plugins/vis_type_tagcloud/README.md new file mode 100644 index 0000000000000..7e8f2a6e5b72a --- /dev/null +++ b/src/plugins/vis_type_tagcloud/README.md @@ -0,0 +1 @@ +Contains the tagcloud visualization. \ No newline at end of file diff --git a/src/plugins/vis_type_timelion/README.md b/src/plugins/vis_type_timelion/README.md index c306e03abf2c6..89d34527c51d6 100644 --- a/src/plugins/vis_type_timelion/README.md +++ b/src/plugins/vis_type_timelion/README.md @@ -1,5 +1,7 @@ # Vis type Timelion +Contains the timelion visualization and the timelion backend. + # Generate a parser If your grammar was changed in `public/chain.peg` you need to re-generate the static parser. You could use a grunt task: diff --git a/src/plugins/vis_type_timeseries/README.md b/src/plugins/vis_type_timeseries/README.md new file mode 100644 index 0000000000000..4b4184b6eadd9 --- /dev/null +++ b/src/plugins/vis_type_timeseries/README.md @@ -0,0 +1 @@ +Contains everything around TSVB (the editor, visualizatin implementations and backends). \ No newline at end of file diff --git a/src/plugins/vis_type_vega/README.md b/src/plugins/vis_type_vega/README.md new file mode 100644 index 0000000000000..3d9bfd387e2c5 --- /dev/null +++ b/src/plugins/vis_type_vega/README.md @@ -0,0 +1 @@ +Contains the Vega visualization. \ No newline at end of file diff --git a/src/plugins/vis_type_vislib/README.md b/src/plugins/vis_type_vislib/README.md new file mode 100644 index 0000000000000..7641ea2acd1ec --- /dev/null +++ b/src/plugins/vis_type_vislib/README.md @@ -0,0 +1,2 @@ +Contains the vislib visualizations. These are the classical area/line/bar, pie, gauge/goal and +heatmap charts. diff --git a/src/plugins/vis_type_xy/README.md b/src/plugins/vis_type_xy/README.md new file mode 100644 index 0000000000000..70ddb21c1e9db --- /dev/null +++ b/src/plugins/vis_type_xy/README.md @@ -0,0 +1,2 @@ +Contains the new xy-axis chart using the elastic-charts library, which will eventually +replace the vislib xy-axis (bar, area, line) charts. \ No newline at end of file diff --git a/src/plugins/visualizations/README.md b/src/plugins/visualizations/README.md new file mode 100644 index 0000000000000..c61beb670a503 --- /dev/null +++ b/src/plugins/visualizations/README.md @@ -0,0 +1,2 @@ +Contains most of the visualization infrastructure, e.g. the visualization type registry or the +visualization embeddable. \ No newline at end of file diff --git a/src/plugins/visualize/README.md b/src/plugins/visualize/README.md new file mode 100644 index 0000000000000..be3e555a1407b --- /dev/null +++ b/src/plugins/visualize/README.md @@ -0,0 +1,2 @@ +Contains the visualize application which includes the listing page and the app frame, +which will load the visualization's editor. \ No newline at end of file diff --git a/x-pack/plugins/dashboard_enhanced/README.md b/x-pack/plugins/dashboard_enhanced/README.md index d9296ae158621..0aeb156a99f1f 100644 --- a/x-pack/plugins/dashboard_enhanced/README.md +++ b/x-pack/plugins/dashboard_enhanced/README.md @@ -1 +1 @@ -# X-Pack part of Dashboard app +Contains the enhancements to the OSS dashboard app. \ No newline at end of file diff --git a/x-pack/plugins/dashboard_mode/README.md b/x-pack/plugins/dashboard_mode/README.md new file mode 100644 index 0000000000000..4e244afb97fdf --- /dev/null +++ b/x-pack/plugins/dashboard_mode/README.md @@ -0,0 +1 @@ +The deprecated dashboard only mode. \ No newline at end of file diff --git a/x-pack/plugins/discover_enhanced/README.md b/x-pack/plugins/discover_enhanced/README.md new file mode 100644 index 0000000000000..08d0dbb9cdbef --- /dev/null +++ b/x-pack/plugins/discover_enhanced/README.md @@ -0,0 +1 @@ +Contains the enhancements to the OSS discover app. \ No newline at end of file From bf22fe54e1f1579821e2b55f211d432f12555bd5 Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Wed, 5 Aug 2020 09:21:57 -0400 Subject: [PATCH 08/34] [Ingest Node Pipelines] Refactor pipeline simulator code (#72328) --- .../components/pipeline_form/index.ts | 2 +- .../pipeline_form/pipeline_form.tsx | 22 -- .../pipeline_form/pipeline_form_fields.tsx | 18 +- .../pipeline_form/pipeline_form_provider.tsx | 20 -- .../pipeline_test_flyout.tsx | 203 ------------------ .../pipeline_test_flyout_provider.tsx | 47 ---- .../pipeline_form/processors_header.tsx | 28 +-- .../pipeline_processors_editor.helpers.tsx | 6 +- .../pipeline_processors_editor.test.tsx | 5 + .../components/index.ts | 2 + .../components/pipeline_processors_editor.tsx | 1 + .../components/test_pipeline/button.tsx | 30 +++ .../test_pipeline/flyout_provider.tsx | 171 +++++++++++++++ .../test_pipeline/flyout_tabs}/index.ts | 0 .../flyout_tabs}/pipeline_test_tabs.tsx | 0 .../test_pipeline/flyout_tabs}/schema.tsx | 4 +- .../flyout_tabs}/tab_documents.tsx | 23 +- .../test_pipeline/flyout_tabs}/tab_output.tsx | 3 +- .../components/test_pipeline}/index.ts | 2 +- .../context/context.tsx | 42 ++++ .../context/index.ts | 15 ++ .../processors_context.tsx} | 25 ++- .../context}/test_config_context.tsx | 0 .../pipeline_processors_editor/index.ts | 4 +- .../pipeline_processors_editor/types.ts | 4 + .../public/application/services/api.ts | 2 +- .../application/services/documentation.ts | 4 - .../translations/translations/ja-JP.json | 3 - .../translations/translations/zh-CN.json | 3 - 29 files changed, 323 insertions(+), 366 deletions(-) delete mode 100644 x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_provider.tsx delete mode 100644 x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/pipeline_test_flyout.tsx delete mode 100644 x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/pipeline_test_flyout_provider.tsx create mode 100644 x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/button.tsx create mode 100644 x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_provider.tsx rename x-pack/plugins/ingest_pipelines/public/application/components/{pipeline_form/pipeline_test_flyout/tabs => pipeline_processors_editor/components/test_pipeline/flyout_tabs}/index.ts (100%) rename x-pack/plugins/ingest_pipelines/public/application/components/{pipeline_form/pipeline_test_flyout/tabs => pipeline_processors_editor/components/test_pipeline/flyout_tabs}/pipeline_test_tabs.tsx (100%) rename x-pack/plugins/ingest_pipelines/public/application/components/{pipeline_form/pipeline_test_flyout/tabs => pipeline_processors_editor/components/test_pipeline/flyout_tabs}/schema.tsx (96%) rename x-pack/plugins/ingest_pipelines/public/application/components/{pipeline_form/pipeline_test_flyout/tabs => pipeline_processors_editor/components/test_pipeline/flyout_tabs}/tab_documents.tsx (85%) rename x-pack/plugins/ingest_pipelines/public/application/components/{pipeline_form/pipeline_test_flyout/tabs => pipeline_processors_editor/components/test_pipeline/flyout_tabs}/tab_output.tsx (97%) rename x-pack/plugins/ingest_pipelines/public/application/components/{pipeline_form/pipeline_test_flyout => pipeline_processors_editor/components/test_pipeline}/index.ts (70%) create mode 100644 x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/context/context.tsx create mode 100644 x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/context/index.ts rename x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/{context.tsx => context/processors_context.tsx} (91%) rename x-pack/plugins/ingest_pipelines/public/application/components/{pipeline_form => pipeline_processors_editor/context}/test_config_context.tsx (100%) diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/index.ts index 2b007a25667a1..21a2ee30a84e1 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/index.ts @@ -4,4 +4,4 @@ * you may not use this file except in compliance with the Elastic License. */ -export { PipelineFormProvider as PipelineForm } from './pipeline_form_provider'; +export { PipelineForm } from './pipeline_form'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx index 341e15132d353..5279bd718c16e 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx @@ -16,7 +16,6 @@ import './pipeline_form.scss'; import { OnUpdateHandlerArg, OnUpdateHandler } from '../pipeline_processors_editor'; import { PipelineRequestFlyout } from './pipeline_request_flyout'; -import { PipelineTestFlyout } from './pipeline_test_flyout'; import { PipelineFormFields } from './pipeline_form_fields'; import { PipelineFormError } from './pipeline_form_error'; import { pipelineFormSchema } from './schema'; @@ -48,8 +47,6 @@ export const PipelineForm: React.FunctionComponent = ({ }) => { const [isRequestVisible, setIsRequestVisible] = useState(false); - const [isTestingPipeline, setIsTestingPipeline] = useState(false); - const { processors: initialProcessors, on_failure: initialOnFailureProcessors, @@ -79,10 +76,6 @@ export const PipelineForm: React.FunctionComponent = ({ } }; - const handleTestPipelineClick = () => { - setIsTestingPipeline(true); - }; - const { form } = useForm({ schema: pipelineFormSchema, defaultValue: defaultFormValues, @@ -90,7 +83,6 @@ export const PipelineForm: React.FunctionComponent = ({ }); const onEditorFlyoutOpen = useCallback(() => { - setIsTestingPipeline(false); setIsRequestVisible(false); }, [setIsRequestVisible]); @@ -137,8 +129,6 @@ export const PipelineForm: React.FunctionComponent = ({ onFailure={processorsState.onFailure} onProcessorsUpdate={onProcessorsChangeHandler} hasVersion={Boolean(defaultValue.version)} - isTestButtonDisabled={isTestingPipeline || form.isValid === false} - onTestPipelineClick={handleTestPipelineClick} isEditing={isEditing} /> @@ -198,18 +188,6 @@ export const PipelineForm: React.FunctionComponent = ({ closeFlyout={() => setIsRequestVisible((prevIsRequestVisible) => !prevIsRequestVisible)} /> ) : null} - - {/* Test pipeline flyout */} - {isTestingPipeline ? ( - - processorStateRef.current?.getData() || { processors: [], on_failure: [] } - } - closeFlyout={() => { - setIsTestingPipeline((prevIsTestingPipeline) => !prevIsTestingPipeline); - }} - /> - ) : null} diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx index 0e7a45e8d07b9..32beb61039a90 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx @@ -13,7 +13,7 @@ import { Processor } from '../../../../common/types'; import { getUseField, getFormRow, Field, useKibana } from '../../../shared_imports'; import { - PipelineProcessorsContextProvider, + ProcessorsEditorContextProvider, GlobalOnFailureProcessorsEditor, ProcessorsEditor, OnUpdateHandler, @@ -29,8 +29,6 @@ interface Props { onLoadJson: OnDoneLoadJsonHandler; onProcessorsUpdate: OnUpdateHandler; hasVersion: boolean; - isTestButtonDisabled: boolean; - onTestPipelineClick: () => void; onEditorFlyoutOpen: () => void; isEditing?: boolean; } @@ -45,8 +43,6 @@ export const PipelineFormFields: React.FunctionComponent = ({ onProcessorsUpdate, isEditing, hasVersion, - isTestButtonDisabled, - onTestPipelineClick, onEditorFlyoutOpen, }) => { const { services } = useKibana(); @@ -125,20 +121,18 @@ export const PipelineFormFields: React.FunctionComponent = ({ {/* Pipeline Processors Editor */} -
- + @@ -154,7 +148,7 @@ export const PipelineFormFields: React.FunctionComponent = ({
-
+ ); }; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_provider.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_provider.tsx deleted file mode 100644 index e6482a9fc12c2..0000000000000 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_provider.tsx +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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 React from 'react'; - -import { PipelineForm as PipelineFormUI, PipelineFormProps } from './pipeline_form'; -import { TestConfigContextProvider } from './test_config_context'; - -export const PipelineFormProvider: React.FunctionComponent = ( - passThroughProps -) => { - return ( - - - - ); -}; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/pipeline_test_flyout.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/pipeline_test_flyout.tsx deleted file mode 100644 index da5e6cf77364c..0000000000000 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/pipeline_test_flyout.tsx +++ /dev/null @@ -1,203 +0,0 @@ -/* - * 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 React, { useState, useEffect, useCallback } from 'react'; -import { FormattedMessage } from '@kbn/i18n/react'; -import { i18n } from '@kbn/i18n'; - -import { - EuiFlyout, - EuiFlyoutBody, - EuiFlyoutHeader, - EuiSpacer, - EuiTitle, - EuiCallOut, -} from '@elastic/eui'; - -import { useKibana } from '../../../../shared_imports'; -import { Pipeline } from '../../../../../common/types'; -import { Tabs, Tab, OutputTab, DocumentsTab } from './tabs'; -import { useTestConfigContext } from '../test_config_context'; - -export interface PipelineTestFlyoutProps { - closeFlyout: () => void; - pipeline: Pipeline; - isPipelineValid: boolean; -} - -export const PipelineTestFlyout: React.FunctionComponent = ({ - closeFlyout, - pipeline, - isPipelineValid, -}) => { - const { services } = useKibana(); - - const { testConfig } = useTestConfigContext(); - const { documents: cachedDocuments, verbose: cachedVerbose } = testConfig; - - const initialSelectedTab = cachedDocuments ? 'output' : 'documents'; - const [selectedTab, setSelectedTab] = useState(initialSelectedTab); - - const [shouldExecuteImmediately, setShouldExecuteImmediately] = useState(false); - const [isExecuting, setIsExecuting] = useState(false); - const [executeError, setExecuteError] = useState(null); - const [executeOutput, setExecuteOutput] = useState(undefined); - - const handleExecute = useCallback( - async (documents: object[], verbose?: boolean) => { - const { name: pipelineName, ...pipelineDefinition } = pipeline; - - setIsExecuting(true); - setExecuteError(null); - - const { error, data: output } = await services.api.simulatePipeline({ - documents, - verbose, - pipeline: pipelineDefinition, - }); - - setIsExecuting(false); - - if (error) { - setExecuteError(error); - return; - } - - setExecuteOutput(output); - - services.notifications.toasts.addSuccess( - i18n.translate('xpack.ingestPipelines.testPipelineFlyout.successNotificationText', { - defaultMessage: 'Pipeline executed', - }), - { - toastLifeTimeMs: 1000, - } - ); - - setSelectedTab('output'); - }, - [pipeline, services.api, services.notifications.toasts] - ); - - useEffect(() => { - if (cachedDocuments) { - setShouldExecuteImmediately(true); - } - // We only want to know on initial mount if there are cached documents - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - useEffect(() => { - // If the user has already tested the pipeline once, - // use the cached test config and automatically execute the pipeline - if (shouldExecuteImmediately && Object.entries(pipeline).length > 0) { - setShouldExecuteImmediately(false); - handleExecute(cachedDocuments!, cachedVerbose); - } - }, [ - pipeline, - handleExecute, - cachedDocuments, - cachedVerbose, - isExecuting, - shouldExecuteImmediately, - ]); - - let tabContent; - - if (selectedTab === 'output') { - tabContent = ( - - ); - } else { - // default to "documents" tab - tabContent = ( - - ); - } - - return ( - - - -

- {pipeline.name ? ( - - ) : ( - - )} -

-
-
- - - !executeOutput && tabId === 'output'} - /> - - - - {/* Execute error */} - {executeError ? ( - <> - - } - color="danger" - iconType="alert" - > -

{executeError.message}

-
- - - ) : null} - - {/* Invalid pipeline error */} - {!isPipelineValid ? ( - <> - - } - color="danger" - iconType="alert" - /> - - - ) : null} - - {/* Documents or output tab content */} - {tabContent} -
-
- ); -}; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/pipeline_test_flyout_provider.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/pipeline_test_flyout_provider.tsx deleted file mode 100644 index 7f91672d64df4..0000000000000 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/pipeline_test_flyout_provider.tsx +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 React, { useState, useEffect } from 'react'; - -import { Pipeline } from '../../../../../common/types'; -import { useFormContext } from '../../../../shared_imports'; - -import { ReadProcessorsFunction } from '../types'; - -import { PipelineTestFlyout, PipelineTestFlyoutProps } from './pipeline_test_flyout'; - -interface Props extends Omit { - readProcessors: ReadProcessorsFunction; -} - -export const PipelineTestFlyoutProvider: React.FunctionComponent = ({ - closeFlyout, - readProcessors, -}) => { - const form = useFormContext(); - const [formData, setFormData] = useState({} as Pipeline); - const [isFormDataValid, setIsFormDataValid] = useState(false); - - useEffect(() => { - const subscription = form.subscribe(async ({ isValid, validate, data }) => { - const isFormValid = isValid ?? (await validate()); - if (isFormValid) { - setFormData(data.format() as Pipeline); - } - setIsFormDataValid(isFormValid); - }); - - return subscription.unsubscribe; - }, [form]); - - return ( - - ); -}; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/processors_header.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/processors_header.tsx index 5e5cddbd36b92..3e8cd999a484a 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/processors_header.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/processors_header.tsx @@ -5,25 +5,23 @@ */ import React, { FunctionComponent } from 'react'; -import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiLink, EuiText, EuiTitle } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiText, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { usePipelineProcessorsContext } from '../pipeline_processors_editor/context'; -import { LoadFromJsonButton, OnDoneLoadJsonHandler } from '../pipeline_processors_editor'; +import { + LoadFromJsonButton, + OnDoneLoadJsonHandler, + TestPipelineButton, +} from '../pipeline_processors_editor'; export interface Props { - onTestPipelineClick: () => void; - isTestButtonDisabled: boolean; onLoadJson: OnDoneLoadJsonHandler; } -export const ProcessorsHeader: FunctionComponent = ({ - onTestPipelineClick, - isTestButtonDisabled, - onLoadJson, -}) => { +export const ProcessorsHeader: FunctionComponent = ({ onLoadJson }) => { const { links } = usePipelineProcessorsContext(); return ( = ({ - - - + ); diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/pipeline_processors_editor.helpers.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/pipeline_processors_editor.helpers.tsx index e7258a74f4732..227513dcdaacc 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/pipeline_processors_editor.helpers.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/pipeline_processors_editor.helpers.tsx @@ -7,7 +7,7 @@ import { act } from 'react-dom/test-utils'; import React from 'react'; import { registerTestBed, TestBed } from '../../../../../../../test_utils'; import { - PipelineProcessorsContextProvider, + ProcessorsEditorContextProvider, Props, ProcessorsEditor, GlobalOnFailureProcessorsEditor, @@ -62,9 +62,9 @@ jest.mock('react-virtualized', () => { const testBedSetup = registerTestBed( (props: Props) => ( - + - + ), { doMountAsync: false, diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/pipeline_processors_editor.test.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/pipeline_processors_editor.test.tsx index df4832f9a45e0..a45a677846b2e 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/pipeline_processors_editor.test.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/__jest__/pipeline_processors_editor.test.tsx @@ -3,8 +3,11 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ +import { notificationServiceMock } from 'src/core/public/mocks'; + import { setup, SetupResult } from './pipeline_processors_editor.helpers'; import { Pipeline } from '../../../../../common/types'; +import { apiService } from '../../../services'; const testProcessors: Pick = { processors: [ @@ -46,6 +49,8 @@ describe('Pipeline Editor', () => { links: { esDocsBasePath: 'test', }, + toasts: notificationServiceMock.createSetupContract().toasts, + api: apiService, }); }); diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/index.ts index b532b2d953e65..bf724be950fdf 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/index.ts @@ -20,4 +20,6 @@ export { ProcessorRemoveModal } from './processor_remove_modal'; export { OnDoneLoadJsonHandler, LoadFromJsonButton } from './load_from_json'; +export { TestPipelineButton } from './test_pipeline'; + export { PipelineProcessorsItemTooltip, Position } from './pipeline_processors_editor_item_tooltip'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor.tsx index c89ff1d3d99ac..ef8bf790a18aa 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor.tsx @@ -21,6 +21,7 @@ export const PipelineProcessorsEditor: FunctionComponent = memo( state: { editor, processors }, } = usePipelineProcessorsContext(); const baseSelector = useMemo(() => [stateSlice], [stateSlice]); + return ( { + return ( + + {(openFlyout) => { + return ( + + {i18nTexts.buttonLabel} + + ); + }} + + ); +}; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_provider.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_provider.tsx new file mode 100644 index 0000000000000..ad88259e3bcc4 --- /dev/null +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_provider.tsx @@ -0,0 +1,171 @@ +/* + * 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 React, { useState, useEffect, useCallback } from 'react'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { i18n } from '@kbn/i18n'; + +import { + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutHeader, + EuiSpacer, + EuiTitle, + EuiCallOut, +} from '@elastic/eui'; + +import { usePipelineProcessorsContext, useTestConfigContext } from '../../context'; +import { serialize } from '../../serialize'; + +import { Tabs, Tab, OutputTab, DocumentsTab } from './flyout_tabs'; + +export interface Props { + children: (openFlyout: () => void) => React.ReactNode; +} + +export const FlyoutProvider: React.FunctionComponent = ({ children }) => { + const { + state: { processors }, + api, + toasts, + } = usePipelineProcessorsContext(); + + const serializedProcessors = serialize(processors.state); + + const { testConfig } = useTestConfigContext(); + const { documents: cachedDocuments, verbose: cachedVerbose } = testConfig; + + const [isFlyoutVisible, setIsFlyoutVisible] = useState(false); + + const initialSelectedTab = cachedDocuments ? 'output' : 'documents'; + const [selectedTab, setSelectedTab] = useState(initialSelectedTab); + + const [shouldExecuteImmediately, setShouldExecuteImmediately] = useState(false); + const [isExecuting, setIsExecuting] = useState(false); + const [executeError, setExecuteError] = useState(null); + const [executeOutput, setExecuteOutput] = useState(undefined); + + const handleExecute = useCallback( + async (documents: object[], verbose?: boolean) => { + setIsExecuting(true); + setExecuteError(null); + + const { error, data: output } = await api.simulatePipeline({ + documents, + verbose, + pipeline: { ...serializedProcessors }, + }); + + setIsExecuting(false); + + if (error) { + setExecuteError(error); + return; + } + + setExecuteOutput(output); + + toasts.addSuccess( + i18n.translate('xpack.ingestPipelines.testPipelineFlyout.successNotificationText', { + defaultMessage: 'Pipeline executed', + }), + { + toastLifeTimeMs: 1000, + } + ); + + setSelectedTab('output'); + }, + [serializedProcessors, api, toasts] + ); + + useEffect(() => { + if (isFlyoutVisible === false && cachedDocuments) { + setShouldExecuteImmediately(true); + } + }, [isFlyoutVisible, cachedDocuments]); + + useEffect(() => { + // If the user has already tested the pipeline once, + // use the cached test config and automatically execute the pipeline + if (isFlyoutVisible && shouldExecuteImmediately && cachedDocuments) { + setShouldExecuteImmediately(false); + handleExecute(cachedDocuments!, cachedVerbose); + } + }, [handleExecute, cachedDocuments, cachedVerbose, isFlyoutVisible, shouldExecuteImmediately]); + + let tabContent; + + if (selectedTab === 'output') { + tabContent = ( + + ); + } else { + // default to "Documents" tab + tabContent = ; + } + + return ( + <> + {children(() => setIsFlyoutVisible(true))} + + {isFlyoutVisible && ( + setIsFlyoutVisible(false)} + data-test-subj="testPipelineFlyout" + > + + +

+ +

+
+
+ + + !executeOutput && tabId === 'output'} + /> + + + + {/* Execute error */} + {executeError ? ( + <> + + } + color="danger" + iconType="alert" + > +

{executeError.message}

+
+ + + ) : null} + + {/* Documents or output tab content */} + {tabContent} +
+
+ )} + + ); +}; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_tabs/index.ts similarity index 100% rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/index.ts rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_tabs/index.ts diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/pipeline_test_tabs.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_tabs/pipeline_test_tabs.tsx similarity index 100% rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/pipeline_test_tabs.tsx rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_tabs/pipeline_test_tabs.tsx diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/schema.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_tabs/schema.tsx similarity index 96% rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/schema.tsx rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_tabs/schema.tsx index de9910344bd4b..e8ac223d56ed9 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/schema.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_tabs/schema.tsx @@ -9,8 +9,8 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; import { EuiCode } from '@elastic/eui'; -import { FormSchema, fieldValidators, ValidationFuncArg } from '../../../../../shared_imports'; -import { parseJson, stringifyJson } from '../../../../lib'; +import { FormSchema, fieldValidators, ValidationFuncArg } from '../../../../../../shared_imports'; +import { parseJson, stringifyJson } from '../../../../../lib'; const { emptyField, isJsonField } = fieldValidators; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/tab_documents.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_tabs/tab_documents.tsx similarity index 85% rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/tab_documents.tsx rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_tabs/tab_documents.tsx index be9ebc57c69ee..593347f8b2343 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_test_flyout/tabs/tab_documents.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/flyout_tabs/tab_documents.tsx @@ -17,32 +17,27 @@ import { Form, useForm, FormConfig, - useKibana, -} from '../../../../../shared_imports'; +} from '../../../../../../shared_imports'; + +import { usePipelineProcessorsContext, useTestConfigContext, TestConfig } from '../../../context'; import { documentsSchema } from './schema'; -import { useTestConfigContext, TestConfig } from '../../test_config_context'; const UseField = getUseField({ component: Field }); interface Props { handleExecute: (documents: object[], verbose: boolean) => void; - isPipelineValid: boolean; isExecuting: boolean; } -export const DocumentsTab: React.FunctionComponent = ({ - isPipelineValid, - handleExecute, - isExecuting, -}) => { - const { services } = useKibana(); +export const DocumentsTab: React.FunctionComponent = ({ handleExecute, isExecuting }) => { + const { links } = usePipelineProcessorsContext(); const { setCurrentTestConfig, testConfig } = useTestConfigContext(); const { verbose: cachedVerbose, documents: cachedDocuments } = testConfig; const executePipeline: FormConfig['onSubmit'] = async (formData, isValid) => { - if (!isValid || !isPipelineValid) { + if (!isValid) { return; } @@ -76,7 +71,7 @@ export const DocumentsTab: React.FunctionComponent = ({ values={{ learnMoreLink: ( @@ -98,7 +93,7 @@ export const DocumentsTab: React.FunctionComponent = ({
{/* Documents editor */} @@ -125,7 +120,7 @@ export const DocumentsTab: React.FunctionComponent = ({ onClick={form.submit} size="s" isLoading={isExecuting} - disabled={(form.isSubmitted && !form.isValid) || !isPipelineValid} + disabled={form.isSubmitted && !form.isValid} > {isExecuting ? ( = ({ + children, + links, + api, + toasts, + onUpdate, + value, + onFlyoutOpen, +}: Props) => { + return ( + + + {children} + + + ); +}; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/context/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/context/index.ts new file mode 100644 index 0000000000000..1664b3410c1c0 --- /dev/null +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/context/index.ts @@ -0,0 +1,15 @@ +/* + * 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 { ProcessorsEditorContextProvider } from './context'; + +export { TestConfigContextProvider, useTestConfigContext, TestConfig } from './test_config_context'; + +export { + PipelineProcessorsContextProvider, + usePipelineProcessorsContext, + Props, +} from './processors_context'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/context.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/context/processors_context.tsx similarity index 91% rename from x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/context.tsx rename to x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/context/processors_context.tsx index 098473b0d2572..db4629823ef52 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/context.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/context/processors_context.tsx @@ -15,7 +15,10 @@ import React, { useRef, } from 'react'; -import { Processor } from '../../../../common/types'; +import { NotificationsSetup } from 'src/core/public'; + +import { Processor } from '../../../../../common/types'; +import { ApiService } from '../../../services'; import { EditorMode, @@ -26,29 +29,31 @@ import { ContextValueState, Links, ProcessorInternal, -} from './types'; +} from '../types'; -import { useProcessorsState, isOnFailureSelector } from './processors_reducer'; +import { useProcessorsState, isOnFailureSelector } from '../processors_reducer'; -import { deserialize } from './deserialize'; +import { deserialize } from '../deserialize'; -import { serialize } from './serialize'; +import { serialize } from '../serialize'; -import { OnActionHandler } from './components/processors_tree'; +import { OnActionHandler } from '../components/processors_tree'; import { ProcessorRemoveModal, PipelineProcessorsItemTooltip, ProcessorSettingsForm, OnSubmitHandler, -} from './components'; +} from '../components'; -import { getValue } from './utils'; +import { getValue } from '../utils'; const PipelineProcessorsContext = createContext({} as any); export interface Props { links: Links; + api: ApiService; + toasts: NotificationsSetup['toasts']; value: { processors: Processor[]; onFailure?: Processor[]; @@ -62,6 +67,8 @@ export interface Props { export const PipelineProcessorsContextProvider: FunctionComponent = ({ links, + api, + toasts, value: { processors: originalProcessors, onFailure: originalOnFailureProcessors }, onUpdate, onFlyoutOpen, @@ -205,6 +212,8 @@ export const PipelineProcessorsContextProvider: FunctionComponent = ({ ; + pipeline: Pick; }) { const result = await this.sendRequest({ path: `${API_BASE_PATH}/simulate`, diff --git a/x-pack/plugins/ingest_pipelines/public/application/services/documentation.ts b/x-pack/plugins/ingest_pipelines/public/application/services/documentation.ts index 7f6a87a46fea3..daed338eb6ab4 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/services/documentation.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/services/documentation.ts @@ -34,10 +34,6 @@ export class DocumentationService { public getPutPipelineApiUrl() { return `${this.esDocBasePath}/put-pipeline-api.html`; } - - public getSimulatePipelineApiUrl() { - return `${this.esDocBasePath}/simulate-pipeline-api.html`; - } } export const documentationService = new DocumentationService(); diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index aa12e2a34075e..7e1ce610a1948 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -9799,7 +9799,6 @@ "xpack.ingestPipelines.pipelineEditor.setForm.valueFieldLabel": "値", "xpack.ingestPipelines.pipelineEditor.setForm.valueRequiredError": "設定する値が必要です。", "xpack.ingestPipelines.pipelineEditor.settingsForm.learnMoreLabelLink.processor": "{processorLabel}ドキュメント", - "xpack.ingestPipelines.pipelineEditor.testPipelineButtonLabel": "パイプラインをテスト", "xpack.ingestPipelines.pipelineEditor.typeField.fieldRequiredError": "タイプが必要です。", "xpack.ingestPipelines.pipelineEditor.typeField.typeFieldLabel": "プロセッサー", "xpack.ingestPipelines.processors.label.append": "末尾に追加", @@ -9857,13 +9856,11 @@ "xpack.ingestPipelines.testPipelineFlyout.documentsTab.simulateDocumentionLink": "詳細", "xpack.ingestPipelines.testPipelineFlyout.documentsTab.tabDescriptionText": "投入するパイプラインのドキュメントの配列を指定します。{learnMoreLink}", "xpack.ingestPipelines.testPipelineFlyout.executePipelineError": "パイプラインを実行できません", - "xpack.ingestPipelines.testPipelineFlyout.invalidPipelineErrorMessage": "実行するパイプラインが無効です。", "xpack.ingestPipelines.testPipelineFlyout.outputTab.descriptionLinkLabel": "出力を更新", "xpack.ingestPipelines.testPipelineFlyout.outputTab.descriptionText": "出力データを表示するか、パイプライン経由で渡されるときに各プロセッサーがドキュメントにどのように影響するのかを確認します。", "xpack.ingestPipelines.testPipelineFlyout.outputTab.verboseSwitchLabel": "冗長出力を表示", "xpack.ingestPipelines.testPipelineFlyout.successNotificationText": "パイプラインが実行されました", "xpack.ingestPipelines.testPipelineFlyout.title": "パイプラインをテスト", - "xpack.ingestPipelines.testPipelineFlyout.withPipelineNameTitle": "パイプライン'{pipelineName}'をテスト", "xpack.lens.app.docLoadingError": "保存されたドキュメントの保存中にエラーが発生", "xpack.lens.app.docSavingError": "ドキュメントの保存中にエラーが発生", "xpack.lens.app.indexPatternLoadingError": "インデックスパターンの読み込み中にエラーが発生", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index befce4de3d247..e82ba7cc1d60f 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -9801,7 +9801,6 @@ "xpack.ingestPipelines.pipelineEditor.setForm.valueFieldLabel": "值", "xpack.ingestPipelines.pipelineEditor.setForm.valueRequiredError": "需要设置值。", "xpack.ingestPipelines.pipelineEditor.settingsForm.learnMoreLabelLink.processor": "{processorLabel}文档", - "xpack.ingestPipelines.pipelineEditor.testPipelineButtonLabel": "测试管道", "xpack.ingestPipelines.pipelineEditor.typeField.fieldRequiredError": "类型必填。", "xpack.ingestPipelines.pipelineEditor.typeField.typeFieldLabel": "处理器", "xpack.ingestPipelines.processors.label.append": "追加", @@ -9859,13 +9858,11 @@ "xpack.ingestPipelines.testPipelineFlyout.documentsTab.simulateDocumentionLink": "了解详情", "xpack.ingestPipelines.testPipelineFlyout.documentsTab.tabDescriptionText": "为管道提供要采集的一系列文档。{learnMoreLink}", "xpack.ingestPipelines.testPipelineFlyout.executePipelineError": "无法执行管道", - "xpack.ingestPipelines.testPipelineFlyout.invalidPipelineErrorMessage": "要执行的管道无效。", "xpack.ingestPipelines.testPipelineFlyout.outputTab.descriptionLinkLabel": "刷新输出", "xpack.ingestPipelines.testPipelineFlyout.outputTab.descriptionText": "查看输出数据或了解文档通过管道时每个处理器对文档的影响。", "xpack.ingestPipelines.testPipelineFlyout.outputTab.verboseSwitchLabel": "查看详细输出", "xpack.ingestPipelines.testPipelineFlyout.successNotificationText": "管道已执行", "xpack.ingestPipelines.testPipelineFlyout.title": "测试管道", - "xpack.ingestPipelines.testPipelineFlyout.withPipelineNameTitle": "测试管道“{pipelineName}”", "xpack.lens.app.docLoadingError": "加载已保存文档时出错", "xpack.lens.app.docSavingError": "保存文档时出错", "xpack.lens.app.indexPatternLoadingError": "加载索引模式时出错", From 87596465766158ccd758bb7eafa10d4d6d6acb99 Mon Sep 17 00:00:00 2001 From: Mikhail Shustov Date: Wed, 5 Aug 2020 16:28:03 +0300 Subject: [PATCH 09/34] update docs (#74364) --- .../architecture/code-exploration.asciidoc | 74 ++++++++++--------- 1 file changed, 41 insertions(+), 33 deletions(-) diff --git a/docs/developer/architecture/code-exploration.asciidoc b/docs/developer/architecture/code-exploration.asciidoc index 4481dea44795c..bb7222020180c 100644 --- a/docs/developer/architecture/code-exploration.asciidoc +++ b/docs/developer/architecture/code-exploration.asciidoc @@ -58,9 +58,9 @@ The Charts plugin is a way to create easier integration of shared colors, themes WARNING: Missing README. -- {kib-repo}blob/{branch}/src/plugins/dashboard[dashboard] +- {kib-repo}blob/{branch}/src/plugins/dashboard/README.md[dashboard] -WARNING: Missing README. +Contains the dashboard application. - {kib-repo}blob/{branch}/src/plugins/data/README.md[data] @@ -76,9 +76,9 @@ Routing will be handled by the id of the dev tool - your dev tool will be mounte This API doesn't support angular, for registering angular dev tools, bootstrap a local module on mount into the given HTML element. -- {kib-repo}blob/{branch}/src/plugins/discover[discover] +- {kib-repo}blob/{branch}/src/plugins/discover/README.md[discover] -WARNING: Missing README. +Contains the Discover application and the saved search embeddable. - {kib-repo}blob/{branch}/src/plugins/embeddable/README.md[embeddable] @@ -109,9 +109,9 @@ Moves the legacy ui/registry/feature_catalogue module for registering "features" WARNING: Missing README. -- {kib-repo}blob/{branch}/src/plugins/input_control_vis[inputControlVis] +- {kib-repo}blob/{branch}/src/plugins/input_control_vis/README.md[inputControlVis] -WARNING: Missing README. +Contains the input control visualization allowing to place custom filter controls on a dashboard. - {kib-repo}blob/{branch}/src/plugins/inspector/README.md[inspector] @@ -206,9 +206,10 @@ This plugin adds the Advanced Settings section for the Usage Data collection (ak WARNING: Missing README. -- {kib-repo}blob/{branch}/src/plugins/timelion[timelion] +- {kib-repo}blob/{branch}/src/plugins/timelion/README.md[timelion] -WARNING: Missing README. +Contains the deprecated timelion application. For the timelion visualization, +which also contains the timelion APIs and backend, look at the vis_type_timelion plugin. - {kib-repo}blob/{branch}/src/plugins/ui_actions/README.md[uiActions] @@ -222,59 +223,63 @@ Usage Collection allows collecting usage data for other services to consume (tel To integrate with the telemetry services for usage collection of your feature, there are 2 steps: -- {kib-repo}blob/{branch}/src/plugins/vis_type_markdown[visTypeMarkdown] +- {kib-repo}blob/{branch}/src/plugins/vis_type_markdown/README.md[visTypeMarkdown] -WARNING: Missing README. +The markdown visualization that can be used to place text panels on dashboards. -- {kib-repo}blob/{branch}/src/plugins/vis_type_metric[visTypeMetric] +- {kib-repo}blob/{branch}/src/plugins/vis_type_metric/README.md[visTypeMetric] -WARNING: Missing README. +Contains the metric visualization. -- {kib-repo}blob/{branch}/src/plugins/vis_type_table[visTypeTable] +- {kib-repo}blob/{branch}/src/plugins/vis_type_table/README.md[visTypeTable] -WARNING: Missing README. +Contains the data table visualization, that allows presenting data in a simple table format. -- {kib-repo}blob/{branch}/src/plugins/vis_type_tagcloud[visTypeTagcloud] +- {kib-repo}blob/{branch}/src/plugins/vis_type_tagcloud/README.md[visTypeTagcloud] -WARNING: Missing README. +Contains the tagcloud visualization. - {kib-repo}blob/{branch}/src/plugins/vis_type_timelion/README.md[visTypeTimelion] -If your grammar was changed in public/chain.peg you need to re-generate the static parser. You could use a grunt task: +Contains the timelion visualization and the timelion backend. -- {kib-repo}blob/{branch}/src/plugins/vis_type_timeseries[visTypeTimeseries] +- {kib-repo}blob/{branch}/src/plugins/vis_type_timeseries/README.md[visTypeTimeseries] -WARNING: Missing README. +Contains everything around TSVB (the editor, visualizatin implementations and backends). -- {kib-repo}blob/{branch}/src/plugins/vis_type_vega[visTypeVega] +- {kib-repo}blob/{branch}/src/plugins/vis_type_vega/README.md[visTypeVega] -WARNING: Missing README. +Contains the Vega visualization. -- {kib-repo}blob/{branch}/src/plugins/vis_type_vislib[visTypeVislib] +- {kib-repo}blob/{branch}/src/plugins/vis_type_vislib/README.md[visTypeVislib] -WARNING: Missing README. +Contains the vislib visualizations. These are the classical area/line/bar, pie, gauge/goal and +heatmap charts. -- {kib-repo}blob/{branch}/src/plugins/vis_type_xy[visTypeXy] +- {kib-repo}blob/{branch}/src/plugins/vis_type_xy/README.md[visTypeXy] -WARNING: Missing README. +Contains the new xy-axis chart using the elastic-charts library, which will eventually +replace the vislib xy-axis (bar, area, line) charts. -- {kib-repo}blob/{branch}/src/plugins/visualizations[visualizations] +- {kib-repo}blob/{branch}/src/plugins/visualizations/README.md[visualizations] -WARNING: Missing README. +Contains most of the visualization infrastructure, e.g. the visualization type registry or the +visualization embeddable. -- {kib-repo}blob/{branch}/src/plugins/visualize[visualize] +- {kib-repo}blob/{branch}/src/plugins/visualize/README.md[visualize] -WARNING: Missing README. +Contains the visualize application which includes the listing page and the app frame, +which will load the visualization's editor. [discrete] @@ -345,9 +350,12 @@ You can run a local cluster and simulate a remote cluster within a single Kibana - {kib-repo}blob/{branch}/x-pack/plugins/dashboard_enhanced/README.md[dashboardEnhanced] -- {kib-repo}blob/{branch}/x-pack/plugins/dashboard_mode[dashboardMode] +Contains the enhancements to the OSS dashboard app. -WARNING: Missing README. + +- {kib-repo}blob/{branch}/x-pack/plugins/dashboard_mode/README.md[dashboardMode] + +The deprecated dashboard only mode. - {kib-repo}blob/{branch}/x-pack/plugins/data_enhanced[dataEnhanced] @@ -355,9 +363,9 @@ WARNING: Missing README. WARNING: Missing README. -- {kib-repo}blob/{branch}/x-pack/plugins/discover_enhanced[discoverEnhanced] +- {kib-repo}blob/{branch}/x-pack/plugins/discover_enhanced/README.md[discoverEnhanced] -WARNING: Missing README. +Contains the enhancements to the OSS discover app. - {kib-repo}blob/{branch}/x-pack/plugins/embeddable_enhanced[embeddableEnhanced] From 3fb77fb546054d11b2aa731ab205f82e2b51d4f3 Mon Sep 17 00:00:00 2001 From: Melissa Alvarez Date: Wed, 5 Aug 2020 10:31:47 -0400 Subject: [PATCH 10/34] [ML] DF Analytics creation wizard: show link to results (#74025) * show view results card once job complete * update types * update types and move css to own file --- .../data_frame_analytics/_index.scss | 1 + .../analytics_creation/components/_index.scss | 3 + .../back_to_list_panel/back_to_list_panel.tsx | 6 +- .../components/create_step/create_step.tsx | 10 +- .../create_step_footer.tsx} | 122 +++++++----------- .../components/create_step_footer/index.ts | 7 + .../create_step_footer/progress_stats.tsx | 83 ++++++++++++ .../components/view_results_panel/index.ts | 7 + .../view_results_panel/view_results_panel.tsx | 46 +++++++ .../components/analytics_list/common.ts | 2 +- 10 files changed, 201 insertions(+), 86 deletions(-) create mode 100644 x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/_index.scss rename x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/{create_step/progress_stats.tsx => create_step_footer/create_step_footer.tsx} (55%) create mode 100644 x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/index.ts create mode 100644 x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/progress_stats.tsx create mode 100644 x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/index.ts create mode 100644 x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/view_results_panel.tsx diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/_index.scss b/x-pack/plugins/ml/public/application/data_frame_analytics/_index.scss index 140593cb17f6e..231d0f6a0d8c5 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/_index.scss +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/_index.scss @@ -1,3 +1,4 @@ @import 'pages/analytics_exploration/components/regression_exploration/index'; @import 'pages/analytics_management/components/analytics_list/index'; @import 'pages/analytics_management/components/create_analytics_button/index'; +@import 'pages/analytics_creation/components/index'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/_index.scss b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/_index.scss new file mode 100644 index 0000000000000..28d0928eb4d35 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/_index.scss @@ -0,0 +1,3 @@ +.dfAnalyticsCreationWizard__card { + width: 300px; +} diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx index 183cbe084f9b3..babb557105270 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx @@ -5,7 +5,7 @@ */ import React, { FC, Fragment } from 'react'; -import { EuiCard, EuiHorizontalRule, EuiIcon } from '@elastic/eui'; +import { EuiCard, EuiIcon } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { useNavigateToPath } from '../../../../../contexts/kibana'; @@ -18,10 +18,8 @@ export const BackToListPanel: FC = () => { return ( - } title={i18n.translate('xpack.ml.dataframe.analytics.create.analyticsListCardTitle', { defaultMessage: 'Data Frame Analytics', diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/create_step.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/create_step.tsx index 8ad49b84134cb..dc9f1bd586d9f 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/create_step.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/create_step.tsx @@ -18,8 +18,7 @@ import { i18n } from '@kbn/i18n'; import { CreateAnalyticsFormProps } from '../../../analytics_management/hooks/use_create_analytics_form'; import { Messages } from '../shared'; import { ANALYTICS_STEPS } from '../../page'; -import { BackToListPanel } from '../back_to_list_panel'; -import { ProgressStats } from './progress_stats'; +import { CreateStepFooter } from '../create_step_footer'; interface Props extends CreateAnalyticsFormProps { step: ANALYTICS_STEPS; @@ -28,7 +27,7 @@ interface Props extends CreateAnalyticsFormProps { export const CreateStep: FC = ({ actions, state, step }) => { const { createAnalyticsJob, startAnalyticsJob } = actions; const { isAdvancedEditorValidJson, isJobCreated, isJobStarted, isValid, requestMessages } = state; - const { jobId } = state.form; + const { jobId, jobType } = state.form; const [checked, setChecked] = useState(true); const [showProgress, setShowProgress] = useState(false); @@ -86,8 +85,9 @@ export const CreateStep: FC = ({ actions, state, step }) => { )} - {isJobCreated === true && showProgress && } - {isJobCreated === true && } + {isJobCreated === true && ( + + )} ); }; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/progress_stats.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/create_step_footer.tsx similarity index 55% rename from x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/progress_stats.tsx rename to x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/create_step_footer.tsx index c87f0f4206feb..93d88ebc0b5ac 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/progress_stats.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/create_step_footer.tsx @@ -4,38 +4,43 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { FC, useState, useEffect } from 'react'; -import { - EuiCallOut, - EuiFlexGroup, - EuiFlexItem, - EuiProgress, - EuiSpacer, - EuiText, -} from '@elastic/eui'; +import React, { FC, useEffect, useState } from 'react'; +import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { useMlKibana } from '../../../../../contexts/kibana'; + import { getDataFrameAnalyticsProgressPhase, DATA_FRAME_TASK_STATE, } from '../../../analytics_management/components/analytics_list/common'; import { isGetDataFrameAnalyticsStatsResponseOk } from '../../../analytics_management/services/analytics_service/get_analytics'; +import { useMlKibana } from '../../../../../contexts/kibana'; import { ml } from '../../../../../services/ml_api_service'; -import { DataFrameAnalyticsId } from '../../../../common/analytics'; +import { BackToListPanel } from '../back_to_list_panel'; +import { ViewResultsPanel } from '../view_results_panel'; +import { ProgressStats } from './progress_stats'; +import { ANALYSIS_CONFIG_TYPE } from '../../../../common/analytics'; export const PROGRESS_REFRESH_INTERVAL_MS = 1000; -export const ProgressStats: FC<{ jobId: DataFrameAnalyticsId }> = ({ jobId }) => { +interface Props { + jobId: string; + jobType: ANALYSIS_CONFIG_TYPE; + showProgress: boolean; +} + +export interface AnalyticsProgressStats { + currentPhase: number; + progress: number; + totalPhases: number; +} + +export const CreateStepFooter: FC = ({ jobId, jobType, showProgress }) => { const [initialized, setInitialized] = useState(false); const [failedJobMessage, setFailedJobMessage] = useState(undefined); - const [currentProgress, setCurrentProgress] = useState< - | { - currentPhase: number; - progress: number; - totalPhases: number; - } - | undefined - >(undefined); + const [jobFinished, setJobFinished] = useState(false); + const [currentProgress, setCurrentProgress] = useState( + undefined + ); const { services: { notifications }, @@ -77,6 +82,7 @@ export const ProgressStats: FC<{ jobId: DataFrameAnalyticsId }> = ({ jobId }) => jobStats.state === DATA_FRAME_TASK_STATE.STOPPED ) { clearInterval(interval); + setJobFinished(true); } } else { clearInterval(interval); @@ -95,62 +101,26 @@ export const ProgressStats: FC<{ jobId: DataFrameAnalyticsId }> = ({ jobId }) => return () => clearInterval(interval); }, [initialized]); - if (currentProgress === undefined) return null; - return ( - <> - - {failedJobMessage !== undefined && ( - <> - -

{failedJobMessage}

-
- - - )} - - - {i18n.translate('xpack.ml.dataframe.analytics.create.analyticsProgressTitle', { - defaultMessage: 'Progress', - })} - - - - - - - - {i18n.translate('xpack.ml.dataframe.analytics.create.analyticsProgressPhaseTitle', { - defaultMessage: 'Phase', - })}{' '} - {currentProgress.currentPhase}/{currentProgress.totalPhases} - - - - - - - - {`${currentProgress.progress}%`} - - - + + + {showProgress && ( + + )} + + + + + + + + {jobFinished === true && ( + + + + )} + + + ); }; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/index.ts new file mode 100644 index 0000000000000..fc4e230ba1034 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/index.ts @@ -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 { CreateStepFooter } from './create_step_footer'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/progress_stats.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/progress_stats.tsx new file mode 100644 index 0000000000000..522bafa54a270 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/progress_stats.tsx @@ -0,0 +1,83 @@ +/* + * 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 React, { FC } from 'react'; +import { + EuiCallOut, + EuiFlexGroup, + EuiFlexItem, + EuiProgress, + EuiSpacer, + EuiText, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { AnalyticsProgressStats } from './create_step_footer'; + +interface Props { + currentProgress?: AnalyticsProgressStats; + failedJobMessage: string | undefined; +} + +export const ProgressStats: FC = ({ currentProgress, failedJobMessage }) => { + if (currentProgress === undefined) return null; + + return ( + <> + + {failedJobMessage !== undefined && ( + <> + +

{failedJobMessage}

+
+ + + )} + + + {i18n.translate('xpack.ml.dataframe.analytics.create.analyticsProgressTitle', { + defaultMessage: 'Progress', + })} + + + + + + + + {i18n.translate('xpack.ml.dataframe.analytics.create.analyticsProgressPhaseTitle', { + defaultMessage: 'Phase', + })}{' '} + {currentProgress.currentPhase}/{currentProgress.totalPhases} + + + + + + + + {`${currentProgress.progress}%`} + + + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/index.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/index.ts new file mode 100644 index 0000000000000..ef3c0cce38652 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/index.ts @@ -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 { ViewResultsPanel } from './view_results_panel'; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/view_results_panel.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/view_results_panel.tsx new file mode 100644 index 0000000000000..13706eb548ec8 --- /dev/null +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/view_results_panel.tsx @@ -0,0 +1,46 @@ +/* + * 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 React, { FC, Fragment } from 'react'; +import { EuiCard, EuiIcon } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { useNavigateToPath } from '../../../../../contexts/kibana'; +import { getResultsUrl } from '../../../analytics_management/components/analytics_list/common'; +import { ANALYSIS_CONFIG_TYPE } from '../../../../common/analytics'; + +interface Props { + jobId: string; + analysisType: ANALYSIS_CONFIG_TYPE; +} + +export const ViewResultsPanel: FC = ({ jobId, analysisType }) => { + const navigateToPath = useNavigateToPath(); + + const redirectToAnalyticsManagementPage = async () => { + const path = getResultsUrl(jobId, analysisType); + await navigateToPath(path); + }; + + return ( + + } + title={i18n.translate('xpack.ml.dataframe.analytics.create.viewResultsCardTitle', { + defaultMessage: 'View Results', + })} + description={i18n.translate( + 'xpack.ml.dataframe.analytics.create.viewResultsCardDescription', + { + defaultMessage: 'View results for the analytics job.', + } + )} + onClick={redirectToAnalyticsManagementPage} + data-test-subj="analyticsWizardViewResultsCard" + /> + + ); +}; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/common.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/common.ts index e2d9ecccf0626..cc52138d7c7b7 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/common.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/common.ts @@ -130,6 +130,6 @@ export function isCompletedAnalyticsJob(stats: DataFrameAnalyticsStats) { return stats.state === DATA_FRAME_TASK_STATE.STOPPED && progress === 100; } -export function getResultsUrl(jobId: string, analysisType: string) { +export function getResultsUrl(jobId: string, analysisType: ANALYSIS_CONFIG_TYPE | string) { return `#/data_frame_analytics/exploration?_g=(ml:(jobId:${jobId},analysisType:${analysisType}))`; } From 88c063134464047c5da471e480dd26cabe471a02 Mon Sep 17 00:00:00 2001 From: Mikhail Shustov Date: Wed, 5 Aug 2020 18:32:19 +0300 Subject: [PATCH 11/34] Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091) * bump @typescript-eslint deps * update rules * fix errors in pacakges * fix src/ * fix x-pack * fix test * fix typings * fix examples * allow _ as prefix and suffix * roll back prefix and suffix changes * add eslint-plugin-eslint-comments * report unused rules * remove unused eslint comments from tests * remove unused eslint comments 2nd pass * remove unused eslint comments from src/ * remove unused comments in x-pack * use no-script-url and no-unsanitized/property for ts files * remove unused eslint comments * eui/href-or-on-click removed when not complained * no import/* rules for ts files * cleanup * remove the unused eslint-disable * rollback unnecessary changes * allow underscore prefix & sufix in type name * update docs * fix type error in enterprise search plugin mocks * rename platform hack __coreProvider --> _coreProvider * rollback space removal in src/core/public/legacy/legacy_service.test.ts * fix naming convention in APM --- ...a_utils-public-state_sync.isyncstateref.md | 2 +- .../public/components/create_alert.tsx | 1 + examples/alerting_example/public/plugin.tsx | 1 + kibana.d.ts | 1 - package.json | 5 +- packages/eslint-config-kibana/package.json | 9 +- packages/eslint-config-kibana/typescript.js | 91 +++++++++++++++++-- packages/kbn-plugin-helpers/src/lib/utils.ts | 4 +- src/cli/cluster/cluster_manager.ts | 2 +- src/core/server/config/config_service.test.ts | 2 - .../lifecycle_handlers.test.ts | 5 +- src/core/server/legacy/legacy_service.ts | 1 + .../migrations/core/call_cluster.ts | 2 - .../integration_tests/bulk_create.test.ts | 8 +- .../routes/integration_tests/bulk_get.test.ts | 8 +- .../integration_tests/bulk_update.test.ts | 8 +- .../routes/integration_tests/create.test.ts | 8 +- .../routes/integration_tests/delete.test.ts | 8 +- .../routes/integration_tests/export.test.ts | 8 +- .../routes/integration_tests/find.test.ts | 8 +- .../routes/integration_tests/import.test.ts | 8 +- .../log_legacy_import.test.ts | 6 +- .../resolve_import_errors.test.ts | 8 +- .../routes/integration_tests/update.test.ts | 8 +- .../saved_objects/serialization/serializer.ts | 3 +- .../saved_objects/service/lib/repository.ts | 1 + src/core/server/status/status_service.ts | 2 - src/core/server/utils/package_json.ts | 1 - .../core_plugins/elasticsearch/index.d.ts | 2 - .../public/new_platform/__mocks__/helpers.ts | 2 - .../ui/public/new_platform/new_platform.ts | 1 + .../public/new_platform/set_services.test.ts | 2 - .../management_app/components/field/field.tsx | 2 + .../management_app/components/form/form.tsx | 1 + .../console_history/console_history.tsx | 1 - .../legacy_core_editor/create_readonly.ts | 1 - .../legacy_core_editor/legacy_core_editor.ts | 4 +- .../public/lib/autocomplete/autocomplete.ts | 1 - src/plugins/console/public/lib/es/es.ts | 2 +- .../lib/spec_definitions/js/aggregations.ts | 2 +- .../server/lib/spec_definitions/js/aliases.ts | 1 - .../lib/spec_definitions/js/document.ts | 1 - .../server/lib/spec_definitions/js/filter.ts | 1 - .../server/lib/spec_definitions/js/globals.ts | 1 - .../server/lib/spec_definitions/js/ingest.ts | 1 - .../lib/spec_definitions/js/mappings.ts | 1 - .../lib/spec_definitions/js/query/dsl.ts | 1 - .../spec_definitions/js/query/templates.ts | 1 - .../server/lib/spec_definitions/js/reindex.ts | 1 - .../server/lib/spec_definitions/js/search.ts | 1 - .../lib/spec_definitions/js/settings.ts | 1 - .../server/lib/spec_definitions/js/shared.ts | 1 - .../actions/clone_panel_action.test.tsx | 2 - .../actions/expand_panel_action.test.tsx | 2 - .../actions/replace_panel_action.test.tsx | 2 - .../public/application/application.ts | 2 +- .../embeddable/dashboard_container.test.tsx | 3 - .../embeddable/grid/dashboard_grid.test.tsx | 1 - .../embeddable/grid/dashboard_grid.tsx | 2 + .../viewport/dashboard_viewport.test.tsx | 1 - .../public/embeddable_plugin_test_samples.ts | 1 - .../dashboard/public/url_generator.test.ts | 1 - .../index_patterns/index_patterns.test.ts | 1 - .../date_interval_utils/is_valid_interval.ts | 4 +- src/plugins/data/public/search/aggs/mocks.ts | 1 - .../search_source/normalize_sort_request.ts | 1 + .../index_pattern_select.tsx | 10 +- .../query_string_input/query_bar_top_row.tsx | 1 + .../data/public/ui/search_bar/search_bar.tsx | 3 +- .../ui/typeahead/suggestion_component.tsx | 1 + .../autocomplete/value_suggestions_route.ts | 1 + .../components/table/table_row.tsx | 1 + .../discover/public/url_generator.test.ts | 1 - .../embeddable_child_panel.test.tsx | 1 - .../lib/panel/embeddable_panel.test.tsx | 1 - .../add_panel/add_panel_action.test.tsx | 1 - .../inspect_panel_action.test.tsx | 1 - .../lib/panel/panel_header/panel_header.tsx | 1 + src/plugins/embeddable/public/mocks.tsx | 2 - .../public/tests/apply_filter_action.test.ts | 1 - .../embeddable/public/tests/container.test.ts | 1 - .../tests/customize_panel_modal.test.tsx | 1 - .../public/tests/explicit_input.test.ts | 1 - .../embeddable/public/tests/test_plugin.ts | 2 - .../ace/use_ui_ace_keyboard_mode.tsx | 1 - .../forms/hook_form_lib/hooks/use_field.ts | 1 + .../expressions/common/execution/container.ts | 1 - src/plugins/expressions/public/mocks.tsx | 2 - src/plugins/expressions/server/mocks.ts | 3 - .../data_sets/ecommerce/saved_objects.ts | 1 - .../data_sets/logs/saved_objects.ts | 1 - .../step_index_pattern/step_index_pattern.tsx | 1 + .../editor/range_control_editor.test.tsx | 2 +- .../public/components/vis/form_row.test.tsx | 6 +- .../components/vis/input_control_vis.test.tsx | 8 +- .../components/vis/list_control.test.tsx | 4 +- .../components/vis/range_control.test.tsx | 4 +- .../public/control/control.ts | 2 - src/plugins/inspector/public/mocks.ts | 1 - .../public/utils/inject_header_style.ts | 1 + .../adapters/ui_to_react_component.test.tsx | 4 + .../public/markdown/markdown.test.tsx | 10 +- .../validated_range/validated_dual_range.tsx | 6 +- .../public/state_sync/public.api.md | 2 +- .../public/state_sync/state_sync.ts | 2 +- .../public/storage/hashed_item_store/mock.ts | 1 + .../public/plugin.test.ts | 2 - .../telemetry_collection/get_local_stats.ts | 1 + src/plugins/timelion/public/application.ts | 2 +- .../public/components/metric_vis_value.tsx | 2 + .../public/table_vis_controller.test.ts | 3 - .../public/table_vis_fn.test.ts | 1 - .../vis_type_timeseries/common/vis_schema.ts | 1 + .../application/components/color_picker.tsx | 2 +- .../public/data_model/vega_parser.ts | 1 - .../vis_type_vislib/public/pie_fn.test.ts | 1 - .../vislib/components/legend/legend.tsx | 1 + .../vislib/components/legend/legend_item.tsx | 1 + .../public/legacy/build_pipeline.ts | 6 +- .../saved_visualizations.ts | 2 +- src/test_utils/public/http_test_setup.ts | 2 - test/functional/apps/console/_console.ts | 1 - test/functional/apps/home/_navigation.ts | 1 - .../functional/apps/visualize/_chart_types.ts | 1 - .../apps/visualize/_linked_saved_searches.ts | 1 - test/functional/apps/visualize/_tsvb_chart.ts | 1 - .../apps/visualize/_tsvb_markdown.ts | 1 - .../apps/visualize/_tsvb_time_series.ts | 1 - test/functional/apps/visualize/_vega_chart.ts | 1 - test/functional/apps/visualize/index.ts | 1 - .../input_control_vis/input_control_range.ts | 1 - test/mocha_decorations.d.ts | 1 - .../plugins/core_app_status/public/plugin.tsx | 2 +- .../plugins/core_app_status/public/types.ts | 2 +- .../core_provider_plugin/public/index.ts | 2 +- .../plugins/core_provider_plugin/types.ts | 2 +- .../test_suites/application_links/index.ts | 1 - .../application_links/redirect_app_links.ts | 7 +- .../core_plugins/application_leave_confirm.ts | 1 - .../core_plugins/application_status.ts | 5 +- .../test_suites/core_plugins/applications.ts | 1 - .../core_plugins/elasticsearch_client.ts | 1 - .../test_suites/core_plugins/index.ts | 1 - .../core_plugins/legacy_plugins.ts | 1 - .../test_suites/core_plugins/rendering.ts | 1 - .../core_plugins/server_plugins.ts | 1 - .../test_suites/core_plugins/top_nav.ts | 1 - .../test_suites/core_plugins/ui_plugins.ts | 9 +- .../test_suites/core_plugins/ui_settings.ts | 7 +- .../test_suites/data_plugin/index_patterns.ts | 1 - .../test_suites/doc_views/doc_views.ts | 1 - test/typings/rison_node.d.ts | 4 +- typings/rison_node.d.ts | 4 +- .../beats_management/common/io_ts_types.ts | 1 - .../beats_management/scripts/fake_env.ts | 6 +- .../beats_management/server/lib/beats.ts | 2 +- .../server/builtin_action_types/index.test.ts | 4 +- .../servicenow/case_types.ts | 2 - .../alerts/server/alert_type_registry.test.ts | 3 - x-pack/plugins/alerts/server/alerts_client.ts | 1 + x-pack/plugins/alerts/server/types.ts | 1 - .../apm/e2e/cypress/integration/helpers.ts | 2 - .../CytoscapeExampleData.stories.tsx | 1 - .../plugins/apm/public/hooks/useFetcher.tsx | 2 - .../plugins/apm/public/utils/testHelpers.tsx | 4 + .../apm/scripts/shared/read-kibana-config.ts | 2 + .../scripts/upload-telemetry-data/index.ts | 1 - x-pack/plugins/apm/server/index.ts | 2 + .../collect_data_telemetry/tasks.test.ts | 2 + .../__tests__/get_buckets.test.ts | 2 + .../server/lib/helpers/setup_request.test.ts | 2 + .../settings/apm_indices/get_apm_indices.ts | 4 + .../lib/transaction_groups/get_error_rate.ts | 10 +- .../avg_duration_by_country/index.ts | 1 + .../lib/transactions/breakdown/index.test.ts | 2 + .../get_timeseries_data/fetcher.test.ts | 2 + .../apm/server/routes/settings/apm_indices.ts | 2 + .../apm/server/saved_objects/apm_indices.ts | 1 + .../public/components/tag/tag_edit.tsx | 5 +- .../functions/external/saved_map.ts | 1 - x-pack/plugins/canvas/public/application.tsx | 1 - .../confirm_modal/confirm_modal.tsx | 1 - .../custom_element_modal.tsx | 1 - .../canvas/public/lib/aeroelastic/index.d.ts | 12 +-- .../plugins/canvas/public/lib/elastic_logo.ts | 1 - .../canvas/public/state/selectors/workpad.ts | 5 +- .../server/routes/shareables/zip.test.ts | 1 + .../shareable_runtime/components/canvas.tsx | 2 + .../components/footer/page_controls.tsx | 8 +- .../components/footer/page_preview.tsx | 4 +- .../footer/settings/autoplay_settings.tsx | 2 + .../footer/settings/toolbar_settings.tsx | 6 +- .../canvas/shareable_runtime/test/utils.ts | 1 + .../canvas/storybook/addon/src/register.tsx | 2 - .../api/cases/comments/delete_all_comments.ts | 1 + .../api/cases/comments/delete_comment.ts | 1 + .../api/cases/comments/patch_comment.ts | 1 + .../routes/api/cases/comments/post_comment.ts | 1 + .../api/cases/configure/patch_configure.ts | 1 + .../api/cases/configure/post_configure.ts | 1 + .../server/routes/api/cases/delete_cases.ts | 1 + .../server/routes/api/cases/patch_cases.ts | 1 + .../case/server/routes/api/cases/post_case.ts | 1 + .../case/server/routes/api/cases/push_case.ts | 1 + .../plugins/case/server/routes/api/utils.ts | 2 + .../server/services/user_actions/helpers.ts | 1 + .../auto_follow_pattern_serialization.ts | 13 ++- .../services/follower_index_serialization.ts | 4 +- .../public/app/index.tsx | 4 +- .../server/lib/ccr_stats_serialization.ts | 2 +- .../server/lib/format_es_error.ts | 7 +- .../server/search/es_search_strategy.ts | 1 + .../lib/enterprise_search_config_api.test.ts | 1 + .../server/routes/__mocks__/router.mock.ts | 12 +-- .../server/routes/app_search/engines.test.ts | 1 + .../routes/workplace_search/overview.test.ts | 1 + .../server/es/cluster_client_adapter.ts | 1 + .../routes/integration_tests/find.test.ts | 6 +- x-pack/plugins/graph/public/application.ts | 2 +- .../components/field_manager/field_editor.tsx | 1 + .../components/field_manager/field_picker.tsx | 1 + .../graph_visualization.tsx | 2 + .../guidance_panel/guidance_panel.tsx | 2 + .../components/settings/url_template_form.tsx | 1 + .../server/lib/kibana_framework.ts | 14 ++- .../api/templates/register_fetch_route.ts | 3 +- .../helpers/setup_environment.tsx | 1 - .../home/data_streams_tab.helpers.ts | 4 +- .../client_integration/home/home.helpers.ts | 4 +- .../home/index_templates_tab.helpers.ts | 2 +- .../home/indices_tab.helpers.ts | 4 +- .../template_clone.helpers.ts | 2 +- .../template_create.helpers.ts | 2 +- .../template_edit.helpers.ts | 2 +- .../common/lib/data_stream_serialization.ts | 5 +- .../helpers/setup_environment.tsx | 1 - .../component_templates.tsx | 1 + .../component_templates_selector.tsx | 1 + .../component_templates/lib/documentation.ts | 1 + .../datatypes/text_datatype.test.tsx | 3 + .../configuration_form/configuration_form.tsx | 4 + .../dynamic_mapping_section.tsx | 1 + .../field_parameters/dynamic_parameter.tsx | 1 + .../fields/create_field/create_field.tsx | 2 + .../fields/fields_list_item.tsx | 8 ++ .../search_fields/search_result_item.tsx | 5 + .../templates_form/templates_form.tsx | 1 + .../mappings_editor/mappings_editor.tsx | 2 + .../data_stream_table/data_stream_table.tsx | 1 - .../server/routes/api/templates/lib.ts | 1 + .../index_management/server/routes/helpers.ts | 7 +- x-pack/plugins/infra/common/errors/metrics.ts | 1 - .../inventory/components/expression.tsx | 1 - .../infra/public/alerting/inventory/index.ts | 1 - .../components/expression.tsx | 1 - .../public/components/document_title.tsx | 6 +- .../logging/log_text_stream/jump_to_tail.tsx | 2 - .../log_text_stream/loading_item_view.tsx | 2 - .../scrollable_log_text_stream_view.tsx | 2 - .../components/navigation/routed_tabs.tsx | 1 - .../metrics_explorer/components/charts.tsx | 4 +- .../lib/adapters/framework/adapter_types.ts | 4 +- .../framework/kibana_framework_adapter.ts | 8 +- .../lib/adapters/metrics/adapter_types.ts | 8 +- .../alerting/metric_threshold/test_mocks.ts | 1 + .../lib/log_analysis/log_entry_anomalies.ts | 1 + .../queries/log_entry_categories.ts | 1 + .../queries/log_entry_category_examples.ts | 1 + .../applications/ingest_manager/index.tsx | 1 - .../components/settings/index.tsx | 1 + .../edit_package_config_page/index.tsx | 3 + .../server/services/agent_config.ts | 2 + .../server/services/agents/crud.ts | 1 + .../server/services/agents/events.ts | 1 + .../services/api_keys/enrollment_api_key.ts | 1 + .../server/services/package_config.ts | 1 + .../helpers/pipelines_clone.helpers.ts | 2 +- .../helpers/pipelines_create.helpers.ts | 2 +- .../helpers/pipelines_edit.helpers.ts | 2 +- .../helpers/setup_environment.tsx | 2 - .../context_menu.tsx | 1 + .../inline_text_input.tsx | 1 + .../pipeline_processors_editor_item.tsx | 7 +- .../components/drop_zone_button.tsx | 3 + .../server/routes/api/create.ts | 1 + .../server/routes/api/update.ts | 1 + .../editor_frame/suggestion_panel.tsx | 2 + .../workspace_panel_wrapper.tsx | 1 + .../dimension_panel/field_select.tsx | 2 + .../public/persistence/saved_object_store.ts | 1 - .../lists/common/schemas/common/schemas.ts | 2 +- .../index_es_list_item_schema.ts | 2 - .../elastic_query/index_es_list_schema.ts | 2 - .../update_es_list_item_schema.ts | 2 - .../elastic_query/update_es_list_schema.ts | 2 - .../search_es_list_item_schema.ts | 2 - .../elastic_response/search_es_list_schema.ts | 2 - .../create_endpoint_list_item_schema.ts | 2 - .../create_exception_list_item_schema.ts | 2 - .../request/create_exception_list_schema.ts | 2 - .../request/create_list_item_schema.ts | 2 - .../delete_endpoint_list_item_schema.ts | 2 - .../delete_exception_list_item_schema.ts | 2 - .../request/delete_exception_list_schema.ts | 2 - .../request/delete_list_item_schema.ts | 2 - .../schemas/request/delete_list_schema.ts | 2 - .../request/export_list_item_query_schema.ts | 2 - .../request/find_endpoint_list_item_schema.ts | 2 - .../find_exception_list_item_schema.ts | 2 - .../request/find_exception_list_schema.ts | 2 - .../schemas/request/find_list_item_schema.ts | 2 - .../schemas/request/find_list_schema.ts | 2 - .../request/import_list_item_query_schema.ts | 2 - .../request/import_list_item_schema.ts | 2 - .../schemas/request/patch_list_item_schema.ts | 2 - .../schemas/request/patch_list_schema.ts | 2 - .../request/read_endpoint_list_item_schema.ts | 2 - .../read_exception_list_item_schema.ts | 2 - .../request/read_exception_list_schema.ts | 2 - .../schemas/request/read_list_item_schema.ts | 2 - .../schemas/request/read_list_schema.ts | 2 - .../update_endpoint_list_item_schema.ts | 2 - .../update_exception_list_item_schema.ts | 2 - .../request/update_exception_list_schema.ts | 2 - .../request/update_list_item_schema.ts | 2 - .../schemas/request/update_list_schema.ts | 2 - .../response/create_endpoint_list_schema.ts | 2 - .../response/exception_list_item_schema.ts | 2 - .../schemas/response/exception_list_schema.ts | 2 - .../found_exception_list_item_schema.ts | 2 - .../response/found_exception_list_schema.ts | 2 - .../response/found_list_item_schema.ts | 2 - .../schemas/response/found_list_schema.ts | 2 - .../schemas/response/list_item_schema.ts | 2 - .../common/schemas/response/list_schema.ts | 2 - .../exceptions_list_so_schema.ts | 2 - .../lists/common/schemas/types/comment.ts | 2 - .../lists/common/schemas/types/entries.ts | 2 - .../common/schemas/types/entry_exists.ts | 2 - .../lists/common/schemas/types/entry_list.ts | 2 - .../lists/common/schemas/types/entry_match.ts | 2 - .../common/schemas/types/entry_match_any.ts | 2 - .../common/schemas/types/entry_nested.ts | 2 - .../exceptions/hooks/use_exception_list.ts | 1 + x-pack/plugins/lists/public/lists/api.ts | 3 + .../server/services/exception_lists/utils.ts | 4 + .../utils/transform_elastic_to_list_item.ts | 2 + .../maps/public/actions/map_actions.ts | 2 - .../layers/tile_layer/tile_layer.test.ts | 1 - .../convert_to_geojson.test.ts | 4 + .../convert_to_lines.test.ts | 5 + .../mvt_field_config_editor.tsx | 1 - .../mvt_single_layer_vector_source_editor.tsx | 1 - .../vector/components/legend/symbol_icon.tsx | 7 +- .../properties/dynamic_icon_property.test.tsx | 1 - .../properties/dynamic_style_property.tsx | 7 +- .../public/classes/util/es_agg_utils.test.ts | 1 + .../tooltip_selector/tooltip_selector.tsx | 2 + .../flyout_body/flyout_body.tsx | 1 - .../flyout_body/layer_wizard_select.test.tsx | 1 + .../maps/public/index_pattern_util.test.ts | 2 + .../maps_legacy_licensing/public/plugin.ts | 1 - .../chart_tooltip/chart_tooltip.tsx | 2 +- .../components/data_grid/column_chart.tsx | 1 + .../components/data_grid/use_data_grid.tsx | 1 - .../contexts/kibana/kibana_context.ts | 1 - .../data_frame_analytics/common/fields.ts | 1 + .../analysis_fields_table.tsx | 4 +- .../hooks/use_index_data.ts | 3 - .../use_exploration_results.ts | 2 - .../outlier_exploration.tsx | 1 - .../outlier_exploration/use_outlier_data.ts | 2 - .../regression_exploration/evaluate_panel.tsx | 2 + .../components/action_clone/clone_button.tsx | 1 + .../analytics_list/expanded_row.tsx | 2 + .../hooks/use_create_analytics_form/state.ts | 1 - .../services/results_service/index.ts | 4 +- .../application/util/custom_url_utils.test.ts | 1 - .../monitoring/public/alerts/panel.tsx | 1 - .../monitoring/public/lib/setup_mode.tsx | 4 +- .../telemetry_collection/get_kibana_stats.ts | 2 + .../observability/public/data_handler.ts | 1 - .../public/hooks/use_route_params.tsx | 2 - .../public/services/get_news_feed.ts | 1 - .../services/get_observability_alerts.ts | 1 - .../oss_telemetry/server/test_utils/index.ts | 1 - .../application/components/main_controls.tsx | 1 + x-pack/plugins/painless_lab/public/links.ts | 1 + .../lib/job_completion_notifications.ts | 6 +- .../get_csv_panel_action.test.ts | 4 +- .../export_types/common/validate_urls.test.ts | 1 + .../server/lib/screenshots/observable.test.ts | 1 - .../server/routes/generation.test.ts | 6 +- .../reporting/server/routes/jobs.test.ts | 6 +- .../server/test_helpers/create_mock_server.ts | 1 - .../rollup/server/lib/format_es_error.ts | 7 +- .../components/percentage_badge.tsx | 2 + .../register_privileges_with_cluster.test.ts | 1 + .../schemas/common/schemas.ts | 2 +- .../request/add_prepackaged_rules_schema.ts | 2 - .../add_prepackged_rules_schema.test.ts | 1 + .../request/create_rules_schema.test.ts | 2 + .../schemas/request/create_rules_schema.ts | 2 - .../schemas/request/export_rules_schema.ts | 2 - .../schemas/request/find_rules_schema.ts | 2 - .../request/import_rules_schema.test.ts | 1 + .../schemas/request/import_rules_schema.ts | 2 - .../schemas/request/patch_rules_schema.ts | 2 - .../schemas/request/query_rules_schema.ts | 2 - .../request/set_signal_status_schema.ts | 2 - .../request/update_rules_schema.test.ts | 1 + .../schemas/request/update_rules_schema.ts | 2 - .../schemas/response/error_schema.ts | 2 - .../schemas/response/import_rules_schema.ts | 2 - .../response/prepackaged_rules_schema.ts | 2 - .../prepackaged_rules_status_schema.ts | 2 - .../schemas/response/rules_schema.ts | 1 - .../response/type_timeline_only_schema.ts | 2 - .../types/default_max_signals_number.ts | 1 - .../types/default_risk_score_mapping_array.ts | 1 - .../types/default_severity_mapping_array.ts | 1 - .../detection_engine/transform_actions.ts | 2 +- .../common/types/timeline/index.ts | 19 ++-- .../security_solution/public/app/index.tsx | 1 - .../components/configure_cases/index.tsx | 1 + .../components/endpoint/link_to_app.tsx | 1 - .../components/exceptions/builder/helpers.tsx | 1 - .../common/components/exceptions/helpers.tsx | 2 + .../viewer/exception_item/index.stories.tsx | 1 + .../public/common/components/links/index.tsx | 2 + .../navigation/breadcrumbs/index.ts | 1 - .../public/common/hooks/types.ts | 1 - .../common/lib/compose/kibana_compose.tsx | 1 - .../public/common/lib/kibana/services.ts | 1 - .../public/common/mock/kibana_core.ts | 1 - .../alerts_histogram_panel/helpers.tsx | 1 + .../alerts_table/default_config.tsx | 2 - .../rules/description_step/index.test.tsx | 1 - .../detection_engine/rules/types.ts | 2 - .../detection_engine/rules/create/index.tsx | 2 - .../detection_engine/rules/details/index.tsx | 7 +- .../detection_engine/rules/edit/index.tsx | 2 - .../pages/detection_engine/rules/utils.ts | 1 - .../public/hosts/pages/details/utils.ts | 1 - .../view/details/host_details.tsx | 2 +- .../pages/endpoint_hosts/view/index.test.tsx | 1 + .../pages/endpoint_hosts/view/index.tsx | 1 - .../policy/models/policy_details_config.ts | 16 ++-- .../policy/store/policy_details/selectors.ts | 1 + .../public/network/pages/ip_details/utils.ts | 1 - .../alerts_by_category/index.test.tsx | 2 - .../models/indexed_process_tree/index.ts | 2 - .../public/resolver/store/data/selectors.ts | 7 +- .../store/middleware/resolver_tree_fetcher.ts | 2 - .../simulator/mock_resolver.tsx | 1 - .../public/resolver/types.ts | 8 +- .../public/resolver/view/map.tsx | 2 - .../view/resolver_without_providers.tsx | 2 - .../components/formatted_ip/index.tsx | 2 +- .../open_timeline/export_timeline/mocks.ts | 1 + .../components/open_timeline/helpers.ts | 3 - .../timelines_table/actions_columns.tsx | 2 - .../server/endpoint/routes/resolver/entity.ts | 1 + .../manifest_manager/manifest_manager.ts | 1 + .../routes/signals/query_signals_route.ts | 2 +- .../get_rule_actions_saved_object.ts | 1 + .../signals/bulk_create_threshold_signals.ts | 1 + .../lib/detection_engine/signals/types.ts | 1 + .../server/lib/framework/types.ts | 2 +- .../server/lib/matrix_histogram/utils.ts | 2 + .../timeline/routes/utils/create_timelines.ts | 1 - .../server/lib/tls/elasticsearch_adapter.ts | 2 +- .../helpers/home.helpers.ts | 1 - .../helpers/policy_add.helpers.ts | 1 - .../helpers/policy_edit.helpers.ts | 1 - .../helpers/repository_add.helpers.ts | 1 - .../helpers/repository_edit.helpers.ts | 1 - .../helpers/restore_snapshot.helpers.ts | 1 - .../helpers/setup_environment.tsx | 1 - .../policy_list/policy_table/policy_table.tsx | 1 - .../repository_table/repository_table.tsx | 1 - .../snapshot_table/snapshot_table.tsx | 1 - .../server/lib/wrap_es_error.ts | 7 +- .../snapshot_restore/test/fixtures/policy.ts | 1 - .../server/lib/spaces_client/spaces_client.ts | 2 + .../spaces_usage_collector.ts | 1 + .../plugins/task_manager/server/task_store.ts | 2 + .../aggregation_list/popover_form.tsx | 1 - .../components/group_by_list/popover_form.tsx | 4 +- .../application/components/health_check.tsx | 3 + .../public/custom_time_range_action.test.ts | 2 - ...nnected_flyout_manage_drilldowns.story.tsx | 6 +- .../flyout_drilldown_wizard.story.tsx | 8 +- .../deprecations/reindex/flyout/container.tsx | 1 + .../reindex/flyout/step_progress.tsx | 1 + .../uptime/server/lib/alerts/status_check.ts | 1 + .../__tests__/get_monitor_status.test.ts | 2 + .../server/lib/requests/__tests__/helper.ts | 1 + .../lib/requests/get_monitor_availability.ts | 1 + .../lib/requests/get_monitor_locations.ts | 1 + .../server/lib/requests/get_monitor_status.ts | 2 +- .../helpers/app_context.mock.tsx | 1 - .../helpers/setup_environment.ts | 1 - .../helpers/watch_create_json.helpers.ts | 2 - .../helpers/watch_create_threshold.helpers.ts | 2 - .../helpers/watch_edit.helpers.ts | 2 - .../helpers/watch_list.helpers.ts | 1 - .../helpers/watch_status.helpers.ts | 1 - .../public/application/app_context.tsx | 1 + .../alerting_api_integration/common/config.ts | 1 - .../spaces_only/tests/alerting/alerts_base.ts | 1 - .../apis/lens/existing_fields.ts | 1 - .../api_integration/apis/lens/field_stats.ts | 1 - .../api_integration/apis/lens/telemetry.ts | 1 - .../apis/metrics_ui/log_analysis.ts | 1 - .../apis/ml/annotations/create_annotations.ts | 1 - .../apis/ml/annotations/delete_annotations.ts | 1 - .../apis/ml/annotations/get_annotations.ts | 1 - .../apis/ml/annotations/update_annotations.ts | 1 - .../apis/ml/anomaly_detectors/create.ts | 1 - .../apis/ml/calendars/create_calendars.ts | 1 - .../apis/ml/calendars/delete_calendars.ts | 1 - .../apis/ml/calendars/get_calendars.ts | 1 - .../apis/ml/calendars/update_calendars.ts | 1 - .../data_visualizer/get_field_histograms.ts | 1 - .../ml/data_visualizer/get_field_stats.ts | 1 - .../ml/data_visualizer/get_overall_stats.ts | 1 - .../ml/fields_service/field_cardinality.ts | 1 - .../ml/fields_service/time_field_range.ts | 1 - .../apis/ml/filters/create_filters.ts | 1 - .../apis/ml/filters/delete_filters.ts | 1 - .../apis/ml/filters/get_filters.ts | 1 - .../apis/ml/filters/update_filters.ts | 1 - .../job_validation/bucket_span_estimator.ts | 1 - .../calculate_model_memory_limit.ts | 1 - .../apis/ml/job_validation/cardinality.ts | 1 - .../apis/ml/job_validation/validate.ts | 1 - .../ml/jobs/categorization_field_examples.ts | 1 - .../apis/ml/jobs/close_jobs.ts | 1 - .../apis/ml/jobs/delete_jobs.ts | 1 - .../apis/ml/jobs/jobs_summary.ts | 1 - .../apis/ml/modules/get_module.ts | 1 - .../apis/ml/modules/recognize_module.ts | 1 - .../apis/ml/modules/setup_module.ts | 1 - .../ml/results/get_anomalies_table_data.ts | 1 - .../apis/transform/delete_transforms.ts | 1 - .../case_api_integration/common/lib/mock.ts | 1 + .../case_api_integration/common/lib/utils.ts | 2 + .../common/config.ts | 1 - .../detection_engine_api_integration/utils.ts | 5 + x-pack/test/functional/apps/lens/index.ts | 1 - .../functional/apps/lens/lens_reporting.ts | 1 - .../apps/lens/persistent_context.ts | 1 - .../test/functional/apps/lens/smokescreen.ts | 1 - .../apps/ml/anomaly_detection/advanced_job.ts | 1 - .../ml/anomaly_detection/anomaly_explorer.ts | 1 - .../anomaly_detection/categorization_job.ts | 1 - .../ml/anomaly_detection/date_nanos_job.ts | 1 - .../ml/anomaly_detection/multi_metric_job.ts | 1 - .../ml/anomaly_detection/population_job.ts | 1 - .../ml/anomaly_detection/saved_search_job.ts | 1 - .../ml/anomaly_detection/single_metric_job.ts | 1 - .../anomaly_detection/single_metric_viewer.ts | 1 - .../data_visualizer/file_data_visualizer.ts | 1 - .../data_visualizer/index_data_visualizer.ts | 1 - x-pack/test/functional_with_es_ssl/config.ts | 1 - .../fixtures/plugins/alerts/public/plugin.ts | 1 + .../apis/agent_config/agent_config.ts | 1 + .../test/licensing_plugin/public/updates.ts | 8 +- x-pack/test/mocha_decorations.d.ts | 1 - .../apis/implicit_flow/index.ts | 1 - .../apis/implicit_flow/oidc_auth.ts | 1 - .../implicit_flow.config.ts | 1 - .../licensed_feature_usage/feature_usage.ts | 1 - x-pack/test/plugin_functional/config.ts | 1 - .../global_search/global_search_api.ts | 2 +- .../global_search/global_search_providers.ts | 2 +- .../test/security_solution_cypress/runner.ts | 1 + .../security_and_spaces/apis/get_all.ts | 2 + x-pack/test/ui_capabilities/common/config.ts | 1 - .../common/nav_links_builder.ts | 4 +- x-pack/typings/rison_node.d.ts | 4 +- yarn.lock | 69 +++++++++----- 583 files changed, 669 insertions(+), 779 deletions(-) diff --git a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.isyncstateref.md b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.isyncstateref.md index 137db68cd6b48..b4bc93fd78a9d 100644 --- a/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.isyncstateref.md +++ b/docs/development/plugins/kibana_utils/public/state_sync/kibana-plugin-plugins-kibana_utils-public-state_sync.isyncstateref.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface ISyncStateRef +export interface ISyncStateRef ``` ## Properties diff --git a/examples/alerting_example/public/components/create_alert.tsx b/examples/alerting_example/public/components/create_alert.tsx index a8e1f06cb3914..72e3835b100fe 100644 --- a/examples/alerting_example/public/components/create_alert.tsx +++ b/examples/alerting_example/public/components/create_alert.tsx @@ -30,6 +30,7 @@ import { ALERTING_EXAMPLE_APP_ID } from '../../common/constants'; export const CreateAlert = ({ http, + // eslint-disable-next-line @typescript-eslint/naming-convention triggers_actions_ui, charts, uiSettings, diff --git a/examples/alerting_example/public/plugin.tsx b/examples/alerting_example/public/plugin.tsx index f0635a1071f64..3f972fa9fe2ee 100644 --- a/examples/alerting_example/public/plugin.tsx +++ b/examples/alerting_example/public/plugin.tsx @@ -46,6 +46,7 @@ export interface AlertingExamplePublicStartDeps { export class AlertingExamplePlugin implements Plugin { public setup( core: CoreSetup, + // eslint-disable-next-line @typescript-eslint/naming-convention { alerts, triggers_actions_ui, developerExamples }: AlertingExamplePublicSetupDeps ) { core.application.register({ diff --git a/kibana.d.ts b/kibana.d.ts index 21e3e99abaa90..d64752abd8b60 100644 --- a/kibana.d.ts +++ b/kibana.d.ts @@ -35,7 +35,6 @@ import * as LegacyKibanaServer from './src/legacy/server/kbn_server'; /** * Re-export legacy types under a namespace. */ -// eslint-disable-next-line @typescript-eslint/no-namespace export namespace Legacy { export type KibanaConfig = LegacyKibanaServer.KibanaConfig; export type Request = LegacyKibanaServer.Request; diff --git a/package.json b/package.json index 880534997cff0..aaa7ae7ee4684 100644 --- a/package.json +++ b/package.json @@ -400,8 +400,8 @@ "@types/vinyl": "^2.0.4", "@types/vinyl-fs": "^2.4.11", "@types/zen-observable": "^0.8.0", - "@typescript-eslint/eslint-plugin": "^2.34.0", - "@typescript-eslint/parser": "^2.34.0", + "@typescript-eslint/eslint-plugin": "^3.7.1", + "@typescript-eslint/parser": "^3.7.1", "angular-mocks": "^1.7.9", "archiver": "^3.1.1", "axe-core": "^3.4.1", @@ -425,6 +425,7 @@ "eslint-plugin-babel": "^5.3.0", "eslint-plugin-ban": "^1.4.0", "eslint-plugin-cypress": "^2.8.1", + "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.19.1", "eslint-plugin-jest": "^23.10.0", "eslint-plugin-jsx-a11y": "^6.2.3", diff --git a/packages/eslint-config-kibana/package.json b/packages/eslint-config-kibana/package.json index e14423d681a4e..967e53249da75 100644 --- a/packages/eslint-config-kibana/package.json +++ b/packages/eslint-config-kibana/package.json @@ -11,17 +11,18 @@ "author": "Spencer Alger ", "license": "Apache-2.0", "bugs": { - "url": "https://github.com/elastic/eslint-config-kibana/issues" + "url": "https://github.com/elastic/kibana/tree/master/packages/eslint-config-kibana" }, - "homepage": "https://github.com/elastic/eslint-config-kibana#readme", + "homepage": "https://github.com/elastic/kibana/tree/master/packages/eslint-config-kibana", "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^2.34.0", - "@typescript-eslint/parser": "^2.34.0", + "@typescript-eslint/eslint-plugin": "^3.7.1", + "@typescript-eslint/parser": "^3.7.1", "babel-eslint": "^10.0.3", "eslint": "^6.8.0", "eslint-plugin-babel": "^5.3.0", "eslint-plugin-ban": "^1.4.0", "eslint-plugin-jsx-a11y": "^6.2.3", + "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.19.1", "eslint-plugin-jest": "^23.10.0", "eslint-plugin-mocha": "^6.2.2", diff --git a/packages/eslint-config-kibana/typescript.js b/packages/eslint-config-kibana/typescript.js index a55ca9391011d..18b11eb62beef 100644 --- a/packages/eslint-config-kibana/typescript.js +++ b/packages/eslint-config-kibana/typescript.js @@ -8,6 +8,11 @@ const PKG = require('../../package.json'); const eslintConfigPrettierTypescriptEslintRules = require('eslint-config-prettier/@typescript-eslint').rules; +// The current implementation excluded all the variables matching the regexp. +// We should remove it as soon as multiple underscores are supported by the linter. +// https://github.com/typescript-eslint/typescript-eslint/issues/1712 +// Due to the same reason we have to duplicate the "filter" option for "default" and other "selectors". +const allowedNameRegexp = '^(UNSAFE_|_{1,3})|_{1,3}$'; module.exports = { overrides: [ { @@ -19,6 +24,7 @@ module.exports = { 'ban', 'import', 'prefer-object-spread', + 'eslint-comments' ], settings: { @@ -87,16 +93,82 @@ module.exports = { 'React.StatelessComponent': { message: 'Use FunctionComponent instead.', fixWith: 'React.FunctionComponent' - } + }, + // used in the codebase in the wild + '{}': false, + 'object': false, + 'Function': false, } }], 'camelcase': 'off', - '@typescript-eslint/camelcase': ['error', { - 'properties': 'never', - 'ignoreDestructuring': true, - 'allow': ['^[A-Z0-9_]+$', '^UNSAFE_'] - }], - '@typescript-eslint/class-name-casing': 'error', + '@typescript-eslint/naming-convention': [ + 'error', + { + selector: 'default', + format: ['camelCase'], + filter: { + regex: allowedNameRegexp, + match: false + } + }, + { + selector: 'variable', + format: [ + 'camelCase', + 'UPPER_CASE', // const SOMETHING = ... + 'PascalCase', // React.FunctionComponent = + ], + filter: { + regex: allowedNameRegexp, + match: false + } + }, + { + selector: 'parameter', + format: [ + 'camelCase', + 'PascalCase', + ], + filter: { + regex: allowedNameRegexp, + match: false + } + }, + { + selector: 'memberLike', + format: [ + 'camelCase', + 'PascalCase', + 'snake_case', // keys in elasticsearch requests / responses + 'UPPER_CASE' + ], + filter: { + regex: allowedNameRegexp, + match: false + } + }, + { + selector: 'function', + format: [ + 'camelCase', + 'PascalCase' // React.FunctionComponent = + ], + filter: { + regex: allowedNameRegexp, + match: false + } + }, + { + selector: 'typeLike', + format: ['PascalCase', 'UPPER_CASE'], + leadingUnderscore: 'allow', + trailingUnderscore: 'allow', + }, + { + selector: 'enum', + format: ['PascalCase', 'UPPER_CASE', 'camelCase'], + }, + ], '@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'off', @@ -145,10 +217,12 @@ module.exports = { 'no-extend-native': 'error', 'no-eval': 'error', 'no-new-wrappers': 'error', + 'no-script-url': 'error', 'no-shadow': 'error', 'no-throw-literal': 'error', 'no-undef-init': 'error', 'no-unsafe-finally': 'error', + 'no-unsanitized/property': 'error', 'no-unused-expressions': 'error', 'no-unused-labels': 'error', 'no-var': 'error', @@ -171,6 +245,9 @@ module.exports = { ], 'import/no-default-export': 'error', + + 'eslint-comments/no-unused-disable': 'error', + 'eslint-comments/no-unused-enable': 'error' }, eslintConfigPrettierTypescriptEslintRules ) diff --git a/packages/kbn-plugin-helpers/src/lib/utils.ts b/packages/kbn-plugin-helpers/src/lib/utils.ts index 0348f9f8deda9..be7fa65cc2939 100644 --- a/packages/kbn-plugin-helpers/src/lib/utils.ts +++ b/packages/kbn-plugin-helpers/src/lib/utils.ts @@ -26,10 +26,10 @@ export function babelRegister() { try { // add support for moved @babel/register source: https://github.com/elastic/kibana/pull/13973 - require(resolve(plugin.kibanaRoot, 'src/setup_node_env/babel_register')); // eslint-disable-line import/no-dynamic-require + require(resolve(plugin.kibanaRoot, 'src/setup_node_env/babel_register')); } catch (error) { if (error.code === 'MODULE_NOT_FOUND') { - require(resolve(plugin.kibanaRoot, 'src/optimize/babel/register')); // eslint-disable-line import/no-dynamic-require + require(resolve(plugin.kibanaRoot, 'src/optimize/babel/register')); } else { throw error; } diff --git a/src/cli/cluster/cluster_manager.ts b/src/cli/cluster/cluster_manager.ts index f193f33e6f47e..5ada95bfeef94 100644 --- a/src/cli/cluster/cluster_manager.ts +++ b/src/cli/cluster/cluster_manager.ts @@ -354,6 +354,6 @@ export class ClusterManager { onWatcherError = (err: any) => { this.log.bad('failed to watch files!\n', err.stack); - process.exit(1); // eslint-disable-line no-process-exit + process.exit(1); }; } diff --git a/src/core/server/config/config_service.test.ts b/src/core/server/config/config_service.test.ts index 236cf6579d7c8..95153447bd4a9 100644 --- a/src/core/server/config/config_service.test.ts +++ b/src/core/server/config/config_service.test.ts @@ -17,8 +17,6 @@ * under the License. */ -/* eslint-disable max-classes-per-file */ - import { BehaviorSubject, Observable } from 'rxjs'; import { first, take } from 'rxjs/operators'; diff --git a/src/core/server/http/integration_tests/lifecycle_handlers.test.ts b/src/core/server/http/integration_tests/lifecycle_handlers.test.ts index 2120fb5b881de..e23426e630455 100644 --- a/src/core/server/http/integration_tests/lifecycle_handlers.test.ts +++ b/src/core/server/http/integration_tests/lifecycle_handlers.test.ts @@ -17,10 +17,10 @@ * under the License. */ -import { resolve } from 'path'; import supertest from 'supertest'; import { BehaviorSubject } from 'rxjs'; import { ByteSizeValue } from '@kbn/config-schema'; +import pkg from '../../../../../package.json'; import { createHttpServer } from '../test_utils'; import { HttpService } from '../http_service'; @@ -30,8 +30,7 @@ import { IRouter, RouteRegistrar } from '../router'; import { configServiceMock } from '../../config/config_service.mock'; import { contextServiceMock } from '../../context/context_service.mock'; -const pkgPath = resolve(__dirname, '../../../../../package.json'); -const actualVersion = require(pkgPath).version; +const actualVersion = pkg.version; const versionHeader = 'kbn-version'; const xsrfHeader = 'kbn-xsrf'; const nameHeader = 'kbn-name'; diff --git a/src/core/server/legacy/legacy_service.ts b/src/core/server/legacy/legacy_service.ts index fada40e773f12..976d92e6fe7fb 100644 --- a/src/core/server/legacy/legacy_service.ts +++ b/src/core/server/legacy/legacy_service.ts @@ -375,6 +375,7 @@ export class LegacyService implements CoreService { // from being started multiple times in different processes. // We only want one REPL. if (this.coreContext.env.cliArgs.repl && process.env.kbnWorkerType === 'server') { + // eslint-disable-next-line @typescript-eslint/no-var-requires require('../../../cli/repl').startRepl(kbnServer); } diff --git a/src/core/server/saved_objects/migrations/core/call_cluster.ts b/src/core/server/saved_objects/migrations/core/call_cluster.ts index 628f2785e6c64..ad2e0e9660a63 100644 --- a/src/core/server/saved_objects/migrations/core/call_cluster.ts +++ b/src/core/server/saved_objects/migrations/core/call_cluster.ts @@ -25,7 +25,6 @@ import { IndexMapping } from '../../mappings'; -/* eslint-disable @typescript-eslint/unified-signatures */ export interface CallCluster { (path: 'bulk', opts: { body: object[] }): Promise; (path: 'count', opts: CountOpts): Promise<{ count: number; _shards: ShardsInfo }>; @@ -49,7 +48,6 @@ export interface CallCluster { error?: ErrorResponse; }>; } -/* eslint-enable @typescript-eslint/unified-signatures */ /////////////////////////////////////////////////////////////////// // callCluster argument type definitions diff --git a/src/core/server/saved_objects/routes/integration_tests/bulk_create.test.ts b/src/core/server/saved_objects/routes/integration_tests/bulk_create.test.ts index 28afdefe1413f..3d455ff9d594c 100644 --- a/src/core/server/saved_objects/routes/integration_tests/bulk_create.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/bulk_create.test.ts @@ -23,12 +23,12 @@ import { registerBulkCreateRoute } from '../bulk_create'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; import { setupServer } from '../test_utils'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; describe('POST /api/saved_objects/_bulk_create', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; - let handlerContext: setupServerReturn['handlerContext']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; + let handlerContext: SetupServerReturn['handlerContext']; let savedObjectsClient: ReturnType; beforeEach(async () => { diff --git a/src/core/server/saved_objects/routes/integration_tests/bulk_get.test.ts b/src/core/server/saved_objects/routes/integration_tests/bulk_get.test.ts index 521e62e16b1d8..5deea94299d7d 100644 --- a/src/core/server/saved_objects/routes/integration_tests/bulk_get.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/bulk_get.test.ts @@ -23,12 +23,12 @@ import { registerBulkGetRoute } from '../bulk_get'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; import { setupServer } from '../test_utils'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; describe('POST /api/saved_objects/_bulk_get', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; - let handlerContext: setupServerReturn['handlerContext']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; + let handlerContext: SetupServerReturn['handlerContext']; let savedObjectsClient: ReturnType; beforeEach(async () => { diff --git a/src/core/server/saved_objects/routes/integration_tests/bulk_update.test.ts b/src/core/server/saved_objects/routes/integration_tests/bulk_update.test.ts index 9c888406b0c96..45f310ecc3fa2 100644 --- a/src/core/server/saved_objects/routes/integration_tests/bulk_update.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/bulk_update.test.ts @@ -23,12 +23,12 @@ import { registerBulkUpdateRoute } from '../bulk_update'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; import { setupServer } from '../test_utils'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; describe('PUT /api/saved_objects/_bulk_update', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; - let handlerContext: setupServerReturn['handlerContext']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; + let handlerContext: SetupServerReturn['handlerContext']; let savedObjectsClient: ReturnType; beforeEach(async () => { diff --git a/src/core/server/saved_objects/routes/integration_tests/create.test.ts b/src/core/server/saved_objects/routes/integration_tests/create.test.ts index ba3d620f8fdb5..9e69c3dbc64ec 100644 --- a/src/core/server/saved_objects/routes/integration_tests/create.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/create.test.ts @@ -23,12 +23,12 @@ import { registerCreateRoute } from '../create'; import { savedObjectsClientMock } from '../../service/saved_objects_client.mock'; import { setupServer } from '../test_utils'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; describe('POST /api/saved_objects/{type}', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; - let handlerContext: setupServerReturn['handlerContext']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; + let handlerContext: SetupServerReturn['handlerContext']; let savedObjectsClient: ReturnType; const clientResponse = { diff --git a/src/core/server/saved_objects/routes/integration_tests/delete.test.ts b/src/core/server/saved_objects/routes/integration_tests/delete.test.ts index 652d267f08fe7..a58f400ec3e1d 100644 --- a/src/core/server/saved_objects/routes/integration_tests/delete.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/delete.test.ts @@ -23,12 +23,12 @@ import { registerDeleteRoute } from '../delete'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; import { setupServer } from '../test_utils'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; describe('DELETE /api/saved_objects/{type}/{id}', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; - let handlerContext: setupServerReturn['handlerContext']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; + let handlerContext: SetupServerReturn['handlerContext']; let savedObjectsClient: ReturnType; beforeEach(async () => { diff --git a/src/core/server/saved_objects/routes/integration_tests/export.test.ts b/src/core/server/saved_objects/routes/integration_tests/export.test.ts index 7b342dde2febe..d47f7c6050d8f 100644 --- a/src/core/server/saved_objects/routes/integration_tests/export.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/export.test.ts @@ -29,7 +29,7 @@ import { SavedObjectConfig } from '../../saved_objects_config'; import { registerExportRoute } from '../export'; import { setupServer, createExportableType } from '../test_utils'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; const exportSavedObjectsToStream = exportMock.exportSavedObjectsToStream as jest.Mock; const allowedTypes = ['index-pattern', 'search']; const config = { @@ -38,9 +38,9 @@ const config = { } as SavedObjectConfig; describe('POST /api/saved_objects/_export', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; - let handlerContext: setupServerReturn['handlerContext']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; + let handlerContext: SetupServerReturn['handlerContext']; beforeEach(async () => { ({ server, httpSetup, handlerContext } = await setupServer()); diff --git a/src/core/server/saved_objects/routes/integration_tests/find.test.ts b/src/core/server/saved_objects/routes/integration_tests/find.test.ts index d5a7710f04b39..4fe9cbe415cd6 100644 --- a/src/core/server/saved_objects/routes/integration_tests/find.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/find.test.ts @@ -25,12 +25,12 @@ import { registerFindRoute } from '../find'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; import { setupServer } from '../test_utils'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; describe('GET /api/saved_objects/_find', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; - let handlerContext: setupServerReturn['handlerContext']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; + let handlerContext: SetupServerReturn['handlerContext']; let savedObjectsClient: ReturnType; const clientResponse = { diff --git a/src/core/server/saved_objects/routes/integration_tests/import.test.ts b/src/core/server/saved_objects/routes/integration_tests/import.test.ts index c4e304a3f892f..61f32a420d92b 100644 --- a/src/core/server/saved_objects/routes/integration_tests/import.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/import.test.ts @@ -24,7 +24,7 @@ import { savedObjectsClientMock } from '../../../../../core/server/mocks'; import { SavedObjectConfig } from '../../saved_objects_config'; import { setupServer, createExportableType } from '../test_utils'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; const allowedTypes = ['index-pattern', 'visualization', 'dashboard']; const config = { @@ -33,9 +33,9 @@ const config = { } as SavedObjectConfig; describe('POST /internal/saved_objects/_import', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; - let handlerContext: setupServerReturn['handlerContext']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; + let handlerContext: SetupServerReturn['handlerContext']; let savedObjectsClient: ReturnType; const emptyResponse = { diff --git a/src/core/server/saved_objects/routes/integration_tests/log_legacy_import.test.ts b/src/core/server/saved_objects/routes/integration_tests/log_legacy_import.test.ts index 8d021580da36c..d86ac985d9da1 100644 --- a/src/core/server/saved_objects/routes/integration_tests/log_legacy_import.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/log_legacy_import.test.ts @@ -23,11 +23,11 @@ import { registerLogLegacyImportRoute } from '../log_legacy_import'; import { loggingSystemMock } from '../../../logging/logging_system.mock'; import { setupServer } from '../test_utils'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; describe('POST /api/saved_objects/_log_legacy_import', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; let logger: ReturnType; beforeEach(async () => { diff --git a/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts b/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts index 27750ec692e5a..6a6976b513ca1 100644 --- a/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts @@ -24,7 +24,7 @@ import { savedObjectsClientMock } from '../../../../../core/server/mocks'; import { setupServer, createExportableType } from '../test_utils'; import { SavedObjectConfig } from '../../saved_objects_config'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; const allowedTypes = ['index-pattern', 'visualization', 'dashboard']; const config = { @@ -33,9 +33,9 @@ const config = { } as SavedObjectConfig; describe('POST /api/saved_objects/_resolve_import_errors', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; - let handlerContext: setupServerReturn['handlerContext']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; + let handlerContext: SetupServerReturn['handlerContext']; let savedObjectsClient: ReturnType; beforeEach(async () => { diff --git a/src/core/server/saved_objects/routes/integration_tests/update.test.ts b/src/core/server/saved_objects/routes/integration_tests/update.test.ts index eb6eb1cdb6bd9..dfccb651d72d7 100644 --- a/src/core/server/saved_objects/routes/integration_tests/update.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/update.test.ts @@ -23,12 +23,12 @@ import { registerUpdateRoute } from '../update'; import { savedObjectsClientMock } from '../../../../../core/server/mocks'; import { setupServer } from '../test_utils'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; describe('PUT /api/saved_objects/{type}/{id?}', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; - let handlerContext: setupServerReturn['handlerContext']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; + let handlerContext: SetupServerReturn['handlerContext']; let savedObjectsClient: ReturnType; beforeEach(async () => { diff --git a/src/core/server/saved_objects/serialization/serializer.ts b/src/core/server/saved_objects/serialization/serializer.ts index 3b19d494d8ecf..c0c09b6375bdf 100644 --- a/src/core/server/saved_objects/serialization/serializer.ts +++ b/src/core/server/saved_objects/serialization/serializer.ts @@ -17,8 +17,6 @@ * under the License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import uuid from 'uuid'; import { decodeVersion, encodeVersion } from '../version'; import { ISavedObjectTypeRegistry } from '../saved_objects_type_registry'; @@ -97,6 +95,7 @@ export class SavedObjectsSerializer { namespaces, attributes, migrationVersion, + // eslint-disable-next-line @typescript-eslint/naming-convention updated_at, version, references, diff --git a/src/core/server/saved_objects/service/lib/repository.ts b/src/core/server/saved_objects/service/lib/repository.ts index 8b7b1d62c1b7d..d7e1ecba0370b 100644 --- a/src/core/server/saved_objects/service/lib/repository.ts +++ b/src/core/server/saved_objects/service/lib/repository.ts @@ -1242,6 +1242,7 @@ export class SavedObjectsRepository { response )[0] as any; + // eslint-disable-next-line @typescript-eslint/naming-convention const { [type]: attributes, references, updated_at } = documentToSave; if (error) { return { diff --git a/src/core/server/status/status_service.ts b/src/core/server/status/status_service.ts index 569b044a4fb27..aea335e64babf 100644 --- a/src/core/server/status/status_service.ts +++ b/src/core/server/status/status_service.ts @@ -17,8 +17,6 @@ * under the License. */ -/* eslint-disable max-classes-per-file */ - import { Observable, combineLatest } from 'rxjs'; import { map, distinctUntilChanged, shareReplay, take } from 'rxjs/operators'; import { isDeepStrictEqual } from 'util'; diff --git a/src/core/server/utils/package_json.ts b/src/core/server/utils/package_json.ts index ab1700e681a92..fcffa6593d599 100644 --- a/src/core/server/utils/package_json.ts +++ b/src/core/server/utils/package_json.ts @@ -22,6 +22,5 @@ import { dirname } from 'path'; export const pkg = { __filename: require.resolve('../../../../package.json'), __dirname: dirname(require.resolve('../../../../package.json')), - // eslint-disable no-var-requires ...require('../../../../package.json'), }; diff --git a/src/legacy/core_plugins/elasticsearch/index.d.ts b/src/legacy/core_plugins/elasticsearch/index.d.ts index df713160137a6..683f58b1a80ce 100644 --- a/src/legacy/core_plugins/elasticsearch/index.d.ts +++ b/src/legacy/core_plugins/elasticsearch/index.d.ts @@ -17,7 +17,6 @@ * under the License. */ -/* eslint-disable */ import { Client as ESClient, GenericParams, @@ -145,7 +144,6 @@ import { TasksGetParams, TasksListParams, } from 'elasticsearch'; -/* eslint-enable */ export class Cluster { public callWithRequest: CallClusterWithRequest; diff --git a/src/legacy/ui/public/new_platform/__mocks__/helpers.ts b/src/legacy/ui/public/new_platform/__mocks__/helpers.ts index e3aa49baeae0d..35aa8e4830428 100644 --- a/src/legacy/ui/public/new_platform/__mocks__/helpers.ts +++ b/src/legacy/ui/public/new_platform/__mocks__/helpers.ts @@ -17,7 +17,6 @@ * under the License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import { coreMock } from '../../../../../core/public/mocks'; import { dataPluginMock } from '../../../../../plugins/data/public/mocks'; import { embeddablePluginMock } from '../../../../../plugins/embeddable/public/mocks'; @@ -33,7 +32,6 @@ import { advancedSettingsMock } from '../../../../../plugins/advanced_settings/p import { savedObjectsManagementPluginMock } from '../../../../../plugins/saved_objects_management/public/mocks'; import { visualizationsPluginMock } from '../../../../../plugins/visualizations/public/mocks'; import { discoverPluginMock } from '../../../../../plugins/discover/public/mocks'; -/* eslint-enable @kbn/eslint/no-restricted-paths */ export const pluginsMock = { createSetup: () => ({ diff --git a/src/legacy/ui/public/new_platform/new_platform.ts b/src/legacy/ui/public/new_platform/new_platform.ts index ddf768495a9da..37787ffbde4fc 100644 --- a/src/legacy/ui/public/new_platform/new_platform.ts +++ b/src/legacy/ui/public/new_platform/new_platform.ts @@ -174,6 +174,7 @@ export const legacyAppRegister = (app: App) => { } legacyAppRegistered = true; + // eslint-disable-next-line @typescript-eslint/no-var-requires require('ui/chrome').setRootController(app.id, ($scope: IScope, $element: JQLite) => { const element = document.createElement('div'); $element[0].appendChild(element); diff --git a/src/legacy/ui/public/new_platform/set_services.test.ts b/src/legacy/ui/public/new_platform/set_services.test.ts index b7878954846fa..74e789ec220b1 100644 --- a/src/legacy/ui/public/new_platform/set_services.test.ts +++ b/src/legacy/ui/public/new_platform/set_services.test.ts @@ -18,9 +18,7 @@ */ import { __reset__, __setup__, __start__, PluginsSetup, PluginsStart } from './new_platform'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import * as dataServices from '../../../../plugins/data/public/services'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import * as visualizationsServices from '../../../../plugins/visualizations/public/services'; import { LegacyCoreSetup, LegacyCoreStart } from '../../../../core/public'; import { coreMock } from '../../../../core/public/mocks'; diff --git a/src/plugins/advanced_settings/public/management_app/components/field/field.tsx b/src/plugins/advanced_settings/public/management_app/components/field/field.tsx index 32bfc0826e7c4..45e359679056f 100644 --- a/src/plugins/advanced_settings/public/management_app/components/field/field.tsx +++ b/src/plugins/advanced_settings/public/management_app/components/field/field.tsx @@ -664,7 +664,9 @@ export class Field extends PureComponent { const isInvalid = unsavedChanges?.isInvalid; const className = classNames('mgtAdvancedSettings__field', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'mgtAdvancedSettings__field--unsaved': unsavedChanges, + // eslint-disable-next-line @typescript-eslint/naming-convention 'mgtAdvancedSettings__field--invalid': isInvalid, }); const id = setting.name; diff --git a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx index 142ea06c7dce4..5533f684870d9 100644 --- a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx +++ b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx @@ -336,6 +336,7 @@ export class Form extends PureComponent { if (pageNav?.value === 'legacy') { bottomBarClasses = classNames('mgtAdvancedSettingsForm__bottomBar', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'mgtAdvancedSettingsForm__bottomBar--pushForNav': localStorage.getItem(NAV_IS_LOCKED_KEY) === 'true', }); diff --git a/src/plugins/console/public/application/containers/console_history/console_history.tsx b/src/plugins/console/public/application/containers/console_history/console_history.tsx index 433ad15990d77..e44d215775c69 100644 --- a/src/plugins/console/public/application/containers/console_history/console_history.tsx +++ b/src/plugins/console/public/application/containers/console_history/console_history.tsx @@ -160,7 +160,6 @@ export function ConsoleHistory({ close }: Props) { const isSelected = viewingReq === req; return ( // Ignore a11y issues on li's - // eslint-disable-next-line
  • { const aliasRules = { filter: {}, diff --git a/src/plugins/console/server/lib/spec_definitions/js/document.ts b/src/plugins/console/server/lib/spec_definitions/js/document.ts index f8214faab2681..f235860232cdc 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/document.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/document.ts @@ -18,7 +18,6 @@ */ import { SpecDefinitionsService } from '../../../services'; -/* eslint-disable @typescript-eslint/camelcase */ export const document = (specService: SpecDefinitionsService) => { specService.addEndpointDescription('update', { data_autocomplete_rules: { diff --git a/src/plugins/console/server/lib/spec_definitions/js/filter.ts b/src/plugins/console/server/lib/spec_definitions/js/filter.ts index b5e99e610b8ba..f43f62c9cf2ed 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/filter.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/filter.ts @@ -18,7 +18,6 @@ */ import { SpecDefinitionsService } from '../../../services'; -/* eslint-disable @typescript-eslint/camelcase */ const filters: Record = {}; filters.and = { diff --git a/src/plugins/console/server/lib/spec_definitions/js/globals.ts b/src/plugins/console/server/lib/spec_definitions/js/globals.ts index 9fef5c6dbf1e3..bf628e6b659a3 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/globals.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/globals.ts @@ -18,7 +18,6 @@ */ import { SpecDefinitionsService } from '../../../services'; -/* eslint-disable @typescript-eslint/camelcase */ const highlightOptions = { boundary_chars: {}, boundary_max_scan: 20, diff --git a/src/plugins/console/server/lib/spec_definitions/js/ingest.ts b/src/plugins/console/server/lib/spec_definitions/js/ingest.ts index 20dbeda5e0b3d..3450055804cf2 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/ingest.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/ingest.ts @@ -19,7 +19,6 @@ import { SpecDefinitionsService } from '../../../services'; -/* eslint-disable @typescript-eslint/camelcase */ const commonPipelineParams = { on_failure: [], ignore_failure: { diff --git a/src/plugins/console/server/lib/spec_definitions/js/mappings.ts b/src/plugins/console/server/lib/spec_definitions/js/mappings.ts index fbc9a822e509c..d09637b05a3cb 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/mappings.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/mappings.ts @@ -23,7 +23,6 @@ import { SpecDefinitionsService } from '../../../services'; import { BOOLEAN } from './shared'; -/* eslint-disable @typescript-eslint/camelcase */ export const mappings = (specService: SpecDefinitionsService) => { specService.addEndpointDescription('put_mapping', { priority: 10, // collides with put doc by id diff --git a/src/plugins/console/server/lib/spec_definitions/js/query/dsl.ts b/src/plugins/console/server/lib/spec_definitions/js/query/dsl.ts index d6e5030fb6928..b94809d38e1a8 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/query/dsl.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/query/dsl.ts @@ -36,7 +36,6 @@ import { regexpTemplate, } from './templates'; -/* eslint-disable @typescript-eslint/camelcase */ const matchOptions = { cutoff_frequency: 0.001, query: '', diff --git a/src/plugins/console/server/lib/spec_definitions/js/query/templates.ts b/src/plugins/console/server/lib/spec_definitions/js/query/templates.ts index 60192f81fec80..b1e636828c144 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/query/templates.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/query/templates.ts @@ -17,7 +17,6 @@ * under the License. */ -/* eslint-disable @typescript-eslint/camelcase */ export const regexpTemplate = { FIELD: 'REGEXP', }; diff --git a/src/plugins/console/server/lib/spec_definitions/js/reindex.ts b/src/plugins/console/server/lib/spec_definitions/js/reindex.ts index 862a4323f7bf3..e5b2904172096 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/reindex.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/reindex.ts @@ -19,7 +19,6 @@ import { SpecDefinitionsService } from '../../../services'; -/* eslint-disable @typescript-eslint/camelcase */ export const reindex = (specService: SpecDefinitionsService) => { specService.addEndpointDescription('reindex', { methods: ['POST'], diff --git a/src/plugins/console/server/lib/spec_definitions/js/search.ts b/src/plugins/console/server/lib/spec_definitions/js/search.ts index e319870d7be5c..f0e2813117574 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/search.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/search.ts @@ -18,7 +18,6 @@ */ import { SpecDefinitionsService } from '../../../services'; -/* eslint-disable @typescript-eslint/camelcase */ export const search = (specService: SpecDefinitionsService) => { specService.addEndpointDescription('search', { priority: 10, // collides with get doc by id diff --git a/src/plugins/console/server/lib/spec_definitions/js/settings.ts b/src/plugins/console/server/lib/spec_definitions/js/settings.ts index 88c58e618533b..9ffaad2e52b59 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/settings.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/settings.ts @@ -19,7 +19,6 @@ import { SpecDefinitionsService } from '../../../services'; import { BOOLEAN } from './shared'; -/* eslint-disable @typescript-eslint/camelcase */ export const settings = (specService: SpecDefinitionsService) => { specService.addEndpointDescription('put_settings', { data_autocomplete_rules: { diff --git a/src/plugins/console/server/lib/spec_definitions/js/shared.ts b/src/plugins/console/server/lib/spec_definitions/js/shared.ts index a884e1aebe2e7..ace189e2d0913 100644 --- a/src/plugins/console/server/lib/spec_definitions/js/shared.ts +++ b/src/plugins/console/server/lib/spec_definitions/js/shared.ts @@ -17,7 +17,6 @@ * under the License. */ -/* eslint-disable @typescript-eslint/camelcase */ export const BOOLEAN = Object.freeze({ __one_of: [true, false], }); diff --git a/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx b/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx index e7534fa09aa3f..b6bee5c3360b4 100644 --- a/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx +++ b/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx @@ -29,8 +29,6 @@ import { import { coreMock } from '../../../../../core/public/mocks'; import { CoreStart } from 'kibana/public'; import { ClonePanelAction } from '.'; - -// eslint-disable-next-line import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks'; const { setup, doStart } = embeddablePluginMock.createInstance(); diff --git a/src/plugins/dashboard/public/application/actions/expand_panel_action.test.tsx b/src/plugins/dashboard/public/application/actions/expand_panel_action.test.tsx index 0f4a92a1a7b7d..ff4e3ee5f06eb 100644 --- a/src/plugins/dashboard/public/application/actions/expand_panel_action.test.tsx +++ b/src/plugins/dashboard/public/application/actions/expand_panel_action.test.tsx @@ -28,8 +28,6 @@ import { ContactCardEmbeddableInput, ContactCardEmbeddableOutput, } from '../../embeddable_plugin_test_samples'; - -// eslint-disable-next-line import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks'; const { setup, doStart } = embeddablePluginMock.createInstance(); diff --git a/src/plugins/dashboard/public/application/actions/replace_panel_action.test.tsx b/src/plugins/dashboard/public/application/actions/replace_panel_action.test.tsx index cc06bd41379aa..38afc22670709 100644 --- a/src/plugins/dashboard/public/application/actions/replace_panel_action.test.tsx +++ b/src/plugins/dashboard/public/application/actions/replace_panel_action.test.tsx @@ -29,8 +29,6 @@ import { } from '../../embeddable_plugin_test_samples'; import { coreMock } from '../../../../../core/public/mocks'; import { CoreStart } from 'kibana/public'; - -// eslint-disable-next-line import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks'; const { setup, doStart } = embeddablePluginMock.createInstance(); diff --git a/src/plugins/dashboard/public/application/application.ts b/src/plugins/dashboard/public/application/application.ts index 08eeb19dcda93..21f423d009ee7 100644 --- a/src/plugins/dashboard/public/application/application.ts +++ b/src/plugins/dashboard/public/application/application.ts @@ -110,7 +110,7 @@ const thirdPartyAngularDependencies = ['ngSanitize', 'ngRoute', 'react']; function mountDashboardApp(appBasePath: string, element: HTMLElement) { const mountpoint = document.createElement('div'); mountpoint.setAttribute('class', 'dshAppContainer'); - // eslint-disable-next-line + // eslint-disable-next-line no-unsanitized/property mountpoint.innerHTML = mainTemplate(appBasePath); // bootstrap angular into detached element and attach it later to // make angular-within-angular possible diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container.test.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container.test.tsx index 3cebe2b847155..a7226082d3dce 100644 --- a/src/plugins/dashboard/public/application/embeddable/dashboard_container.test.tsx +++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container.test.tsx @@ -17,8 +17,6 @@ * under the License. */ -// @ts-ignore -import { findTestSubject } from '@elastic/eui/lib/test'; import { nextTick } from 'test_utils/enzyme_helpers'; import { isErrorEmbeddable, ViewMode } from '../../embeddable_plugin'; import { DashboardContainer, DashboardContainerOptions } from './dashboard_container'; @@ -30,7 +28,6 @@ import { ContactCardEmbeddable, ContactCardEmbeddableOutput, } from '../../embeddable_plugin_test_samples'; -// eslint-disable-next-line import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks'; const options: DashboardContainerOptions = { diff --git a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.test.tsx b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.test.tsx index 493ae8eb51797..42d8f92de80aa 100644 --- a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.test.tsx +++ b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.test.tsx @@ -31,7 +31,6 @@ import { ContactCardEmbeddableFactory, } from '../../../embeddable_plugin_test_samples'; import { KibanaContextProvider } from '../../../../../kibana_react/public'; -// eslint-disable-next-line import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks'; let dashboardContainer: DashboardContainer | undefined; diff --git a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx index dcd07fe394c7d..d4d8fd0a4374b 100644 --- a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx +++ b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx @@ -256,7 +256,9 @@ class DashboardGridUi extends React.Component { expandedPanelId !== undefined && expandedPanelId === panel.explicitInput.id; const hidePanel = expandedPanelId !== undefined && expandedPanelId !== panel.explicitInput.id; const classes = classNames({ + // eslint-disable-next-line @typescript-eslint/naming-convention 'dshDashboardGrid__item--expanded': expandPanel, + // eslint-disable-next-line @typescript-eslint/naming-convention 'dshDashboardGrid__item--hidden': hidePanel, }); return ( diff --git a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.test.tsx b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.test.tsx index 733ea11c1eb64..1e07c610b0ef2 100644 --- a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.test.tsx +++ b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.test.tsx @@ -32,7 +32,6 @@ import { ContactCardEmbeddableFactory, } from '../../../embeddable_plugin_test_samples'; import { KibanaContextProvider } from '../../../../../kibana_react/public'; -// eslint-disable-next-line import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks'; import { applicationServiceMock } from '../../../../../../core/public/mocks'; diff --git a/src/plugins/dashboard/public/embeddable_plugin_test_samples.ts b/src/plugins/dashboard/public/embeddable_plugin_test_samples.ts index 0e49a94278dfc..45759bf078911 100644 --- a/src/plugins/dashboard/public/embeddable_plugin_test_samples.ts +++ b/src/plugins/dashboard/public/embeddable_plugin_test_samples.ts @@ -17,5 +17,4 @@ * under the License. */ -// eslint-disable-next-line export * from '../../../plugins/embeddable/public/lib/test_samples'; diff --git a/src/plugins/dashboard/public/url_generator.test.ts b/src/plugins/dashboard/public/url_generator.test.ts index 0eeb8f26ed88b..208b229318a9e 100644 --- a/src/plugins/dashboard/public/url_generator.test.ts +++ b/src/plugins/dashboard/public/url_generator.test.ts @@ -19,7 +19,6 @@ import { createDashboardUrlGenerator } from './url_generator'; import { hashedItemStore } from '../../kibana_utils/public'; -// eslint-disable-next-line import { mockStorage } from '../../kibana_utils/public/storage/hashed_item_store/mock'; import { esFilters, Filter } from '../../data/public'; import { SavedObjectLoader } from '../../saved_objects/public'; diff --git a/src/plugins/data/common/index_patterns/index_patterns/index_patterns.test.ts b/src/plugins/data/common/index_patterns/index_patterns/index_patterns.test.ts index a1842d31479c0..8223b31042124 100644 --- a/src/plugins/data/common/index_patterns/index_patterns/index_patterns.test.ts +++ b/src/plugins/data/common/index_patterns/index_patterns/index_patterns.test.ts @@ -17,7 +17,6 @@ * under the License. */ -// eslint-disable-next-line max-classes-per-file import { IndexPatternsService } from './index_patterns'; import { fieldFormatsMock } from '../../field_formats/mocks'; import { diff --git a/src/plugins/data/common/search/aggs/date_interval_utils/is_valid_interval.ts b/src/plugins/data/common/search/aggs/date_interval_utils/is_valid_interval.ts index 03d84c5e2c97b..cb8cb8e63f175 100644 --- a/src/plugins/data/common/search/aggs/date_interval_utils/is_valid_interval.ts +++ b/src/plugins/data/common/search/aggs/date_interval_utils/is_valid_interval.ts @@ -23,7 +23,7 @@ import { leastCommonInterval } from './least_common_interval'; // When base interval is set, check for least common interval and allow // input the value is the same. This means that the input interval is a // multiple of the base interval. -function _parseWithBase(value: string, baseInterval: string) { +function parseWithBase(value: string, baseInterval: string) { try { const interval = leastCommonInterval(baseInterval, value); return interval === value.replace(/\s/g, ''); @@ -34,7 +34,7 @@ function _parseWithBase(value: string, baseInterval: string) { export function isValidInterval(value: string, baseInterval?: string) { if (baseInterval) { - return _parseWithBase(value, baseInterval); + return parseWithBase(value, baseInterval); } else { return isValidEsInterval(value); } diff --git a/src/plugins/data/public/search/aggs/mocks.ts b/src/plugins/data/public/search/aggs/mocks.ts index 7a5dcc9be4592..2cad646067292 100644 --- a/src/plugins/data/public/search/aggs/mocks.ts +++ b/src/plugins/data/public/search/aggs/mocks.ts @@ -17,7 +17,6 @@ * under the License. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { coreMock } from '../../../../../../src/core/public/mocks'; import { AggConfigs, diff --git a/src/plugins/data/public/search/search_source/normalize_sort_request.ts b/src/plugins/data/public/search/search_source/normalize_sort_request.ts index b00d28b38d670..3ec0a13282d3e 100644 --- a/src/plugins/data/public/search/search_source/normalize_sort_request.ts +++ b/src/plugins/data/public/search/search_source/normalize_sort_request.ts @@ -61,6 +61,7 @@ function normalize( } // Don't include unmapped_type for _score field + // eslint-disable-next-line @typescript-eslint/naming-convention const { unmapped_type, ...otherSortOptions } = defaultSortOptions; return { [sortField]: { ...order, ...(sortField === '_score' ? otherSortOptions : defaultSortOptions) }, diff --git a/src/plugins/data/public/ui/index_pattern_select/index_pattern_select.tsx b/src/plugins/data/public/ui/index_pattern_select/index_pattern_select.tsx index 20e3fdae5ce5f..f187dcb804c79 100644 --- a/src/plugins/data/public/ui/index_pattern_select/index_pattern_select.tsx +++ b/src/plugins/data/public/ui/index_pattern_select/index_pattern_select.tsx @@ -189,12 +189,12 @@ export class IndexPatternSelect extends Component { render() { const { - fieldTypes, // eslint-disable-line no-unused-vars - onChange, // eslint-disable-line no-unused-vars - indexPatternId, // eslint-disable-line no-unused-vars + fieldTypes, + onChange, + indexPatternId, placeholder, - onNoIndexPatterns, // eslint-disable-line no-unused-vars - savedObjectsClient, // eslint-disable-line no-unused-vars + onNoIndexPatterns, + savedObjectsClient, ...rest } = this.props; diff --git a/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx b/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx index 05249d46a1c50..e5d03e2a774f1 100644 --- a/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx +++ b/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx @@ -275,6 +275,7 @@ export function QueryBarTopRow(props: Props) { }); const wrapperClasses = classNames('kbnQueryBar__datePickerWrapper', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'kbnQueryBar__datePickerWrapper-isHidden': isQueryInputFocused, }); diff --git a/src/plugins/data/public/ui/search_bar/search_bar.tsx b/src/plugins/data/public/ui/search_bar/search_bar.tsx index 2f740cc476087..b18b2fa9f0418 100644 --- a/src/plugins/data/public/ui/search_bar/search_bar.tsx +++ b/src/plugins/data/public/ui/search_bar/search_bar.tsx @@ -224,9 +224,7 @@ class SearchBarUI extends Component { }; // member-ordering rules conflict with use-before-declaration rules - /* eslint-disable */ public ro = new ResizeObserver(this.setFilterBarHeight); - /* eslint-enable */ public onSave = async (savedQueryMeta: SavedQueryMeta, saveAsNew = false) => { if (!this.state.query) return; @@ -411,6 +409,7 @@ class SearchBarUI extends Component { let filterBar; if (this.shouldRenderFilterBar()) { const filterGroupClasses = classNames('globalFilterGroup__wrapper', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'globalFilterGroup__wrapper-isVisible': this.state.isFiltersVisible, }); filterBar = ( diff --git a/src/plugins/data/public/ui/typeahead/suggestion_component.tsx b/src/plugins/data/public/ui/typeahead/suggestion_component.tsx index 951e47165819f..b859428e6ed7e 100644 --- a/src/plugins/data/public/ui/typeahead/suggestion_component.tsx +++ b/src/plugins/data/public/ui/typeahead/suggestion_component.tsx @@ -53,6 +53,7 @@ export function SuggestionComponent(props: Props) { // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/interactive-supports-focus
    , field: IFieldType | string, query: string, diff --git a/src/plugins/discover/public/application/components/table/table_row.tsx b/src/plugins/discover/public/application/components/table/table_row.tsx index abb6e149b1bfd..5f7dd9f37dcd3 100644 --- a/src/plugins/discover/public/application/components/table/table_row.tsx +++ b/src/plugins/discover/public/application/components/table/table_row.tsx @@ -60,6 +60,7 @@ export function DocViewTableRow({ valueRaw, }: Props) { const valueClassName = classNames({ + // eslint-disable-next-line @typescript-eslint/naming-convention kbnDocViewer__value: true, 'truncate-by-height': isCollapsible && isCollapsed, }); diff --git a/src/plugins/discover/public/url_generator.test.ts b/src/plugins/discover/public/url_generator.test.ts index cf9beb246fea2..a18ee486ab007 100644 --- a/src/plugins/discover/public/url_generator.test.ts +++ b/src/plugins/discover/public/url_generator.test.ts @@ -19,7 +19,6 @@ import { DiscoverUrlGenerator } from './url_generator'; import { hashedItemStore, getStatesFromKbnUrl } from '../../kibana_utils/public'; -// eslint-disable-next-line import { mockStorage } from '../../kibana_utils/public/storage/hashed_item_store/mock'; import { FilterStateStore } from '../../data/common'; diff --git a/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.test.tsx b/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.test.tsx index e29e941e898fb..aa0b504b63fbe 100644 --- a/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.test.tsx +++ b/src/plugins/embeddable/public/lib/containers/embeddable_child_panel.test.tsx @@ -28,7 +28,6 @@ import { ContactCardEmbeddableOutput, ContactCardEmbeddable, } from '../test_samples/embeddables/contact_card/contact_card_embeddable'; -// eslint-disable-next-line import { inspectorPluginMock } from '../../../../inspector/public/mocks'; import { mount } from 'enzyme'; import { embeddablePluginMock, createEmbeddablePanelMock } from '../../mocks'; diff --git a/src/plugins/embeddable/public/lib/panel/embeddable_panel.test.tsx b/src/plugins/embeddable/public/lib/panel/embeddable_panel.test.tsx index ff9f466a8d553..341a51d7348b2 100644 --- a/src/plugins/embeddable/public/lib/panel/embeddable_panel.test.tsx +++ b/src/plugins/embeddable/public/lib/panel/embeddable_panel.test.tsx @@ -40,7 +40,6 @@ import { ContactCardEmbeddableInput, ContactCardEmbeddableOutput, } from '../test_samples/embeddables/contact_card/contact_card_embeddable'; -// eslint-disable-next-line import { inspectorPluginMock } from '../../../../inspector/public/mocks'; import { EuiBadge } from '@elastic/eui'; import { embeddablePluginMock } from '../../mocks'; diff --git a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_action.test.tsx b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_action.test.tsx index 74b08535bf27a..d8def3147e52c 100644 --- a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_action.test.tsx +++ b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/add_panel_action.test.tsx @@ -26,7 +26,6 @@ import { } from '../../../../test_samples/embeddables/filterable_embeddable'; import { FilterableEmbeddableFactory } from '../../../../test_samples/embeddables/filterable_embeddable_factory'; import { FilterableContainer } from '../../../../test_samples/embeddables/filterable_container'; -// eslint-disable-next-line import { coreMock } from '../../../../../../../../core/public/mocks'; import { ContactCardEmbeddable } from '../../../../test_samples'; import { esFilters, Filter } from '../../../../../../../../plugins/data/public'; diff --git a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/inspect_panel_action.test.tsx b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/inspect_panel_action.test.tsx index 491eaad9faefa..eb83641448986 100644 --- a/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/inspect_panel_action.test.tsx +++ b/src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/inspect_panel_action.test.tsx @@ -26,7 +26,6 @@ import { FilterableEmbeddable, ContactCardEmbeddable, } from '../../../test_samples'; -// eslint-disable-next-line import { inspectorPluginMock } from '../../../../../../../plugins/inspector/public/mocks'; import { EmbeddableOutput, isErrorEmbeddable, ErrorEmbeddable } from '../../../embeddables'; import { of } from '../../../../tests/helpers'; diff --git a/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx b/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx index 7b66f29cc2726..2f086a3fb2c0c 100644 --- a/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx +++ b/src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx @@ -132,6 +132,7 @@ export function PanelHeader({ const showTitle = !isViewMode || (title && !hidePanelTitles) || viewDescription !== ''; const showPanelBar = badges.length > 0 || showTitle; const classes = classNames('embPanel__header', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'embPanel__header--floater': !showPanelBar, }); diff --git a/src/plugins/embeddable/public/mocks.tsx b/src/plugins/embeddable/public/mocks.tsx index 6b451e71522c5..94aa980e446ca 100644 --- a/src/plugins/embeddable/public/mocks.tsx +++ b/src/plugins/embeddable/public/mocks.tsx @@ -33,9 +33,7 @@ import { CoreStart } from '../../../core/public'; import { Start as InspectorStart } from '../../inspector/public'; import { dataPluginMock } from '../../data/public/mocks'; -// eslint-disable-next-line import { inspectorPluginMock } from '../../inspector/public/mocks'; -// eslint-disable-next-line import { uiActionsPluginMock } from '../../ui_actions/public/mocks'; export type Setup = jest.Mocked; diff --git a/src/plugins/embeddable/public/tests/apply_filter_action.test.ts b/src/plugins/embeddable/public/tests/apply_filter_action.test.ts index ec92f334267f5..9d765c9906443 100644 --- a/src/plugins/embeddable/public/tests/apply_filter_action.test.ts +++ b/src/plugins/embeddable/public/tests/apply_filter_action.test.ts @@ -30,7 +30,6 @@ import { FilterableContainerFactory, FilterableEmbeddableInput, } from '../lib/test_samples'; -// eslint-disable-next-line import { esFilters } from '../../../data/public'; test('ApplyFilterAction applies the filter to the root of the container tree', async () => { diff --git a/src/plugins/embeddable/public/tests/container.test.ts b/src/plugins/embeddable/public/tests/container.test.ts index e6162748fdb68..621ffe4c9dad6 100644 --- a/src/plugins/embeddable/public/tests/container.test.ts +++ b/src/plugins/embeddable/public/tests/container.test.ts @@ -43,7 +43,6 @@ import { FilterableContainer, FilterableContainerInput, } from '../lib/test_samples/embeddables/filterable_container'; -// eslint-disable-next-line import { coreMock } from '../../../../core/public/mocks'; import { testPlugin } from './test_plugin'; import { of } from './helpers'; diff --git a/src/plugins/embeddable/public/tests/customize_panel_modal.test.tsx b/src/plugins/embeddable/public/tests/customize_panel_modal.test.tsx index 311efae49f735..e094afe528498 100644 --- a/src/plugins/embeddable/public/tests/customize_panel_modal.test.tsx +++ b/src/plugins/embeddable/public/tests/customize_panel_modal.test.tsx @@ -31,7 +31,6 @@ import { ContactCardEmbeddableFactory, } from '../lib/test_samples/embeddables/contact_card/contact_card_embeddable_factory'; import { HelloWorldContainer } from '../lib/test_samples/embeddables/hello_world_container'; -// eslint-disable-next-line import { coreMock } from '../../../../core/public/mocks'; import { testPlugin } from './test_plugin'; import { CustomizePanelModal } from '../lib/panel/panel_header/panel_actions/customize_title/customize_panel_modal'; diff --git a/src/plugins/embeddable/public/tests/explicit_input.test.ts b/src/plugins/embeddable/public/tests/explicit_input.test.ts index cfddeec25b3b4..24785dd50a032 100644 --- a/src/plugins/embeddable/public/tests/explicit_input.test.ts +++ b/src/plugins/embeddable/public/tests/explicit_input.test.ts @@ -33,7 +33,6 @@ import { import { FilterableContainer } from '../lib/test_samples/embeddables/filterable_container'; import { isErrorEmbeddable } from '../lib'; import { HelloWorldContainer } from '../lib/test_samples/embeddables/hello_world_container'; -// eslint-disable-next-line import { coreMock } from '../../../../core/public/mocks'; import { esFilters, Filter } from '../../../../plugins/data/public'; import { createEmbeddablePanelMock } from '../mocks'; diff --git a/src/plugins/embeddable/public/tests/test_plugin.ts b/src/plugins/embeddable/public/tests/test_plugin.ts index bb12e3d7b9011..2c298b437a118 100644 --- a/src/plugins/embeddable/public/tests/test_plugin.ts +++ b/src/plugins/embeddable/public/tests/test_plugin.ts @@ -19,9 +19,7 @@ import { CoreSetup, CoreStart } from 'src/core/public'; import { UiActionsStart } from '../../../ui_actions/public'; -// eslint-disable-next-line import { uiActionsPluginMock } from '../../../ui_actions/public/mocks'; -// eslint-disable-next-line import { inspectorPluginMock } from '../../../inspector/public/mocks'; import { dataPluginMock } from '../../../data/public/mocks'; import { coreMock } from '../../../../core/public/mocks'; diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/ace/use_ui_ace_keyboard_mode.tsx b/src/plugins/es_ui_shared/__packages_do_not_import__/ace/use_ui_ace_keyboard_mode.tsx index d0d1aa1d8db15..4abb78c3bbc90 100644 --- a/src/plugins/es_ui_shared/__packages_do_not_import__/ace/use_ui_ace_keyboard_mode.tsx +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/ace/use_ui_ace_keyboard_mode.tsx @@ -27,7 +27,6 @@ const OverlayText = () => ( // The point of this element is for accessibility purposes, so ignore eslint error // in this case // - // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions <> Press Enter to start editing. When you’re done, press Escape to stop editing. diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts index b2f00610a3d33..15ea99eb6cc3a 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts @@ -41,6 +41,7 @@ export const useField = ( serializer, deserializer, } = config; + const { getFormData, __removeField, __updateFormDataAt, __validateFields } = form; const initialValue = useMemo(() => { diff --git a/src/plugins/expressions/common/execution/container.ts b/src/plugins/expressions/common/execution/container.ts index 6302c0adb550b..d0867e7ec6b57 100644 --- a/src/plugins/expressions/common/execution/container.ts +++ b/src/plugins/expressions/common/execution/container.ts @@ -58,7 +58,6 @@ const executionDefaultState: ExecutionState = { }, }; -// eslint-disable-next-line export interface ExecutionPureTransitions { start: (state: ExecutionState) => () => ExecutionState; setResult: (state: ExecutionState) => (result: Output) => ExecutionState; diff --git a/src/plugins/expressions/public/mocks.tsx b/src/plugins/expressions/public/mocks.tsx index 3a5ece271c4ee..6e649c29ead7d 100644 --- a/src/plugins/expressions/public/mocks.tsx +++ b/src/plugins/expressions/public/mocks.tsx @@ -20,10 +20,8 @@ import React from 'react'; import { ExpressionsSetup, ExpressionsStart, plugin as pluginInitializer } from '.'; -/* eslint-disable */ import { coreMock } from '../../../core/public/mocks'; import { bfetchPluginMock } from '../../bfetch/public/mocks'; -/* eslint-enable */ export type Setup = jest.Mocked; export type Start = jest.Mocked; diff --git a/src/plugins/expressions/server/mocks.ts b/src/plugins/expressions/server/mocks.ts index 1ace19a1848b0..e6b883e38f244 100644 --- a/src/plugins/expressions/server/mocks.ts +++ b/src/plugins/expressions/server/mocks.ts @@ -20,10 +20,7 @@ import { ExpressionsServerSetup, ExpressionsServerStart } from '.'; import { plugin as pluginInitializer } from '.'; import { coreMock } from '../../../core/server/mocks'; - -/* eslint-disable */ import { bfetchPluginMock } from '../../bfetch/server/mocks'; -/* eslint-enable */ export type Setup = jest.Mocked; export type Start = jest.Mocked; diff --git a/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts b/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts index f680329045625..4c31ccee1243a 100644 --- a/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts +++ b/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts @@ -18,7 +18,6 @@ */ /* eslint max-len: 0 */ -/* eslint-disable */ import { i18n } from '@kbn/i18n'; import { SavedObject } from 'kibana/server'; diff --git a/src/plugins/home/server/services/sample_data/data_sets/logs/saved_objects.ts b/src/plugins/home/server/services/sample_data/data_sets/logs/saved_objects.ts index 0620e93118b8d..97258c21bc8f0 100644 --- a/src/plugins/home/server/services/sample_data/data_sets/logs/saved_objects.ts +++ b/src/plugins/home/server/services/sample_data/data_sets/logs/saved_objects.ts @@ -18,7 +18,6 @@ */ /* eslint max-len: 0 */ -/* eslint-disable */ import { i18n } from '@kbn/i18n'; import { SavedObject } from 'kibana/server'; diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx index 5797149a51aea..fab638509313d 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx @@ -106,6 +106,7 @@ export class StepIndexPattern extends Component { await updateComponent(component); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('handleOptionsChange - step', async () => { diff --git a/src/plugins/input_control_vis/public/components/vis/form_row.test.tsx b/src/plugins/input_control_vis/public/components/vis/form_row.test.tsx index e0f34113bd6a0..4a98acbe17bd1 100644 --- a/src/plugins/input_control_vis/public/components/vis/form_row.test.tsx +++ b/src/plugins/input_control_vis/public/components/vis/form_row.test.tsx @@ -28,7 +28,7 @@ test('renders enabled control', () => {
    My Control
    ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('renders control with warning', () => { @@ -37,7 +37,7 @@ test('renders control with warning', () => {
    My Control
    ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('renders disabled control with tooltip', () => { @@ -51,5 +51,5 @@ test('renders disabled control with tooltip', () => {
    My Control
    ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); diff --git a/src/plugins/input_control_vis/public/components/vis/input_control_vis.test.tsx b/src/plugins/input_control_vis/public/components/vis/input_control_vis.test.tsx index b0b674ad7b6ee..e0938f700428e 100644 --- a/src/plugins/input_control_vis/public/components/vis/input_control_vis.test.tsx +++ b/src/plugins/input_control_vis/public/components/vis/input_control_vis.test.tsx @@ -93,7 +93,7 @@ test('Renders list control', () => { refreshControl={refreshControlMock} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('Renders range control', () => { @@ -114,7 +114,7 @@ test('Renders range control', () => { refreshControl={refreshControlMock} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('Apply and Cancel change btns enabled when there are changes', () => { @@ -135,7 +135,7 @@ test('Apply and Cancel change btns enabled when there are changes', () => { refreshControl={refreshControlMock} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('Clear btns enabled when there are values', () => { @@ -156,7 +156,7 @@ test('Clear btns enabled when there are values', () => { refreshControl={refreshControlMock} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('clearControls', () => { diff --git a/src/plugins/input_control_vis/public/components/vis/list_control.test.tsx b/src/plugins/input_control_vis/public/components/vis/list_control.test.tsx index 79fe2e376863a..4944a9dacfed6 100644 --- a/src/plugins/input_control_vis/public/components/vis/list_control.test.tsx +++ b/src/plugins/input_control_vis/public/components/vis/list_control.test.tsx @@ -49,7 +49,7 @@ test('renders ListControl', () => { intl={{} as any} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('disableMsg', () => { @@ -66,5 +66,5 @@ test('disableMsg', () => { intl={{} as any} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); diff --git a/src/plugins/input_control_vis/public/components/vis/range_control.test.tsx b/src/plugins/input_control_vis/public/components/vis/range_control.test.tsx index ff5d572fa21c4..569d115c9dbda 100644 --- a/src/plugins/input_control_vis/public/components/vis/range_control.test.tsx +++ b/src/plugins/input_control_vis/public/components/vis/range_control.test.tsx @@ -46,7 +46,7 @@ test('renders RangeControl', () => { const component = shallowWithIntl( {}} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('disabled', () => { @@ -69,7 +69,7 @@ test('disabled', () => { const component = shallowWithIntl( {}} /> ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('ceilWithPrecision', () => { diff --git a/src/plugins/input_control_vis/public/control/control.ts b/src/plugins/input_control_vis/public/control/control.ts index 1e1e05c96cc1a..91e8f1b26164b 100644 --- a/src/plugins/input_control_vis/public/control/control.ts +++ b/src/plugins/input_control_vis/public/control/control.ts @@ -17,8 +17,6 @@ * under the License. */ -/* eslint-disable no-multi-str*/ - import _ from 'lodash'; import { i18n } from '@kbn/i18n'; diff --git a/src/plugins/inspector/public/mocks.ts b/src/plugins/inspector/public/mocks.ts index 451daf4b8dc1a..ccddc0217831a 100644 --- a/src/plugins/inspector/public/mocks.ts +++ b/src/plugins/inspector/public/mocks.ts @@ -20,7 +20,6 @@ import { Setup as PluginSetup, Start as PluginStart } from '.'; import { InspectorViewRegistry } from './view_registry'; import { plugin as pluginInitializer } from '.'; -// eslint-disable-next-line import { coreMock } from '../../../core/public/mocks'; export type Setup = jest.Mocked; diff --git a/src/plugins/kibana_legacy/public/utils/inject_header_style.ts b/src/plugins/kibana_legacy/public/utils/inject_header_style.ts index b95e9721d5da4..0b953caeba8c4 100644 --- a/src/plugins/kibana_legacy/public/utils/inject_header_style.ts +++ b/src/plugins/kibana_legacy/public/utils/inject_header_style.ts @@ -36,6 +36,7 @@ export function injectHeaderStyle(uiSettings: IUiSettingsClient) { document.getElementsByTagName('head')[0].appendChild(style); uiSettings.get$('truncate:maxHeight').subscribe((value: number) => { + // eslint-disable-next-line no-unsanitized/property style.innerHTML = buildCSS(value); }); } diff --git a/src/plugins/kibana_react/public/adapters/ui_to_react_component.test.tsx b/src/plugins/kibana_react/public/adapters/ui_to_react_component.test.tsx index aefbd66e50fcf..cb8a9a4a2b65e 100644 --- a/src/plugins/kibana_react/public/adapters/ui_to_react_component.test.tsx +++ b/src/plugins/kibana_react/public/adapters/ui_to_react_component.test.tsx @@ -25,6 +25,7 @@ import { reactToUiComponent } from './react_to_ui_component'; const UiComp: UiComponent<{ cnt?: number }> = () => ({ render: (el, { cnt = 0 }) => { + // eslint-disable-next-line no-unsanitized/property el.innerHTML = `cnt: ${cnt}`; }, }); @@ -64,6 +65,7 @@ describe('uiToReactComponent', () => { test('does not crash if .unmount() not provided', () => { const UiComp2: UiComponent<{ cnt?: number }> = () => ({ render: (el, { cnt = 0 }) => { + // eslint-disable-next-line no-unsanitized/property el.innerHTML = `cnt: ${cnt}`; }, }); @@ -80,6 +82,7 @@ describe('uiToReactComponent', () => { const unmount = jest.fn(); const UiComp2: UiComponent<{ cnt?: number }> = () => ({ render: (el, { cnt = 0 }) => { + // eslint-disable-next-line no-unsanitized/property el.innerHTML = `cnt: ${cnt}`; }, unmount, @@ -100,6 +103,7 @@ describe('uiToReactComponent', () => { test('calls .render() method only once when components mounts, and once on every re-render', () => { const render = jest.fn((el, { cnt = 0 }) => { + // eslint-disable-next-line no-unsanitized/property el.innerHTML = `cnt: ${cnt}`; }); const UiComp2: UiComponent<{ cnt?: number }> = () => ({ diff --git a/src/plugins/kibana_react/public/markdown/markdown.test.tsx b/src/plugins/kibana_react/public/markdown/markdown.test.tsx index 5846b7a2d0dba..2fc0c6359fcc0 100644 --- a/src/plugins/kibana_react/public/markdown/markdown.test.tsx +++ b/src/plugins/kibana_react/public/markdown/markdown.test.tsx @@ -24,14 +24,14 @@ import { Markdown } from './markdown'; test('render', () => { const component = shallow(); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('should never render html tags', () => { const component = shallow( ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('should render links with parentheses correctly', () => { @@ -65,19 +65,19 @@ describe('props', () => { test('markdown', () => { const component = shallow(); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('openLinksInNewTab', () => { const component = shallow(); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('whiteListedRules', () => { const component = shallow( ); - expect(component).toMatchSnapshot(); // eslint-disable-line + expect(component).toMatchSnapshot(); }); test('should update markdown when openLinksInNewTab prop change', () => { diff --git a/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx b/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx index 45592c8a703af..832ea70f0460e 100644 --- a/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx +++ b/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx @@ -100,9 +100,9 @@ export class ValidatedDualRange extends Component { fullWidth, label, formRowDisplay, - value, // eslint-disable-line no-unused-vars - onChange, // eslint-disable-line no-unused-vars - allowEmptyRange, // eslint-disable-line no-unused-vars + value, + onChange, + allowEmptyRange, ...rest // TODO: Consider alternatives for spread operator in component } = this.props; diff --git a/src/plugins/kibana_utils/public/state_sync/public.api.md b/src/plugins/kibana_utils/public/state_sync/public.api.md index c174ba798d01a..ae8c0e8e401b8 100644 --- a/src/plugins/kibana_utils/public/state_sync/public.api.md +++ b/src/plugins/kibana_utils/public/state_sync/public.api.md @@ -74,7 +74,7 @@ export interface IStateSyncConfig { +export interface ISyncStateRef { start: StartSyncStateFnType; stop: StopSyncStateFnType; } diff --git a/src/plugins/kibana_utils/public/state_sync/state_sync.ts b/src/plugins/kibana_utils/public/state_sync/state_sync.ts index bbcaaedd0d8bf..2ceacb5123513 100644 --- a/src/plugins/kibana_utils/public/state_sync/state_sync.ts +++ b/src/plugins/kibana_utils/public/state_sync/state_sync.ts @@ -38,7 +38,7 @@ export type StartSyncStateFnType = () => void; /** * @public */ -export interface ISyncStateRef { +export interface ISyncStateRef { /** * stop state syncing */ diff --git a/src/plugins/kibana_utils/public/storage/hashed_item_store/mock.ts b/src/plugins/kibana_utils/public/storage/hashed_item_store/mock.ts index e3360e0e3cf51..43a8856176c42 100644 --- a/src/plugins/kibana_utils/public/storage/hashed_item_store/mock.ts +++ b/src/plugins/kibana_utils/public/storage/hashed_item_store/mock.ts @@ -32,6 +32,7 @@ export const mockStorage = new StubBrowserStorage(); const mockHashedItemStore = new HashedItemStore(mockStorage); jest.mock('./', () => { return { + // eslint-disable-next-line @typescript-eslint/no-var-requires HashedItemStore: require('./hashed_item_store').HashedItemStore, hashedItemStore: mockHashedItemStore, }; diff --git a/src/plugins/saved_objects_management/public/plugin.test.ts b/src/plugins/saved_objects_management/public/plugin.test.ts index 09080f46a6869..8b1ee2cefe468 100644 --- a/src/plugins/saved_objects_management/public/plugin.test.ts +++ b/src/plugins/saved_objects_management/public/plugin.test.ts @@ -18,9 +18,7 @@ */ import { coreMock } from '../../../core/public/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { homePluginMock } from '../../home/public/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { managementPluginMock } from '../../management/public/mocks'; import { dataPluginMock } from '../../data/public/mocks'; import { SavedObjectsManagementPlugin } from './plugin'; diff --git a/src/plugins/telemetry/server/telemetry_collection/get_local_stats.ts b/src/plugins/telemetry/server/telemetry_collection/get_local_stats.ts index 4d4031bb428ba..98c83a3394628 100644 --- a/src/plugins/telemetry/server/telemetry_collection/get_local_stats.ts +++ b/src/plugins/telemetry/server/telemetry_collection/get_local_stats.ts @@ -37,6 +37,7 @@ import { getDataTelemetry, DATA_TELEMETRY_ID, DataTelemetryPayload } from './get * @param {Object} kibana The Kibana Usage stats */ export function handleLocalStats( + // eslint-disable-next-line @typescript-eslint/naming-convention { cluster_name, cluster_uuid, version }: ESClusterInfo, { _nodes, cluster_name: clusterName, ...clusterStats }: any, kibana: KibanaUsageStats, diff --git a/src/plugins/timelion/public/application.ts b/src/plugins/timelion/public/application.ts index a398106d56f58..a4963ee6b1b03 100644 --- a/src/plugins/timelion/public/application.ts +++ b/src/plugins/timelion/public/application.ts @@ -100,7 +100,7 @@ const thirdPartyAngularDependencies = ['ngSanitize', 'ngRoute', 'react', 'angula function mountTimelionApp(appBasePath: string, element: HTMLElement, deps: RenderDeps) { const mountpoint = document.createElement('div'); mountpoint.setAttribute('class', 'timelionAppContainer'); - // eslint-disable-next-line + // eslint-disable-next-line no-unsanitized/property mountpoint.innerHTML = mainTemplate(appBasePath); // bootstrap angular into detached element and attach it later to // make angular-within-angular possible diff --git a/src/plugins/vis_type_metric/public/components/metric_vis_value.tsx b/src/plugins/vis_type_metric/public/components/metric_vis_value.tsx index 267d92abe2c75..5bc6c53d5a6a0 100644 --- a/src/plugins/vis_type_metric/public/components/metric_vis_value.tsx +++ b/src/plugins/vis_type_metric/public/components/metric_vis_value.tsx @@ -54,7 +54,9 @@ export class MetricVisValue extends Component { }; const containerClassName = classNames('mtrVis__container', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'mtrVis__container--light': metric.lightText, + // eslint-disable-next-line @typescript-eslint/naming-convention 'mtrVis__container-isfilterable': hasFilter, }); diff --git a/src/plugins/vis_type_table/public/table_vis_controller.test.ts b/src/plugins/vis_type_table/public/table_vis_controller.test.ts index e7d7f6726b0cd..56d17c187bd3f 100644 --- a/src/plugins/vis_type_table/public/table_vis_controller.test.ts +++ b/src/plugins/vis_type_table/public/table_vis_controller.test.ts @@ -28,14 +28,11 @@ import { getAngularModule } from './get_inner_angular'; import { initTableVisLegacyModule } from './table_vis_legacy_module'; import { getTableVisTypeDefinition } from './table_vis_type'; import { Vis } from '../../visualizations/public'; -// eslint-disable-next-line import { stubFields } from '../../data/public/stubs'; -// eslint-disable-next-line import { tableVisResponseHandler } from './table_vis_response_handler'; import { coreMock } from '../../../core/public/mocks'; import { IAggConfig, search } from '../../data/public'; // TODO: remove linting disable -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { searchServiceMock } from '../../data/public/search/mocks'; const { createAggConfigs } = searchServiceMock.createStartContract().aggs; diff --git a/src/plugins/vis_type_table/public/table_vis_fn.test.ts b/src/plugins/vis_type_table/public/table_vis_fn.test.ts index 6cb3f3e0f3779..2471522544fdf 100644 --- a/src/plugins/vis_type_table/public/table_vis_fn.test.ts +++ b/src/plugins/vis_type_table/public/table_vis_fn.test.ts @@ -20,7 +20,6 @@ import { createTableVisFn } from './table_vis_fn'; import { tableVisResponseHandler } from './table_vis_response_handler'; -// eslint-disable-next-line import { functionWrapper } from '../../expressions/common/expression_functions/specs/tests/utils'; jest.mock('./table_vis_response_handler', () => ({ diff --git a/src/plugins/vis_type_timeseries/common/vis_schema.ts b/src/plugins/vis_type_timeseries/common/vis_schema.ts index 7161c197b6940..a462e488c6732 100644 --- a/src/plugins/vis_type_timeseries/common/vis_schema.ts +++ b/src/plugins/vis_type_timeseries/common/vis_schema.ts @@ -233,6 +233,7 @@ export const panel = schema.object({ legend_position: stringOptionalNullable, markdown: stringOptionalNullable, markdown_scrollbars: numberIntegerOptional, + // eslint-disable-next-line @typescript-eslint/naming-convention markdown_openLinksInNewTab: numberIntegerOptional, markdown_vertical_align: stringOptionalNullable, markdown_less: stringOptionalNullable, diff --git a/src/plugins/vis_type_timeseries/public/application/components/color_picker.tsx b/src/plugins/vis_type_timeseries/public/application/components/color_picker.tsx index 444e5c90c7a6d..97069fa0c5e0c 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/color_picker.tsx +++ b/src/plugins/vis_type_timeseries/public/application/components/color_picker.tsx @@ -17,7 +17,7 @@ * under the License. */ -/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */ +/* eslint-disable jsx-a11y/click-events-have-key-events */ // The color picker is not yet accessible. import React, { useState } from 'react'; diff --git a/src/plugins/vis_type_vega/public/data_model/vega_parser.ts b/src/plugins/vis_type_vega/public/data_model/vega_parser.ts index c867523d2b3b3..94d79071b8ef2 100644 --- a/src/plugins/vis_type_vega/public/data_model/vega_parser.ts +++ b/src/plugins/vis_type_vega/public/data_model/vega_parser.ts @@ -159,7 +159,6 @@ export class VegaParser { */ _compileVegaLite() { this.vlspec = this.spec; - // eslint-disable-next-line import/namespace const logger = vega.logger(vega.Warn); // note: eslint has a false positive here logger.warn = this._onWarning.bind(this); this.spec = vegaLite.compile(this.vlspec, logger).spec; diff --git a/src/plugins/vis_type_vislib/public/pie_fn.test.ts b/src/plugins/vis_type_vislib/public/pie_fn.test.ts index a8c03eba2b449..eb68353b7c0e2 100644 --- a/src/plugins/vis_type_vislib/public/pie_fn.test.ts +++ b/src/plugins/vis_type_vislib/public/pie_fn.test.ts @@ -17,7 +17,6 @@ * under the License. */ -// eslint-disable-next-line import { functionWrapper } from '../../expressions/common/expression_functions/specs/tests/utils'; import { createPieVisFn } from './pie_fn'; // @ts-ignore diff --git a/src/plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx b/src/plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx index 129fdd2ade9bd..5a2db2d21c6fe 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx +++ b/src/plugins/vis_type_vislib/public/vislib/components/legend/legend.tsx @@ -254,6 +254,7 @@ export class VisLegend extends PureComponent { type="button" onClick={this.toggleLegend} className={classNames('visLegend__toggle kbn-resetFocusState', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'visLegend__toggle--isOpen': open, })} aria-label={i18n.translate('visTypeVislib.vislib.legend.toggleLegendButtonAriaLabel', { diff --git a/src/plugins/vis_type_vislib/public/vislib/components/legend/legend_item.tsx b/src/plugins/vis_type_vislib/public/vislib/components/legend/legend_item.tsx index b440384899d5f..1bc41f9f61a1a 100644 --- a/src/plugins/vis_type_vislib/public/vislib/components/legend/legend_item.tsx +++ b/src/plugins/vis_type_vislib/public/vislib/components/legend/legend_item.tsx @@ -182,6 +182,7 @@ const VisLegendItemComponent = ({ onClick={setColor(item.label, color)} onKeyPress={setColor(item.label, color)} className={classNames('visLegend__valueColorPickerDot', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'visLegend__valueColorPickerDot-isSelected': color === getColor(item.label), })} style={{ color }} diff --git a/src/plugins/visualizations/public/legacy/build_pipeline.ts b/src/plugins/visualizations/public/legacy/build_pipeline.ts index d3fe814f3b010..d52e2fcc13bff 100644 --- a/src/plugins/visualizations/public/legacy/build_pipeline.ts +++ b/src/plugins/visualizations/public/legacy/build_pipeline.ts @@ -52,16 +52,18 @@ export interface Schemas { [key: string]: any[] | undefined; } -type buildVisFunction = ( +type BuildVisFunction = ( params: VisParams, schemas: Schemas, uiState: any, meta?: { savedObjectId?: string } ) => string; + +// eslint-disable-next-line @typescript-eslint/naming-convention type buildVisConfigFunction = (schemas: Schemas, visParams?: VisParams) => VisParams; interface BuildPipelineVisFunction { - [key: string]: buildVisFunction; + [key: string]: BuildVisFunction; } interface BuildVisConfigFunction { diff --git a/src/plugins/visualizations/public/saved_visualizations/saved_visualizations.ts b/src/plugins/visualizations/public/saved_visualizations/saved_visualizations.ts index d44fc2f4a75af..94538b4081aef 100644 --- a/src/plugins/visualizations/public/saved_visualizations/saved_visualizations.ts +++ b/src/plugins/visualizations/public/saved_visualizations/saved_visualizations.ts @@ -43,7 +43,7 @@ export function createSavedVisLoader(services: SavedObjectKibanaServicesWithVisu typeName = JSON.parse(String(source.visState)).type; } catch (e) { /* missing typename handled below */ - } // eslint-disable-line no-empty + } } if (!typeName || !visTypes.get(typeName)) { diff --git a/src/test_utils/public/http_test_setup.ts b/src/test_utils/public/http_test_setup.ts index 4a71e912f0f9e..7c70f64887af1 100644 --- a/src/test_utils/public/http_test_setup.ts +++ b/src/test_utils/public/http_test_setup.ts @@ -17,11 +17,9 @@ * under the License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import { HttpService } from '../../core/public/http'; import { fatalErrorsServiceMock } from '../../core/public/fatal_errors/fatal_errors_service.mock'; import { injectedMetadataServiceMock } from '../../core/public/injected_metadata/injected_metadata_service.mock'; -/* eslint-enable @kbn/eslint/no-restricted-paths */ export type SetupTap = ( injectedMetadata: ReturnType, diff --git a/test/functional/apps/console/_console.ts b/test/functional/apps/console/_console.ts index 2c2528ab8c41d..6e524b2cd33df 100644 --- a/test/functional/apps/console/_console.ts +++ b/test/functional/apps/console/_console.ts @@ -31,7 +31,6 @@ GET _search `.trim(); -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const log = getService('log'); diff --git a/test/functional/apps/home/_navigation.ts b/test/functional/apps/home/_navigation.ts index b8fa5b184cd1f..91ef444bc3a83 100644 --- a/test/functional/apps/home/_navigation.ts +++ b/test/functional/apps/home/_navigation.ts @@ -20,7 +20,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: FtrProviderContext) { const browser = getService('browser'); const PageObjects = getPageObjects(['common', 'header', 'home', 'timePicker']); diff --git a/test/functional/apps/visualize/_chart_types.ts b/test/functional/apps/visualize/_chart_types.ts index 8aa8b9c32e967..ecb7e9630c2c6 100644 --- a/test/functional/apps/visualize/_chart_types.ts +++ b/test/functional/apps/visualize/_chart_types.ts @@ -21,7 +21,6 @@ import _ from 'lodash'; import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: FtrProviderContext) { const log = getService('log'); const PageObjects = getPageObjects(['common', 'visualize']); diff --git a/test/functional/apps/visualize/_linked_saved_searches.ts b/test/functional/apps/visualize/_linked_saved_searches.ts index e7b2909afa5a1..4151e0e9b471c 100644 --- a/test/functional/apps/visualize/_linked_saved_searches.ts +++ b/test/functional/apps/visualize/_linked_saved_searches.ts @@ -19,7 +19,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: FtrProviderContext) { const browser = getService('browser'); const filterBar = getService('filterBar'); diff --git a/test/functional/apps/visualize/_tsvb_chart.ts b/test/functional/apps/visualize/_tsvb_chart.ts index f1082bf618b90..ab76598ae2ea5 100644 --- a/test/functional/apps/visualize/_tsvb_chart.ts +++ b/test/functional/apps/visualize/_tsvb_chart.ts @@ -20,7 +20,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const log = getService('log'); diff --git a/test/functional/apps/visualize/_tsvb_markdown.ts b/test/functional/apps/visualize/_tsvb_markdown.ts index fae60fe019433..ba60aa83d92da 100644 --- a/test/functional/apps/visualize/_tsvb_markdown.ts +++ b/test/functional/apps/visualize/_tsvb_markdown.ts @@ -20,7 +20,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getPageObjects, getService }: FtrProviderContext) { const { visualBuilder, timePicker } = getPageObjects(['visualBuilder', 'timePicker']); const retry = getService('retry'); diff --git a/test/functional/apps/visualize/_tsvb_time_series.ts b/test/functional/apps/visualize/_tsvb_time_series.ts index c048755fc5fbe..0b2a52b367a20 100644 --- a/test/functional/apps/visualize/_tsvb_time_series.ts +++ b/test/functional/apps/visualize/_tsvb_time_series.ts @@ -19,7 +19,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getPageObjects, getService }: FtrProviderContext) { const { visualize, visualBuilder } = getPageObjects(['visualBuilder', 'visualize']); const retry = getService('retry'); diff --git a/test/functional/apps/visualize/_vega_chart.ts b/test/functional/apps/visualize/_vega_chart.ts index 6c0b77411ae99..a1ed8460f1b22 100644 --- a/test/functional/apps/visualize/_vega_chart.ts +++ b/test/functional/apps/visualize/_vega_chart.ts @@ -20,7 +20,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getPageObjects, getService }: FtrProviderContext) { const PageObjects = getPageObjects([ 'timePicker', diff --git a/test/functional/apps/visualize/index.ts b/test/functional/apps/visualize/index.ts index 42b82486dc13f..a30517519820e 100644 --- a/test/functional/apps/visualize/index.ts +++ b/test/functional/apps/visualize/index.ts @@ -20,7 +20,6 @@ import { FtrProviderContext } from '../../ftr_provider_context.d'; import { UI_SETTINGS } from '../../../../src/plugins/data/common'; -// eslint-disable-next-line @typescript-eslint/no-namespace, import/no-default-export export default function ({ getService, getPageObjects, loadTestFile }: FtrProviderContext) { const browser = getService('browser'); const log = getService('log'); diff --git a/test/functional/apps/visualize/input_control_vis/input_control_range.ts b/test/functional/apps/visualize/input_control_vis/input_control_range.ts index f52a812d4d50c..b855a01427068 100644 --- a/test/functional/apps/visualize/input_control_vis/input_control_range.ts +++ b/test/functional/apps/visualize/input_control_vis/input_control_range.ts @@ -20,7 +20,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); diff --git a/test/mocha_decorations.d.ts b/test/mocha_decorations.d.ts index 4645faf3d5fe8..5ad289eb4f1a3 100644 --- a/test/mocha_decorations.d.ts +++ b/test/mocha_decorations.d.ts @@ -34,7 +34,6 @@ type Tags = | 'ciGroup12'; // We need to use the namespace here to match the Mocha definition -// eslint-disable-next-line @typescript-eslint/no-namespace declare module 'mocha' { interface Suite { /** diff --git a/test/plugin_functional/plugins/core_app_status/public/plugin.tsx b/test/plugin_functional/plugins/core_app_status/public/plugin.tsx index bdc08c03c1912..d8042f2c240dc 100644 --- a/test/plugin_functional/plugins/core_app_status/public/plugin.tsx +++ b/test/plugin_functional/plugins/core_app_status/public/plugin.tsx @@ -63,7 +63,7 @@ export class CoreAppStatusPlugin implements Plugin<{}, CoreAppStatusPluginStart> return core.application.navigateToApp(appId); }, }; - window.__coreAppStatus = startContract; + window._coreAppStatus = startContract; return startContract; } public stop() {} diff --git a/test/plugin_functional/plugins/core_app_status/public/types.ts b/test/plugin_functional/plugins/core_app_status/public/types.ts index 7c708e6c26d91..4f6070d130568 100644 --- a/test/plugin_functional/plugins/core_app_status/public/types.ts +++ b/test/plugin_functional/plugins/core_app_status/public/types.ts @@ -21,6 +21,6 @@ import { CoreAppStatusPluginStart } from './plugin'; declare global { interface Window { - __coreAppStatus: CoreAppStatusPluginStart; + _coreAppStatus: CoreAppStatusPluginStart; } } diff --git a/test/plugin_functional/plugins/core_provider_plugin/public/index.ts b/test/plugin_functional/plugins/core_provider_plugin/public/index.ts index ac2d63bb9fd75..c1dd56fb96700 100644 --- a/test/plugin_functional/plugins/core_provider_plugin/public/index.ts +++ b/test/plugin_functional/plugins/core_provider_plugin/public/index.ts @@ -31,7 +31,7 @@ class CoreProviderPlugin implements Plugin { } public start(core: CoreStart, plugins: Record) { - window.__coreProvider = { + window._coreProvider = { setup: this.setupDeps!, start: { core, diff --git a/test/plugin_functional/plugins/core_provider_plugin/types.ts b/test/plugin_functional/plugins/core_provider_plugin/types.ts index cae3b604ecd95..6edbaa59598f8 100644 --- a/test/plugin_functional/plugins/core_provider_plugin/types.ts +++ b/test/plugin_functional/plugins/core_provider_plugin/types.ts @@ -20,7 +20,7 @@ import { CoreSetup, CoreStart } from 'kibana/public'; declare global { interface Window { - __coreProvider: { + _coreProvider: { setup: { core: CoreSetup; plugins: Record; diff --git a/test/plugin_functional/test_suites/application_links/index.ts b/test/plugin_functional/test_suites/application_links/index.ts index 120b3fb49f138..ddacfebea96d2 100644 --- a/test/plugin_functional/test_suites/application_links/index.ts +++ b/test/plugin_functional/test_suites/application_links/index.ts @@ -18,7 +18,6 @@ */ import { PluginFunctionalProviderContext } from '../../services'; -// eslint-disable-next-line import/no-default-export export default function ({ loadTestFile }: PluginFunctionalProviderContext) { describe('application links', () => { loadTestFile(require.resolve('./redirect_app_links')); diff --git a/test/plugin_functional/test_suites/application_links/redirect_app_links.ts b/test/plugin_functional/test_suites/application_links/redirect_app_links.ts index 9120018958bda..2117e0e37f71d 100644 --- a/test/plugin_functional/test_suites/application_links/redirect_app_links.ts +++ b/test/plugin_functional/test_suites/application_links/redirect_app_links.ts @@ -24,7 +24,7 @@ import '../../plugins/core_app_status/public/types'; declare global { interface Window { - __nonReloadedFlag?: boolean; + _nonReloadedFlag?: boolean; } } @@ -33,7 +33,6 @@ const getPathWithHash = (absoluteUrl: string) => { return `${parsed.path}${parsed.hash ?? ''}`; }; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common']); const browser = getService('browser'); @@ -41,13 +40,13 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide const setNonReloadedFlag = () => { return browser.executeAsync(async (cb) => { - window.__nonReloadedFlag = true; + window._nonReloadedFlag = true; cb(); }); }; const wasReloaded = () => { return browser.executeAsync(async (cb) => { - const reloaded = window.__nonReloadedFlag !== true; + const reloaded = window._nonReloadedFlag !== true; cb(reloaded); }); }; diff --git a/test/plugin_functional/test_suites/core_plugins/application_leave_confirm.ts b/test/plugin_functional/test_suites/core_plugins/application_leave_confirm.ts index d2e23f7d9572e..98c59717fcac0 100644 --- a/test/plugin_functional/test_suites/core_plugins/application_leave_confirm.ts +++ b/test/plugin_functional/test_suites/core_plugins/application_leave_confirm.ts @@ -29,7 +29,6 @@ const getKibanaUrl = (pathname?: string, search?: string) => search, }); -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common']); const browser = getService('browser'); diff --git a/test/plugin_functional/test_suites/core_plugins/application_status.ts b/test/plugin_functional/test_suites/core_plugins/application_status.ts index f56a6e8d62fb1..b937ffdc7f5e6 100644 --- a/test/plugin_functional/test_suites/core_plugins/application_status.ts +++ b/test/plugin_functional/test_suites/core_plugins/application_status.ts @@ -36,7 +36,6 @@ const getKibanaUrl = (pathname?: string, search?: string) => search, }); -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common']); const browser = getService('browser'); @@ -46,14 +45,14 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide const setAppStatus = async (s: Partial) => { return browser.executeAsync(async (status, cb) => { - window.__coreAppStatus.setAppStatus(status); + window._coreAppStatus.setAppStatus(status); cb(); }, s); }; const navigateToApp = async (id: string) => { return await browser.executeAsync(async (appId, cb) => { - await window.__coreAppStatus.navigateToApp(appId); + await window._coreAppStatus.navigateToApp(appId); cb(); }, id); }; diff --git a/test/plugin_functional/test_suites/core_plugins/applications.ts b/test/plugin_functional/test_suites/core_plugins/applications.ts index 6d31889a9cbe4..9306b62b9d521 100644 --- a/test/plugin_functional/test_suites/core_plugins/applications.ts +++ b/test/plugin_functional/test_suites/core_plugins/applications.ts @@ -20,7 +20,6 @@ import url from 'url'; import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common']); diff --git a/test/plugin_functional/test_suites/core_plugins/elasticsearch_client.ts b/test/plugin_functional/test_suites/core_plugins/elasticsearch_client.ts index 9b9efc261126f..a44db4193248d 100644 --- a/test/plugin_functional/test_suites/core_plugins/elasticsearch_client.ts +++ b/test/plugin_functional/test_suites/core_plugins/elasticsearch_client.ts @@ -19,7 +19,6 @@ import { PluginFunctionalProviderContext } from '../../services'; import '../../plugins/core_provider_plugin/types'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); describe('elasticsearch client', () => { diff --git a/test/plugin_functional/test_suites/core_plugins/index.ts b/test/plugin_functional/test_suites/core_plugins/index.ts index 99ac6dc9b8474..cc498fa10818f 100644 --- a/test/plugin_functional/test_suites/core_plugins/index.ts +++ b/test/plugin_functional/test_suites/core_plugins/index.ts @@ -18,7 +18,6 @@ */ import { PluginFunctionalProviderContext } from '../../services'; -// eslint-disable-next-line import/no-default-export export default function ({ loadTestFile }: PluginFunctionalProviderContext) { describe('core plugins', () => { loadTestFile(require.resolve('./applications')); diff --git a/test/plugin_functional/test_suites/core_plugins/legacy_plugins.ts b/test/plugin_functional/test_suites/core_plugins/legacy_plugins.ts index c9274c867df83..d03185796000f 100644 --- a/test/plugin_functional/test_suites/core_plugins/legacy_plugins.ts +++ b/test/plugin_functional/test_suites/core_plugins/legacy_plugins.ts @@ -20,7 +20,6 @@ import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common']); const testSubjects = getService('testSubjects'); diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index 7ae6865d45a97..08fd576c036a4 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -32,7 +32,6 @@ declare global { } } -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common']); const appsMenu = getService('appsMenu'); diff --git a/test/plugin_functional/test_suites/core_plugins/server_plugins.ts b/test/plugin_functional/test_suites/core_plugins/server_plugins.ts index 00f242ccc62f6..f67474f3fe3b9 100644 --- a/test/plugin_functional/test_suites/core_plugins/server_plugins.ts +++ b/test/plugin_functional/test_suites/core_plugins/server_plugins.ts @@ -19,7 +19,6 @@ import { PluginFunctionalProviderContext } from '../../services'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); diff --git a/test/plugin_functional/test_suites/core_plugins/top_nav.ts b/test/plugin_functional/test_suites/core_plugins/top_nav.ts index 6d2c6b7f85d28..c679ac89f2f61 100644 --- a/test/plugin_functional/test_suites/core_plugins/top_nav.ts +++ b/test/plugin_functional/test_suites/core_plugins/top_nav.ts @@ -19,7 +19,6 @@ import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common']); diff --git a/test/plugin_functional/test_suites/core_plugins/ui_plugins.ts b/test/plugin_functional/test_suites/core_plugins/ui_plugins.ts index 3a27be42a2a42..e17ce4059ad21 100644 --- a/test/plugin_functional/test_suites/core_plugins/ui_plugins.ts +++ b/test/plugin_functional/test_suites/core_plugins/ui_plugins.ts @@ -21,7 +21,6 @@ import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; import '../../../../test/plugin_functional/plugins/core_provider_plugin/types'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common']); const browser = getService('browser'); @@ -36,7 +35,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide it('should run the new platform plugins', async () => { expect( await browser.execute(() => { - return window.__coreProvider.setup.plugins.core_plugin_b.sayHi(); + return window._coreProvider.setup.plugins.core_plugin_b.sayHi(); }) ).to.be('Plugin A said: Hello from Plugin A!'); }); @@ -50,7 +49,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide it('to start services via coreSetup.getStartServices', async () => { expect( await browser.executeAsync(async (cb) => { - const [coreStart] = await window.__coreProvider.setup.core.getStartServices(); + const [coreStart] = await window._coreProvider.setup.core.getStartServices(); cb(Boolean(coreStart.overlays)); }) ).to.be(true); @@ -77,7 +76,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide it('should send kbn-system-request header when asSystemRequest: true', async () => { expect( await browser.executeAsync(async (cb) => { - window.__coreProvider.start.plugins.core_plugin_b.sendSystemRequest(true).then(cb); + window._coreProvider.start.plugins.core_plugin_b.sendSystemRequest(true).then(cb); }) ).to.be('/core_plugin_b/system_request says: "System request? true"'); }); @@ -85,7 +84,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide it('should not send kbn-system-request header when asSystemRequest: false', async () => { expect( await browser.executeAsync(async (cb) => { - window.__coreProvider.start.plugins.core_plugin_b.sendSystemRequest(false).then(cb); + window._coreProvider.start.plugins.core_plugin_b.sendSystemRequest(false).then(cb); }) ).to.be('/core_plugin_b/system_request says: "System request? false"'); }); diff --git a/test/plugin_functional/test_suites/core_plugins/ui_settings.ts b/test/plugin_functional/test_suites/core_plugins/ui_settings.ts index 3a618ceaeb22f..2ff3072552b05 100644 --- a/test/plugin_functional/test_suites/core_plugins/ui_settings.ts +++ b/test/plugin_functional/test_suites/core_plugins/ui_settings.ts @@ -20,7 +20,6 @@ import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; import '../../plugins/core_provider_plugin/types'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const PageObjects = getPageObjects(['common']); const browser = getService('browser'); @@ -33,7 +32,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide it('client plugins have access to registered settings', async () => { const settings = await browser.execute(() => { - return window.__coreProvider.setup.core.uiSettings.getAll().ui_settings_plugin; + return window._coreProvider.setup.core.uiSettings.getAll().ui_settings_plugin; }); expect(settings).to.eql({ @@ -44,13 +43,13 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide }); const settingsValue = await browser.execute(() => { - return window.__coreProvider.setup.core.uiSettings.get('ui_settings_plugin'); + return window._coreProvider.setup.core.uiSettings.get('ui_settings_plugin'); }); expect(settingsValue).to.be('2'); const settingsValueViaObservables = await browser.executeAsync(async (callback) => { - window.__coreProvider.setup.core.uiSettings + window._coreProvider.setup.core.uiSettings .get$('ui_settings_plugin') .subscribe((v) => callback(v)); }); diff --git a/test/plugin_functional/test_suites/data_plugin/index_patterns.ts b/test/plugin_functional/test_suites/data_plugin/index_patterns.ts index 481e9d76e3acc..2db9eb733f805 100644 --- a/test/plugin_functional/test_suites/data_plugin/index_patterns.ts +++ b/test/plugin_functional/test_suites/data_plugin/index_patterns.ts @@ -20,7 +20,6 @@ import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; import '../../plugins/core_provider_plugin/types'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); diff --git a/test/plugin_functional/test_suites/doc_views/doc_views.ts b/test/plugin_functional/test_suites/doc_views/doc_views.ts index 87b4dc2a63d5a..d45be1c66149a 100644 --- a/test/plugin_functional/test_suites/doc_views/doc_views.ts +++ b/test/plugin_functional/test_suites/doc_views/doc_views.ts @@ -20,7 +20,6 @@ import expect from '@kbn/expect'; import { PluginFunctionalProviderContext } from '../../services'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { const testSubjects = getService('testSubjects'); const find = getService('find'); diff --git a/test/typings/rison_node.d.ts b/test/typings/rison_node.d.ts index a0497f421c3fe..2c63488e6b6db 100644 --- a/test/typings/rison_node.d.ts +++ b/test/typings/rison_node.d.ts @@ -29,11 +29,11 @@ declare module 'rison-node' { export const decode: (input: string) => RisonValue; - // eslint-disable-next-line @typescript-eslint/camelcase + // eslint-disable-next-line @typescript-eslint/naming-convention export const decode_object: (input: string) => RisonObject; export const encode: (input: Input) => string; - // eslint-disable-next-line @typescript-eslint/camelcase + // eslint-disable-next-line @typescript-eslint/naming-convention export const encode_object: (input: Input) => string; } diff --git a/typings/rison_node.d.ts b/typings/rison_node.d.ts index a0497f421c3fe..2c63488e6b6db 100644 --- a/typings/rison_node.d.ts +++ b/typings/rison_node.d.ts @@ -29,11 +29,11 @@ declare module 'rison-node' { export const decode: (input: string) => RisonValue; - // eslint-disable-next-line @typescript-eslint/camelcase + // eslint-disable-next-line @typescript-eslint/naming-convention export const decode_object: (input: string) => RisonObject; export const encode: (input: Input) => string; - // eslint-disable-next-line @typescript-eslint/camelcase + // eslint-disable-next-line @typescript-eslint/naming-convention export const encode_object: (input: Input) => string; } diff --git a/x-pack/legacy/plugins/beats_management/common/io_ts_types.ts b/x-pack/legacy/plugins/beats_management/common/io_ts_types.ts index 7d71ea5ad8256..175aba82c8dac 100644 --- a/x-pack/legacy/plugins/beats_management/common/io_ts_types.ts +++ b/x-pack/legacy/plugins/beats_management/common/io_ts_types.ts @@ -8,7 +8,6 @@ import * as t from 'io-ts'; import { isRight } from 'fp-ts/lib/Either'; class DateFromStringType extends t.Type { - // eslint-disable-next-line public readonly _tag: 'DateFromISOStringType' = 'DateFromISOStringType'; constructor() { super( diff --git a/x-pack/legacy/plugins/beats_management/scripts/fake_env.ts b/x-pack/legacy/plugins/beats_management/scripts/fake_env.ts index 246f86c957174..65254d24863cd 100644 --- a/x-pack/legacy/plugins/beats_management/scripts/fake_env.ts +++ b/x-pack/legacy/plugins/beats_management/scripts/fake_env.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import Chance from 'chance'; // eslint-disable-line +import Chance from 'chance'; // @ts-ignore import request from 'request'; import uuidv4 from 'uuid/v4'; @@ -121,8 +121,8 @@ const start = async ( () => ({ type: configBlockSchemas[Math.floor(Math.random())].id, - description: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sint ista Graecorum; -Nihil ad rem! Ne sit sane; Quod quidem nobis non saepe contingit. + description: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sint ista Graecorum; +Nihil ad rem! Ne sit sane; Quod quidem nobis non saepe contingit. Duo Reges: constructio interrete. Itaque his sapiens semper vacabit.`.substring( 0, Math.floor(Math.random() * (0 - 115 + 1)) diff --git a/x-pack/legacy/plugins/beats_management/server/lib/beats.ts b/x-pack/legacy/plugins/beats_management/server/lib/beats.ts index 6b7053f40550b..e8a6e6f999ca3 100644 --- a/x-pack/legacy/plugins/beats_management/server/lib/beats.ts +++ b/x-pack/legacy/plugins/beats_management/server/lib/beats.ts @@ -93,8 +93,8 @@ export class CMBeatsDomain { remoteAddress: string, beat: Partial ): Promise<{ status: string; accessToken?: string }> { + // eslint-disable-next-line @typescript-eslint/naming-convention const { token, expires_on } = await this.tokens.getEnrollmentToken(enrollmentToken); - // eslint-disable-next-line @typescript-eslint/camelcase if (expires_on && moment(expires_on).isBefore(moment())) { return { status: BeatEnrollmentStatus.ExpiredEnrollmentToken }; } diff --git a/x-pack/plugins/actions/server/builtin_action_types/index.test.ts b/x-pack/plugins/actions/server/builtin_action_types/index.test.ts index 21efc05d49c38..acab6dd41b4b3 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/index.test.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/index.test.ts @@ -44,8 +44,6 @@ beforeEach(() => { describe('action is registered', () => { test('gets registered with builtin actions', () => { const { actionTypeRegistry } = createActionTypeRegistry(); - ACTION_TYPE_IDS.forEach((ACTION_TYPE_ID) => - expect(actionTypeRegistry.has(ACTION_TYPE_ID)).toEqual(true) - ); + ACTION_TYPE_IDS.forEach((id) => expect(actionTypeRegistry.has(id)).toEqual(true)); }); }); diff --git a/x-pack/plugins/actions/server/builtin_action_types/servicenow/case_types.ts b/x-pack/plugins/actions/server/builtin_action_types/servicenow/case_types.ts index 7e659125af7b2..49b85f9254af9 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/servicenow/case_types.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/servicenow/case_types.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/no-explicit-any */ - import { TypeOf } from '@kbn/config-schema'; import { ExecutorSubActionGetIncidentParamsSchema, diff --git a/x-pack/plugins/alerts/server/alert_type_registry.test.ts b/x-pack/plugins/alerts/server/alert_type_registry.test.ts index 229847bda1836..60adde80e883f 100644 --- a/x-pack/plugins/alerts/server/alert_type_registry.test.ts +++ b/x-pack/plugins/alerts/server/alert_type_registry.test.ts @@ -57,7 +57,6 @@ describe('register()', () => { executor: jest.fn(), producer: 'alerts', }; - // eslint-disable-next-line @typescript-eslint/no-var-requires const registry = new AlertTypeRegistry(alertTypeRegistryParams); const invalidCharacters = [' ', ':', '*', '*', '/']; @@ -89,7 +88,6 @@ describe('register()', () => { executor: jest.fn(), producer: 'alerts', }; - // eslint-disable-next-line @typescript-eslint/no-var-requires const registry = new AlertTypeRegistry(alertTypeRegistryParams); expect(() => registry.register(alertType)).toThrowError( @@ -111,7 +109,6 @@ describe('register()', () => { executor: jest.fn(), producer: 'alerts', }; - // eslint-disable-next-line @typescript-eslint/no-var-requires const registry = new AlertTypeRegistry(alertTypeRegistryParams); registry.register(alertType); expect(taskManager.registerTaskDefinitions).toHaveBeenCalledTimes(1); diff --git a/x-pack/plugins/alerts/server/alerts_client.ts b/x-pack/plugins/alerts/server/alerts_client.ts index eec60f924bf38..256cae24e519f 100644 --- a/x-pack/plugins/alerts/server/alerts_client.ts +++ b/x-pack/plugins/alerts/server/alerts_client.ts @@ -295,6 +295,7 @@ export class AlertsClient { type: 'alert', }); + // eslint-disable-next-line @typescript-eslint/naming-convention const authorizedData = data.map(({ id, attributes, updated_at, references }) => { ensureAlertTypeIsAuthorized(attributes.alertTypeId, attributes.consumer); return this.getAlertFromRaw( diff --git a/x-pack/plugins/alerts/server/types.ts b/x-pack/plugins/alerts/server/types.ts index 154a9564518e8..71ab35f7f434b 100644 --- a/x-pack/plugins/alerts/server/types.ts +++ b/x-pack/plugins/alerts/server/types.ts @@ -23,7 +23,6 @@ import { export type State = Record; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type Context = Record; -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type AlertParams = Record; export type WithoutQueryAndParams = Pick>; export type GetServicesFunction = (request: KibanaRequest) => Services; diff --git a/x-pack/plugins/apm/e2e/cypress/integration/helpers.ts b/x-pack/plugins/apm/e2e/cypress/integration/helpers.ts index 5791dfe5b9463..1956f1c2d9f0d 100644 --- a/x-pack/plugins/apm/e2e/cypress/integration/helpers.ts +++ b/x-pack/plugins/apm/e2e/cypress/integration/helpers.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable import/no-extraneous-dependencies */ - const BASE_URL = Cypress.config().baseUrl; /** The default time in ms to wait for a Cypress command to complete */ diff --git a/x-pack/plugins/apm/public/components/app/ServiceMap/__stories__/CytoscapeExampleData.stories.tsx b/x-pack/plugins/apm/public/components/app/ServiceMap/__stories__/CytoscapeExampleData.stories.tsx index 44278b2846128..830e3719b11f9 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceMap/__stories__/CytoscapeExampleData.stories.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceMap/__stories__/CytoscapeExampleData.stories.tsx @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable no-console */ import { EuiButton, diff --git a/x-pack/plugins/apm/public/hooks/useFetcher.tsx b/x-pack/plugins/apm/public/hooks/useFetcher.tsx index b2cd217b6cdd2..68b197c46e888 100644 --- a/x-pack/plugins/apm/public/hooks/useFetcher.tsx +++ b/x-pack/plugins/apm/public/hooks/useFetcher.tsx @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable no-console */ - import React, { useContext, useEffect, useState, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { IHttpFetchError } from 'src/core/public'; diff --git a/x-pack/plugins/apm/public/utils/testHelpers.tsx b/x-pack/plugins/apm/public/utils/testHelpers.tsx index e750102de2baa..217e6a30a33b4 100644 --- a/x-pack/plugins/apm/public/utils/testHelpers.tsx +++ b/x-pack/plugins/apm/public/utils/testHelpers.tsx @@ -106,12 +106,14 @@ interface MockSetup { config: APMConfig; uiFiltersES: ESFilter[]; indices: { + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.sourcemapIndices': string; 'apm_oss.errorIndices': string; 'apm_oss.onboardingIndices': string; 'apm_oss.spanIndices': string; 'apm_oss.transactionIndices': string; 'apm_oss.metricsIndices': string; + /* eslint-enable @typescript-eslint/naming-convention */ apmAgentConfigurationIndex: string; apmCustomLinkIndex: string; }; @@ -152,12 +154,14 @@ export async function inspectSearchParams( config: new Proxy({}, { get: () => 'myIndex' }) as APMConfig, uiFiltersES: [{ term: { 'my.custom.ui.filter': 'foo-bar' } }], indices: { + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.sourcemapIndices': 'myIndex', 'apm_oss.errorIndices': 'myIndex', 'apm_oss.onboardingIndices': 'myIndex', 'apm_oss.spanIndices': 'myIndex', 'apm_oss.transactionIndices': 'myIndex', 'apm_oss.metricsIndices': 'myIndex', + /* eslint-enable @typescript-eslint/naming-convention */ apmAgentConfigurationIndex: 'myIndex', apmCustomLinkIndex: 'myIndex', }, diff --git a/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts b/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts index fe226c8ab27d2..aa269bd61d132 100644 --- a/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts +++ b/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts @@ -36,12 +36,14 @@ export const readKibanaConfig = () => { }; return { + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.transactionIndices': 'apm-*', 'apm_oss.metricsIndices': 'apm-*', 'apm_oss.errorIndices': 'apm-*', 'apm_oss.spanIndices': 'apm-*', 'apm_oss.onboardingIndices': 'apm-*', 'apm_oss.sourcemapIndices': 'apm-*', + /* eslint-enable @typescript-eslint/naming-convention */ 'elasticsearch.hosts': 'http://localhost:9200', ...loadedKibanaConfig, ...cliEsCredentials, diff --git a/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts b/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts index 10651d97f3c3d..fd628f77eb519 100644 --- a/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts +++ b/x-pack/plugins/apm/scripts/upload-telemetry-data/index.ts @@ -19,7 +19,6 @@ import { stampLogger } from '../shared/stamp-logger'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { CollectTelemetryParams } from '../../server/lib/apm_telemetry/collect_data_telemetry'; import { downloadTelemetryTemplate } from '../shared/download-telemetry-template'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { mergeApmTelemetryMapping } from '../../common/apm_telemetry'; import { generateSampleDocuments } from './generate-sample-documents'; import { readKibanaConfig } from '../shared/read-kibana-config'; diff --git a/x-pack/plugins/apm/server/index.ts b/x-pack/plugins/apm/server/index.ts index 431210926c948..fa4b8b821f9f8 100644 --- a/x-pack/plugins/apm/server/index.ts +++ b/x-pack/plugins/apm/server/index.ts @@ -41,6 +41,7 @@ export function mergeConfigs( apmConfig: APMXPackConfig ) { return { + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.transactionIndices': apmOssConfig.transactionIndices, 'apm_oss.spanIndices': apmOssConfig.spanIndices, 'apm_oss.errorIndices': apmOssConfig.errorIndices, @@ -48,6 +49,7 @@ export function mergeConfigs( 'apm_oss.sourcemapIndices': apmOssConfig.sourcemapIndices, 'apm_oss.onboardingIndices': apmOssConfig.onboardingIndices, 'apm_oss.indexPattern': apmOssConfig.indexPattern, + /* eslint-enable @typescript-eslint/naming-convention */ 'xpack.apm.serviceMapEnabled': apmConfig.serviceMapEnabled, 'xpack.apm.serviceMapFingerprintBucketSize': apmConfig.serviceMapFingerprintBucketSize, diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts index eafd0f04b9d10..9d06fc2ad9309 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts @@ -10,10 +10,12 @@ import { tasks } from './tasks'; describe('data telemetry collection tasks', () => { const indices = { + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.errorIndices': 'apm-8.0.0-error', 'apm_oss.metricsIndices': 'apm-8.0.0-metric', 'apm_oss.spanIndices': 'apm-8.0.0-span', 'apm_oss.transactionIndices': 'apm-8.0.0-transaction', + /* eslint-enable @typescript-eslint/naming-convention */ } as ApmIndicesConfig; describe('aggregated_transactions', () => { diff --git a/x-pack/plugins/apm/server/lib/errors/distribution/__tests__/get_buckets.test.ts b/x-pack/plugins/apm/server/lib/errors/distribution/__tests__/get_buckets.test.ts index e0df4d7744610..1a83113de35f2 100644 --- a/x-pack/plugins/apm/server/lib/errors/distribution/__tests__/get_buckets.test.ts +++ b/x-pack/plugins/apm/server/lib/errors/distribution/__tests__/get_buckets.test.ts @@ -47,12 +47,14 @@ describe('timeseriesFetcher', () => { }, ], indices: { + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.sourcemapIndices': 'apm-*', 'apm_oss.errorIndices': 'apm-*', 'apm_oss.onboardingIndices': 'apm-*', 'apm_oss.spanIndices': 'apm-*', 'apm_oss.transactionIndices': 'apm-*', 'apm_oss.metricsIndices': 'apm-*', + /* eslint-enable @typescript-eslint/naming-convention */ apmAgentConfigurationIndex: '.apm-agent-configuration', apmCustomLinkIndex: '.apm-custom-link', }, diff --git a/x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts b/x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts index d8dbd8273f476..b7c9b178c7cd4 100644 --- a/x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts +++ b/x-pack/plugins/apm/server/lib/helpers/setup_request.test.ts @@ -12,12 +12,14 @@ import { PROCESSOR_EVENT } from '../../../common/elasticsearch_fieldnames'; jest.mock('../settings/apm_indices/get_apm_indices', () => ({ getApmIndices: async () => ({ + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.sourcemapIndices': 'apm-*', 'apm_oss.errorIndices': 'apm-*', 'apm_oss.onboardingIndices': 'apm-*', 'apm_oss.spanIndices': 'apm-*', 'apm_oss.transactionIndices': 'apm-*', 'apm_oss.metricsIndices': 'apm-*', + /* eslint-enable @typescript-eslint/naming-convention */ apmAgentConfigurationIndex: 'apm-*', }), })); diff --git a/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts b/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts index 430be3b96934b..2f3b2a602048c 100644 --- a/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts +++ b/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts @@ -18,12 +18,14 @@ import { APMRequestHandlerContext } from '../../../routes/typings'; type ISavedObjectsClient = Pick; export interface ApmIndicesConfig { + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.sourcemapIndices': string; 'apm_oss.errorIndices': string; 'apm_oss.onboardingIndices': string; 'apm_oss.spanIndices': string; 'apm_oss.transactionIndices': string; 'apm_oss.metricsIndices': string; + /* eslint-enable @typescript-eslint/naming-convention */ apmAgentConfigurationIndex: string; apmCustomLinkIndex: string; } @@ -46,12 +48,14 @@ async function getApmIndicesSavedObject( export function getApmIndicesConfig(config: APMConfig): ApmIndicesConfig { return { + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.sourcemapIndices': config['apm_oss.sourcemapIndices'], 'apm_oss.errorIndices': config['apm_oss.errorIndices'], 'apm_oss.onboardingIndices': config['apm_oss.onboardingIndices'], 'apm_oss.spanIndices': config['apm_oss.spanIndices'], 'apm_oss.transactionIndices': config['apm_oss.transactionIndices'], 'apm_oss.metricsIndices': config['apm_oss.metricsIndices'], + /* eslint-enable @typescript-eslint/naming-convention */ // system indices, not configurable apmAgentConfigurationIndex: '.apm-agent-configuration', apmCustomLinkIndex: '.apm-custom-link', diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/get_error_rate.ts b/x-pack/plugins/apm/server/lib/transaction_groups/get_error_rate.ts index 8fb2ceb30db85..d4e0bd1d54da1 100644 --- a/x-pack/plugins/apm/server/lib/transaction_groups/get_error_rate.ts +++ b/x-pack/plugins/apm/server/lib/transaction_groups/get_error_rate.ts @@ -74,10 +74,14 @@ export async function getErrorRate({ const erroneousTransactionsRate = resp.aggregations?.total_transactions.buckets.map( - ({ key, doc_count: totalTransactions, erroneous_transactions }) => { + ({ + key, + doc_count: totalTransactions, + erroneous_transactions: erroneousTransactions, + }) => { const errornousTransactionsCount = - // @ts-ignore - erroneous_transactions.doc_count; + // @ts-expect-error + erroneousTransactions.doc_count; return { x: key, y: errornousTransactionsCount / totalTransactions, diff --git a/x-pack/plugins/apm/server/lib/transactions/avg_duration_by_country/index.ts b/x-pack/plugins/apm/server/lib/transactions/avg_duration_by_country/index.ts index 9bb42d2fa7aad..3954d99cd52a8 100644 --- a/x-pack/plugins/apm/server/lib/transactions/avg_duration_by_country/index.ts +++ b/x-pack/plugins/apm/server/lib/transactions/avg_duration_by_country/index.ts @@ -75,6 +75,7 @@ export async function getTransactionAvgDurationByCountry({ const buckets = resp.aggregations.country_code.buckets; const avgDurationsByCountry = buckets.map( + // eslint-disable-next-line @typescript-eslint/naming-convention ({ key, doc_count, avg_duration: { value } }) => ({ key: key as string, docCount: doc_count, diff --git a/x-pack/plugins/apm/server/lib/transactions/breakdown/index.test.ts b/x-pack/plugins/apm/server/lib/transactions/breakdown/index.test.ts index 3c1618ed7715f..731f75226cbe4 100644 --- a/x-pack/plugins/apm/server/lib/transactions/breakdown/index.test.ts +++ b/x-pack/plugins/apm/server/lib/transactions/breakdown/index.test.ts @@ -11,12 +11,14 @@ import dataResponse from './mock_responses/data.json'; import { APMConfig } from '../../..'; const mockIndices = { + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.sourcemapIndices': 'myIndex', 'apm_oss.errorIndices': 'myIndex', 'apm_oss.onboardingIndices': 'myIndex', 'apm_oss.spanIndices': 'myIndex', 'apm_oss.transactionIndices': 'myIndex', 'apm_oss.metricsIndices': 'myIndex', + /* eslint-enable @typescript-eslint/naming-convention */ apmAgentConfigurationIndex: 'myIndex', apmCustomLinkIndex: 'myIndex', }; diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.test.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.test.ts index 09e1287f032f5..a7a740a239ea7 100644 --- a/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.test.ts +++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.test.ts @@ -35,12 +35,14 @@ describe('timeseriesFetcher', () => { }, ], indices: { + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.sourcemapIndices': 'myIndex', 'apm_oss.errorIndices': 'myIndex', 'apm_oss.onboardingIndices': 'myIndex', 'apm_oss.spanIndices': 'myIndex', 'apm_oss.transactionIndices': 'myIndex', 'apm_oss.metricsIndices': 'myIndex', + /* eslint-enable @typescript-eslint/naming-convention */ apmAgentConfigurationIndex: 'myIndex', apmCustomLinkIndex: 'myIndex', }, diff --git a/x-pack/plugins/apm/server/routes/settings/apm_indices.ts b/x-pack/plugins/apm/server/routes/settings/apm_indices.ts index e52ce760e026a..1946bd1111d4b 100644 --- a/x-pack/plugins/apm/server/routes/settings/apm_indices.ts +++ b/x-pack/plugins/apm/server/routes/settings/apm_indices.ts @@ -42,12 +42,14 @@ export const saveApmIndicesRoute = createRoute(() => ({ }, params: { body: t.partial({ + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.sourcemapIndices': t.string, 'apm_oss.errorIndices': t.string, 'apm_oss.onboardingIndices': t.string, 'apm_oss.spanIndices': t.string, 'apm_oss.transactionIndices': t.string, 'apm_oss.metricsIndices': t.string, + /* eslint-enable @typescript-eslint/naming-convention */ }), }, handler: async ({ context }) => { diff --git a/x-pack/plugins/apm/server/saved_objects/apm_indices.ts b/x-pack/plugins/apm/server/saved_objects/apm_indices.ts index b1473219ea45f..1137abdb474ac 100644 --- a/x-pack/plugins/apm/server/saved_objects/apm_indices.ts +++ b/x-pack/plugins/apm/server/saved_objects/apm_indices.ts @@ -11,6 +11,7 @@ export const apmIndices: SavedObjectsType = { namespaceType: 'agnostic', mappings: { properties: { + /* eslint-disable @typescript-eslint/naming-convention */ 'apm_oss.sourcemapIndices': { type: 'keyword', }, diff --git a/x-pack/plugins/beats_management/public/components/tag/tag_edit.tsx b/x-pack/plugins/beats_management/public/components/tag/tag_edit.tsx index 5ea4b643fb5a2..9fca9d3add5e7 100644 --- a/x-pack/plugins/beats_management/public/components/tag/tag_edit.tsx +++ b/x-pack/plugins/beats_management/public/components/tag/tag_edit.tsx @@ -67,6 +67,7 @@ export class TagEdit extends React.PureComponent { } public render() { + // eslint-disable-next-line @typescript-eslint/naming-convention const { tag, attachedBeats, configuration_blocks } = this.props; return ( @@ -151,9 +152,7 @@ export class TagEdit extends React.PureComponent {
    { if (action === 'delete') { this.props.onConfigRemoved(block); diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_map.ts b/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_map.ts index 2a3741e15f467..ec640cfb5b299 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_map.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/external/saved_map.ts @@ -13,7 +13,6 @@ import { EmbeddableExpression, } from '../../expression_types'; import { getFunctionHelp } from '../../../i18n'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { MapEmbeddableInput } from '../../../../../plugins/maps/public/embeddable'; interface Arguments { diff --git a/x-pack/plugins/canvas/public/application.tsx b/x-pack/plugins/canvas/public/application.tsx index 0bbf449ce11f9..90173a20500e5 100644 --- a/x-pack/plugins/canvas/public/application.tsx +++ b/x-pack/plugins/canvas/public/application.tsx @@ -26,7 +26,6 @@ import { getDocumentationLinks } from './lib/documentation_links'; import { HelpMenu } from './components/help_menu/help_menu'; import { createStore } from './store'; -/* eslint-enable */ import { init as initStatsReporter } from './lib/ui_metric'; import { CapabilitiesStrings } from '../i18n'; diff --git a/x-pack/plugins/canvas/public/components/confirm_modal/confirm_modal.tsx b/x-pack/plugins/canvas/public/components/confirm_modal/confirm_modal.tsx index 1be587c31528f..31a75acbba4ec 100644 --- a/x-pack/plugins/canvas/public/components/confirm_modal/confirm_modal.tsx +++ b/x-pack/plugins/canvas/public/components/confirm_modal/confirm_modal.tsx @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable react/forbid-elements */ import { EuiConfirmModal, EuiOverlayMask } from '@elastic/eui'; import PropTypes from 'prop-types'; import React, { FunctionComponent } from 'react'; diff --git a/x-pack/plugins/canvas/public/components/custom_element_modal/custom_element_modal.tsx b/x-pack/plugins/canvas/public/components/custom_element_modal/custom_element_modal.tsx index ceb7c83f3cab5..e2bc81b39749f 100644 --- a/x-pack/plugins/canvas/public/components/custom_element_modal/custom_element_modal.tsx +++ b/x-pack/plugins/canvas/public/components/custom_element_modal/custom_element_modal.tsx @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable react/forbid-elements */ import React, { PureComponent } from 'react'; import { get } from 'lodash'; import PropTypes from 'prop-types'; diff --git a/x-pack/plugins/canvas/public/lib/aeroelastic/index.d.ts b/x-pack/plugins/canvas/public/lib/aeroelastic/index.d.ts index 3163e318b25dd..c21aac3fbfb25 100644 --- a/x-pack/plugins/canvas/public/lib/aeroelastic/index.d.ts +++ b/x-pack/plugins/canvas/public/lib/aeroelastic/index.d.ts @@ -7,15 +7,15 @@ /* eslint-disable @typescript-eslint/no-empty-interface */ // linear algebra -type f64 = number; // eventual AssemblyScript compatibility; doesn't hurt with vanilla TS either -type f = f64; // shorthand +type F64 = number; // eventual AssemblyScript compatibility; doesn't hurt with vanilla TS either +type F = F64; // shorthand -export type Vector2d = Readonly<[f, f, f]>; -export type Vector3d = Readonly<[f, f, f, f]>; +export type Vector2d = Readonly<[F, F, F]>; +export type Vector3d = Readonly<[F, F, F, F]>; -export type Matrix2d = [f, f, f, f, f, f, f, f, f]; +export type Matrix2d = [F, F, F, F, F, F, F, F, F]; export type TransformMatrix2d = Readonly; -export type Matrix3d = [f, f, f, f, f, f, f, f, f, f, f, f, f, f, f, f]; +export type Matrix3d = [F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F]; export type TransformMatrix3d = Readonly; // plain, JSON-bijective value diff --git a/x-pack/plugins/canvas/public/lib/elastic_logo.ts b/x-pack/plugins/canvas/public/lib/elastic_logo.ts index e73b8615045ae..5f0408ab01e29 100644 --- a/x-pack/plugins/canvas/public/lib/elastic_logo.ts +++ b/x-pack/plugins/canvas/public/lib/elastic_logo.ts @@ -4,6 +4,5 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable */ export const elasticLogo = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmlld0JveD0iMCAwIDI3MC42MDAwMSAyNjkuNTQ2NjYiCiAgIGhlaWdodD0iMjY5LjU0NjY2IgogICB3aWR0aD0iMjcwLjYwMDAxIgogICB4bWw6c3BhY2U9InByZXNlcnZlIgogICBpZD0ic3ZnMiIKICAgdmVyc2lvbj0iMS4xIj48bWV0YWRhdGEKICAgICBpZD0ibWV0YWRhdGE4Ij48cmRmOlJERj48Y2M6V29yawogICAgICAgICByZGY6YWJvdXQ9IiI+PGRjOmZvcm1hdD5pbWFnZS9zdmcreG1sPC9kYzpmb3JtYXQ+PGRjOnR5cGUKICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9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w1Ny4xNjggLTE0LjUzLDgzLjQxOCBsIC0zMDQuMDgsNzEuMTYgLTY2LjE4LC0zNDQuODA5IiAvPjxwYXRoCiAgICAgICAgIGlkPSJwYXRoMjYiCiAgICAgICAgIHN0eWxlPSJmaWxsOiMzMTc3YTc7ZmlsbC1vcGFjaXR5OjE7ZmlsbC1ydWxlOm5vbnplcm87c3Ryb2tlOm5vbmUiCiAgICAgICAgIGQ9Im0gMTM4NS42Nyw3MjIuOTMgMzM0Ljc2LC03OC4zMDEgYyAxMzYuMDIsNDQuOTYxIDIzMC41NiwxNzUuMzUxIDIzMC41NiwzMTguNzYyIDAsMTM5LjMzOSAtODYuNTQsMjYzLjg1OSAtMjE2LjM4LDMxMy4wMzkgbCAtNDM3Ljg0LC0zODMuNTkgODguOSwtMTY5LjkxIiAvPjwvZz48L2c+PC9zdmc+'; diff --git a/x-pack/plugins/canvas/public/state/selectors/workpad.ts b/x-pack/plugins/canvas/public/state/selectors/workpad.ts index b05615b7930c5..6eddca42e21c6 100644 --- a/x-pack/plugins/canvas/public/state/selectors/workpad.ts +++ b/x-pack/plugins/canvas/public/state/selectors/workpad.ts @@ -214,13 +214,13 @@ export function getGlobalFilters(state: State): string[] { }, []); } -type onValueFunction = ( +type OnValueFunction = ( argValue: ExpressionAstArgument, argNames?: string, args?: ExpressionAstFunction['arguments'] ) => ExpressionAstArgument | ExpressionAstArgument[] | undefined; -function buildGroupValues(args: ExpressionAstFunction['arguments'], onValue: onValueFunction) { +function buildGroupValues(args: ExpressionAstFunction['arguments'], onValue: OnValueFunction) { const argNames = Object.keys(args); return argNames.reduce((values, argName) => { @@ -495,7 +495,6 @@ export function getRenderedWorkpad(state: State) { const workpad = getWorkpad(state); - // eslint-disable-next-line no-unused-vars const { pages, variables, ...rest } = workpad; return { diff --git a/x-pack/plugins/canvas/server/routes/shareables/zip.test.ts b/x-pack/plugins/canvas/server/routes/shareables/zip.test.ts index 29dcb4268e618..0c19886f07e5c 100644 --- a/x-pack/plugins/canvas/server/routes/shareables/zip.test.ts +++ b/x-pack/plugins/canvas/server/routes/shareables/zip.test.ts @@ -6,6 +6,7 @@ jest.mock('archiver'); +// eslint-disable-next-line @typescript-eslint/no-var-requires const archiver = require('archiver') as jest.Mock; import { kibanaResponseFactory, RequestHandlerContext, RequestHandler } from 'src/core/server'; import { httpServiceMock, httpServerMock, loggingSystemMock } from 'src/core/server/mocks'; diff --git a/x-pack/plugins/canvas/shareable_runtime/components/canvas.tsx b/x-pack/plugins/canvas/shareable_runtime/components/canvas.tsx index b1eb9af6fc4a1..e327f90e80aeb 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/canvas.tsx +++ b/x-pack/plugins/canvas/shareable_runtime/components/canvas.tsx @@ -15,7 +15,9 @@ import { CanvasRenderedWorkpad, Stage, Settings, Refs } from '../types'; let timeout: number = 0; +// eslint-disable-next-line @typescript-eslint/naming-convention export type onSetPageFn = (page: number) => void; +// eslint-disable-next-line @typescript-eslint/naming-convention export type onSetScrubberVisibleFn = (visible: boolean) => void; type Workpad = Pick; diff --git a/x-pack/plugins/canvas/shareable_runtime/components/footer/page_controls.tsx b/x-pack/plugins/canvas/shareable_runtime/components/footer/page_controls.tsx index 836d10f9ee8f5..9f94ef4f24187 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/footer/page_controls.tsx +++ b/x-pack/plugins/canvas/shareable_runtime/components/footer/page_controls.tsx @@ -14,19 +14,19 @@ import { setAutoplayAction, } from '../../context'; -type onSetPageNumberFn = (page: number) => void; -type onToggleScrubberFn = () => void; +type OnSetPageNumberFn = (page: number) => void; +type OnToggleScrubberFn = () => void; interface Props { /** * The handler to invoke when the current page number is set. */ - onSetPageNumber: onSetPageNumberFn; + onSetPageNumber: OnSetPageNumberFn; /** * The handler to invoke when the scrubber visibility is toggled. */ - onToggleScrubber: onToggleScrubberFn; + onToggleScrubber: OnToggleScrubberFn; /** * The current page number. diff --git a/x-pack/plugins/canvas/shareable_runtime/components/footer/page_preview.tsx b/x-pack/plugins/canvas/shareable_runtime/components/footer/page_preview.tsx index 7908b3edb981f..8c06a0a342c24 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/footer/page_preview.tsx +++ b/x-pack/plugins/canvas/shareable_runtime/components/footer/page_preview.tsx @@ -12,7 +12,7 @@ import { setPageAction } from '../../context/actions'; import css from './page_preview.module.scss'; -type onClickFn = (index: number) => void; +type OnClickFn = (index: number) => void; export interface Props { /** @@ -28,7 +28,7 @@ export interface Props { /** * The handler to invoke if the preview is clicked. */ - onClick: onClickFn; + onClick: OnClickFn; /** * An object describing the page. diff --git a/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/autoplay_settings.tsx b/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/autoplay_settings.tsx index 4c7c65511698d..c20d9f6fc39e2 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/autoplay_settings.tsx +++ b/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/autoplay_settings.tsx @@ -14,7 +14,9 @@ import { import { createTimeInterval } from '../../../../public/lib/time_interval'; import { CustomInterval } from '../../../../public/components/workpad_header/view_menu/custom_interval'; +// eslint-disable-next-line @typescript-eslint/naming-convention export type onSetAutoplayFn = (autoplay: boolean) => void; +// eslint-disable-next-line @typescript-eslint/naming-convention export type onSetIntervalFn = (interval: string) => void; export interface Props { diff --git a/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/toolbar_settings.tsx b/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/toolbar_settings.tsx index 2c90c5c0ceded..8b545061a4185 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/toolbar_settings.tsx +++ b/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/toolbar_settings.tsx @@ -8,7 +8,7 @@ import React, { FC } from 'react'; import { EuiSwitch, EuiFormRow } from '@elastic/eui'; import { useCanvasShareableState, setToolbarAutohideAction } from '../../../context'; -export type onSetAutohideFn = (isAutohide: boolean) => void; +export type OnSetAutohideFn = (isAutohide: boolean) => void; export interface Props { /** @@ -20,7 +20,7 @@ export interface Props { /** * The handler to invoke when autohide is set. */ - onSetAutohide: onSetAutohideFn; + onSetAutohide: OnSetAutohideFn; } /** @@ -52,7 +52,7 @@ export const ToolbarSettings: FC> = ({ onSetAutohid const { toolbar } = settings; const { isAutohide } = toolbar; - const onSetAutohideFn: onSetAutohideFn = (autohide: boolean) => { + const onSetAutohideFn: OnSetAutohideFn = (autohide: boolean) => { onSetAutohide(autohide); dispatch(setToolbarAutohideAction(autohide)); }; diff --git a/x-pack/plugins/canvas/shareable_runtime/test/utils.ts b/x-pack/plugins/canvas/shareable_runtime/test/utils.ts index fe3c1be9ba154..5e65594972da2 100644 --- a/x-pack/plugins/canvas/shareable_runtime/test/utils.ts +++ b/x-pack/plugins/canvas/shareable_runtime/test/utils.ts @@ -15,6 +15,7 @@ export const tick = (ms = 0) => export const takeMountedSnapshot = (mountedComponent: ReactWrapper<{}, {}, Component>) => { const html = mountedComponent.html(); const template = document.createElement('template'); + // eslint-disable-next-line no-unsanitized/property template.innerHTML = html; return template.content.firstChild; }; diff --git a/x-pack/plugins/canvas/storybook/addon/src/register.tsx b/x-pack/plugins/canvas/storybook/addon/src/register.tsx index 3a5c4a6818ac1..4934438789b94 100644 --- a/x-pack/plugins/canvas/storybook/addon/src/register.tsx +++ b/x-pack/plugins/canvas/storybook/addon/src/register.tsx @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable import/no-extraneous-dependencies */ - import React from 'react'; import { addons, types } from '@storybook/addons'; import { AddonPanel } from '@storybook/components'; diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/delete_all_comments.ts b/x-pack/plugins/case/server/routes/api/cases/comments/delete_all_comments.ts index e06b3a33dfc72..0bf8ad89ce470 100644 --- a/x-pack/plugins/case/server/routes/api/cases/comments/delete_all_comments.ts +++ b/x-pack/plugins/case/server/routes/api/cases/comments/delete_all_comments.ts @@ -24,6 +24,7 @@ export function initDeleteAllCommentsApi({ caseService, router, userActionServic async (context, request, response) => { try { const client = context.core.savedObjects.client; + // eslint-disable-next-line @typescript-eslint/naming-convention const { username, full_name, email } = await caseService.getUser({ request, response }); const deleteDate = new Date().toISOString(); diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.ts b/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.ts index df08af025df03..70c0d8c2f84f9 100644 --- a/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.ts +++ b/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.ts @@ -27,6 +27,7 @@ export function initDeleteCommentApi({ caseService, router, userActionService }: async (context, request, response) => { try { const client = context.core.savedObjects.client; + // eslint-disable-next-line @typescript-eslint/naming-convention const { username, full_name, email } = await caseService.getUser({ request, response }); const deleteDate = new Date().toISOString(); diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.ts b/x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.ts index 1aca27bbf1853..85cc63b2f4d17 100644 --- a/x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.ts +++ b/x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.ts @@ -68,6 +68,7 @@ export function initPatchCommentApi({ ); } + // eslint-disable-next-line @typescript-eslint/naming-convention const { username, full_name, email } = await caseService.getUser({ request, response }); const updatedDate = new Date().toISOString(); const [updatedComment, updatedCase, myCaseConfigure] = await Promise.all([ diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/post_comment.ts b/x-pack/plugins/case/server/routes/api/cases/comments/post_comment.ts index 486f709b1e7ed..dd6f06777fe98 100644 --- a/x-pack/plugins/case/server/routes/api/cases/comments/post_comment.ts +++ b/x-pack/plugins/case/server/routes/api/cases/comments/post_comment.ts @@ -48,6 +48,7 @@ export function initPostCommentApi({ caseId, }); + // eslint-disable-next-line @typescript-eslint/naming-convention const { username, full_name, email } = await caseService.getUser({ request, response }); const createdDate = new Date().toISOString(); diff --git a/x-pack/plugins/case/server/routes/api/cases/configure/patch_configure.ts b/x-pack/plugins/case/server/routes/api/cases/configure/patch_configure.ts index 29df97c5f8476..06c99c8018cc0 100644 --- a/x-pack/plugins/case/server/routes/api/cases/configure/patch_configure.ts +++ b/x-pack/plugins/case/server/routes/api/cases/configure/patch_configure.ts @@ -49,6 +49,7 @@ export function initPatchCaseConfigure({ caseConfigureService, caseService, rout ); } + // eslint-disable-next-line @typescript-eslint/naming-convention const { username, full_name, email } = await caseService.getUser({ request, response }); const updateDate = new Date().toISOString(); diff --git a/x-pack/plugins/case/server/routes/api/cases/configure/post_configure.ts b/x-pack/plugins/case/server/routes/api/cases/configure/post_configure.ts index a49a6c9ec5b76..3f02809cbd08f 100644 --- a/x-pack/plugins/case/server/routes/api/cases/configure/post_configure.ts +++ b/x-pack/plugins/case/server/routes/api/cases/configure/post_configure.ts @@ -43,6 +43,7 @@ export function initPostCaseConfigure({ caseConfigureService, caseService, route ) ); } + // eslint-disable-next-line @typescript-eslint/naming-convention const { email, full_name, username } = await caseService.getUser({ request, response }); const creationDate = new Date().toISOString(); diff --git a/x-pack/plugins/case/server/routes/api/cases/delete_cases.ts b/x-pack/plugins/case/server/routes/api/cases/delete_cases.ts index 9f57663c85f6f..db7bd6b9a76c8 100644 --- a/x-pack/plugins/case/server/routes/api/cases/delete_cases.ts +++ b/x-pack/plugins/case/server/routes/api/cases/delete_cases.ts @@ -55,6 +55,7 @@ export function initDeleteCasesApi({ caseService, router, userActionService }: R ) ); } + // eslint-disable-next-line @typescript-eslint/naming-convention const { username, full_name, email } = await caseService.getUser({ request, response }); const deleteDate = new Date().toISOString(); diff --git a/x-pack/plugins/case/server/routes/api/cases/patch_cases.ts b/x-pack/plugins/case/server/routes/api/cases/patch_cases.ts index 0c722cf56ada3..b70177b47ec97 100644 --- a/x-pack/plugins/case/server/routes/api/cases/patch_cases.ts +++ b/x-pack/plugins/case/server/routes/api/cases/patch_cases.ts @@ -87,6 +87,7 @@ export function initPatchCasesApi({ return Object.keys(updateCaseAttributes).length > 0; }); if (updateFilterCases.length > 0) { + // eslint-disable-next-line @typescript-eslint/naming-convention const { username, full_name, email } = await caseService.getUser({ request, response }); const updatedDt = new Date().toISOString(); const updatedCases = await caseService.patchCases({ diff --git a/x-pack/plugins/case/server/routes/api/cases/post_case.ts b/x-pack/plugins/case/server/routes/api/cases/post_case.ts index 05574698edd44..50883667a5047 100644 --- a/x-pack/plugins/case/server/routes/api/cases/post_case.ts +++ b/x-pack/plugins/case/server/routes/api/cases/post_case.ts @@ -38,6 +38,7 @@ export function initPostCaseApi({ fold(throwErrors(Boom.badRequest), identity) ); + // eslint-disable-next-line @typescript-eslint/naming-convention const { username, full_name, email } = await caseService.getUser({ request, response }); const createdDate = new Date().toISOString(); const myCaseConfigure = await caseConfigureService.find({ client }); diff --git a/x-pack/plugins/case/server/routes/api/cases/push_case.ts b/x-pack/plugins/case/server/routes/api/cases/push_case.ts index 3379bbd318d5b..f7990b861f815 100644 --- a/x-pack/plugins/case/server/routes/api/cases/push_case.ts +++ b/x-pack/plugins/case/server/routes/api/cases/push_case.ts @@ -49,6 +49,7 @@ export function initPushCaseUserActionApi({ throw Boom.notFound('Action client have not been found'); } + // eslint-disable-next-line @typescript-eslint/naming-convention const { username, full_name, email } = await caseService.getUser({ request, response }); const pushedDate = new Date().toISOString(); diff --git a/x-pack/plugins/case/server/routes/api/utils.ts b/x-pack/plugins/case/server/routes/api/utils.ts index ec2881807442f..074957ec69bca 100644 --- a/x-pack/plugins/case/server/routes/api/utils.ts +++ b/x-pack/plugins/case/server/routes/api/utils.ts @@ -29,6 +29,7 @@ export const transformNewCase = ({ connectorId, createdDate, email, + // eslint-disable-next-line @typescript-eslint/naming-convention full_name, newCase, username, @@ -63,6 +64,7 @@ export const transformNewComment = ({ comment, createdDate, email, + // eslint-disable-next-line @typescript-eslint/naming-convention full_name, username, }: NewCommentArgs): CommentAttributes => ({ diff --git a/x-pack/plugins/case/server/services/user_actions/helpers.ts b/x-pack/plugins/case/server/services/user_actions/helpers.ts index 228b42b4c638f..5b7d1f4618fed 100644 --- a/x-pack/plugins/case/server/services/user_actions/helpers.ts +++ b/x-pack/plugins/case/server/services/user_actions/helpers.ts @@ -23,6 +23,7 @@ export const transformNewUserAction = ({ action, actionAt, email, + // eslint-disable-next-line @typescript-eslint/naming-convention full_name, newValue = null, oldValue = null, diff --git a/x-pack/plugins/cross_cluster_replication/common/services/auto_follow_pattern_serialization.ts b/x-pack/plugins/cross_cluster_replication/common/services/auto_follow_pattern_serialization.ts index 265af0ede1462..2694f9038d6b2 100644 --- a/x-pack/plugins/cross_cluster_replication/common/services/auto_follow_pattern_serialization.ts +++ b/x-pack/plugins/cross_cluster_replication/common/services/auto_follow_pattern_serialization.ts @@ -11,15 +11,20 @@ export const deserializeAutoFollowPattern = ( ): AutoFollowPattern => { const { name, - pattern: { active, remote_cluster, leader_index_patterns, follow_index_pattern }, + pattern: { + active, + remote_cluster: remoteCluster, + leader_index_patterns: leaderIndexPatterns, + follow_index_pattern: followIndexPattern, + }, } = autoFollowPattern; return { name, active, - remoteCluster: remote_cluster, - leaderIndexPatterns: leader_index_patterns, - followIndexPattern: follow_index_pattern, + remoteCluster, + leaderIndexPatterns, + followIndexPattern, }; }; diff --git a/x-pack/plugins/cross_cluster_replication/common/services/follower_index_serialization.ts b/x-pack/plugins/cross_cluster_replication/common/services/follower_index_serialization.ts index df476a0b2db89..72aeaad3c2910 100644 --- a/x-pack/plugins/cross_cluster_replication/common/services/follower_index_serialization.ts +++ b/x-pack/plugins/cross_cluster_replication/common/services/follower_index_serialization.ts @@ -13,7 +13,7 @@ import { FollowerIndexAdvancedSettings, FollowerIndexAdvancedSettingsToEs, } from '../types'; - +/* eslint-disable @typescript-eslint/naming-convention */ export const deserializeShard = ({ remote_cluster, leader_index, @@ -106,7 +106,7 @@ export const deserializeFollowerIndex = ({ readPollTimeout: read_poll_timeout, shards: shards && shards.map(deserializeShard), }); - +/* eslint-enable @typescript-eslint/naming-convention */ export const deserializeListFollowerIndices = ( followerIndices: FollowerIndexFromEs[] ): FollowerIndex[] => followerIndices.map(deserializeFollowerIndex); diff --git a/x-pack/plugins/cross_cluster_replication/public/app/index.tsx b/x-pack/plugins/cross_cluster_replication/public/app/index.tsx index 8be3eb5c8b32a..3efe7ec842c73 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/index.tsx +++ b/x-pack/plugins/cross_cluster_replication/public/app/index.tsx @@ -36,8 +36,8 @@ export async function mountApp({ element, setBreadcrumbs, I18nContext, - ELASTIC_WEBSITE_URL, - DOC_LINK_VERSION, + ELASTIC_WEBSITE_URL, // eslint-disable-line @typescript-eslint/naming-convention + DOC_LINK_VERSION, // eslint-disable-line @typescript-eslint/naming-convention history, getUrlForApp, }: { diff --git a/x-pack/plugins/cross_cluster_replication/server/lib/ccr_stats_serialization.ts b/x-pack/plugins/cross_cluster_replication/server/lib/ccr_stats_serialization.ts index 7e2b088919842..d6c3baa899d28 100644 --- a/x-pack/plugins/cross_cluster_replication/server/lib/ccr_stats_serialization.ts +++ b/x-pack/plugins/cross_cluster_replication/server/lib/ccr_stats_serialization.ts @@ -12,7 +12,7 @@ import { AutoFollowStats, AutoFollowStatsFromEs, } from '../../common/types'; - +/* eslint-disable @typescript-eslint/naming-convention */ export const deserializeRecentAutoFollowErrors = ({ timestamp, leader_index, diff --git a/x-pack/plugins/cross_cluster_replication/server/lib/format_es_error.ts b/x-pack/plugins/cross_cluster_replication/server/lib/format_es_error.ts index 9dde027cd6949..0f00bfb0c1e7c 100644 --- a/x-pack/plugins/cross_cluster_replication/server/lib/format_es_error.ts +++ b/x-pack/plugins/cross_cluster_replication/server/lib/format_es_error.ts @@ -8,13 +8,12 @@ function extractCausedByChain( causedBy: Record = {}, accumulator: string[] = [] ): string[] { - const { reason, caused_by } = causedBy; // eslint-disable-line @typescript-eslint/camelcase + const { reason, caused_by } = causedBy; // eslint-disable-line @typescript-eslint/naming-convention if (reason) { accumulator.push(reason); } - // eslint-disable-next-line @typescript-eslint/camelcase if (caused_by) { return extractCausedByChain(caused_by, accumulator); } @@ -36,8 +35,8 @@ export function wrapEsError( const { error: { - root_cause = [], // eslint-disable-line @typescript-eslint/camelcase - caused_by = undefined, // eslint-disable-line @typescript-eslint/camelcase + root_cause = [], // eslint-disable-line @typescript-eslint/naming-convention + caused_by = undefined, // eslint-disable-line @typescript-eslint/naming-convention } = {}, } = JSON.parse(response); diff --git a/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts b/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts index d2a8384b1f882..0ed5485cfb6c9 100644 --- a/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts +++ b/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts @@ -119,6 +119,7 @@ async function asyncSearch( ...queryParams, }); + // eslint-disable-next-line @typescript-eslint/naming-convention const { id, response, is_partial, is_running } = (await caller( 'transport.request', { method, path, body, query }, diff --git a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts index cf35a458b4825..ee96f8099cf7c 100644 --- a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts +++ b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts @@ -5,6 +5,7 @@ */ jest.mock('node-fetch'); +// eslint-disable-next-line @typescript-eslint/no-var-requires const fetchMock = require('node-fetch') as jest.Mock; const { Response } = jest.requireActual('node-fetch'); diff --git a/x-pack/plugins/enterprise_search/server/routes/__mocks__/router.mock.ts b/x-pack/plugins/enterprise_search/server/routes/__mocks__/router.mock.ts index 1ca7755979f99..e3471d7268cb1 100644 --- a/x-pack/plugins/enterprise_search/server/routes/__mocks__/router.mock.ts +++ b/x-pack/plugins/enterprise_search/server/routes/__mocks__/router.mock.ts @@ -16,12 +16,12 @@ import { * Test helper that mocks Kibana's router and DRYs out various helper (callRoute, schema validation) */ -type methodType = 'get' | 'post' | 'put' | 'patch' | 'delete'; -type payloadType = 'params' | 'query' | 'body'; +type MethodType = 'get' | 'post' | 'put' | 'patch' | 'delete'; +type PayloadType = 'params' | 'query' | 'body'; interface IMockRouterProps { - method: methodType; - payload?: payloadType; + method: MethodType; + payload?: PayloadType; } interface IMockRouterRequest { body?: object; @@ -32,8 +32,8 @@ type TMockRouterRequest = KibanaRequest | IMockRouterRequest; export class MockRouter { public router!: jest.Mocked; - public method: methodType; - public payload?: payloadType; + public method: MethodType; + public payload?: PayloadType; public response = httpServerMock.createResponseFactory(); constructor({ method, payload }: IMockRouterProps) { diff --git a/x-pack/plugins/enterprise_search/server/routes/app_search/engines.test.ts b/x-pack/plugins/enterprise_search/server/routes/app_search/engines.test.ts index d5b1bc5003456..968ecb95fd931 100644 --- a/x-pack/plugins/enterprise_search/server/routes/app_search/engines.test.ts +++ b/x-pack/plugins/enterprise_search/server/routes/app_search/engines.test.ts @@ -11,6 +11,7 @@ import { registerEnginesRoute } from './engines'; jest.mock('node-fetch'); const fetch = jest.requireActual('node-fetch'); const { Response } = fetch; +// eslint-disable-next-line @typescript-eslint/no-var-requires const fetchMock = require('node-fetch') as jest.Mocked; describe('engine routes', () => { diff --git a/x-pack/plugins/enterprise_search/server/routes/workplace_search/overview.test.ts b/x-pack/plugins/enterprise_search/server/routes/workplace_search/overview.test.ts index b1b5539795357..3a4e28b0de5ff 100644 --- a/x-pack/plugins/enterprise_search/server/routes/workplace_search/overview.test.ts +++ b/x-pack/plugins/enterprise_search/server/routes/workplace_search/overview.test.ts @@ -11,6 +11,7 @@ import { registerWSOverviewRoute } from './overview'; jest.mock('node-fetch'); const fetch = jest.requireActual('node-fetch'); const { Response } = fetch; +// eslint-disable-next-line @typescript-eslint/no-var-requires const fetchMock = require('node-fetch') as jest.Mocked; const ORG_ROUTE = 'http://localhost:3002/ws/org'; diff --git a/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts b/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts index f86e5d9ca0e32..8c3e6e11b75c5 100644 --- a/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts +++ b/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts @@ -133,6 +133,7 @@ export class ClusterClientAdapter { namespace: string | undefined, type: string, id: string, + // eslint-disable-next-line @typescript-eslint/naming-convention { page, per_page: perPage, start, end, sort_field, sort_order }: FindOptionsType ): Promise { const defaultNamespaceQuery = { diff --git a/x-pack/plugins/global_search/server/routes/integration_tests/find.test.ts b/x-pack/plugins/global_search/server/routes/integration_tests/find.test.ts index 878e4ac896b96..01bd68ca38b12 100644 --- a/x-pack/plugins/global_search/server/routes/integration_tests/find.test.ts +++ b/x-pack/plugins/global_search/server/routes/integration_tests/find.test.ts @@ -13,7 +13,7 @@ import { GlobalSearchFindError } from '../../../common/errors'; import { globalSearchPluginMock } from '../../mocks'; import { registerInternalFindRoute } from '../find'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; const pluginId = Symbol('globalSearch'); const createResult = (id: string): GlobalSearchResult => ({ @@ -31,8 +31,8 @@ const createBatch = (...ids: string[]): GlobalSearchBatchedResults => ({ const expectedResults = (...ids: string[]) => ids.map((id) => expect.objectContaining({ id })); describe('POST /internal/global_search/find', () => { - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; let globalSearchHandlerContext: ReturnType; beforeEach(async () => { diff --git a/x-pack/plugins/graph/public/application.ts b/x-pack/plugins/graph/public/application.ts index 0969b80bc38b0..b249fe2be32c7 100644 --- a/x-pack/plugins/graph/public/application.ts +++ b/x-pack/plugins/graph/public/application.ts @@ -115,7 +115,7 @@ const thirdPartyAngularDependencies = ['ngSanitize', 'ngRoute', 'react', 'ui.boo function mountGraphApp(appBasePath: string, element: HTMLElement) { const mountpoint = document.createElement('div'); mountpoint.setAttribute('class', 'gphAppWrapper'); - // eslint-disable-next-line + // eslint-disable-next-line no-unsanitized/property mountpoint.innerHTML = mainTemplate(appBasePath); // bootstrap angular into detached element and attach it later to // make angular-within-angular possible diff --git a/x-pack/plugins/graph/public/components/field_manager/field_editor.tsx b/x-pack/plugins/graph/public/components/field_manager/field_editor.tsx index cd2227bf6a18c..f4006d6bf142b 100644 --- a/x-pack/plugins/graph/public/components/field_manager/field_editor.tsx +++ b/x-pack/plugins/graph/public/components/field_manager/field_editor.tsx @@ -125,6 +125,7 @@ export function FieldEditor({ color={initialField.color} iconSide="right" className={classNames('gphFieldEditor__badge', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'gphFieldEditor__badge--disabled': isDisabled, })} onClickAriaLabel={badgeDescription} diff --git a/x-pack/plugins/graph/public/components/field_manager/field_picker.tsx b/x-pack/plugins/graph/public/components/field_manager/field_picker.tsx index ae32e8d2ce6d6..d59bbe92af98d 100644 --- a/x-pack/plugins/graph/public/components/field_manager/field_picker.tsx +++ b/x-pack/plugins/graph/public/components/field_manager/field_picker.tsx @@ -55,6 +55,7 @@ export function FieldPicker({ } className={classNames('gphUrlTemplateList__accordion', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'gphUrlTemplateList__accordion--isOpen': open, })} buttonClassName="gphUrlTemplateList__accordionbutton" diff --git a/x-pack/plugins/grokdebugger/server/lib/kibana_framework.ts b/x-pack/plugins/grokdebugger/server/lib/kibana_framework.ts index 015a2e250bb0e..ee7fa74022fd5 100644 --- a/x-pack/plugins/grokdebugger/server/lib/kibana_framework.ts +++ b/x-pack/plugins/grokdebugger/server/lib/kibana_framework.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/array-type */ - import { i18n } from '@kbn/i18n'; import { @@ -19,9 +17,9 @@ import { import { ILicense } from '../../../licensing/server'; -type GrokDebuggerRouteConfig = { +type GrokDebuggerRouteConfig = { method: RouteMethod; -} & RouteConfig; +} & RouteConfig; export class KibanaFramework { public router: IRouter; @@ -44,12 +42,12 @@ export class KibanaFramework { return this.license.isActive; } - public registerRoute( - config: GrokDebuggerRouteConfig, - handler: RequestHandler + public registerRoute( + config: GrokDebuggerRouteConfig, + handler: RequestHandler ) { // Automatically wrap all route registrations with license checking - const wrappedHandler: RequestHandler = async ( + const wrappedHandler: RequestHandler = async ( requestContext, request, response diff --git a/x-pack/plugins/index_lifecycle_management/server/routes/api/templates/register_fetch_route.ts b/x-pack/plugins/index_lifecycle_management/server/routes/api/templates/register_fetch_route.ts index 942eec347341f..c8d02783864e1 100644 --- a/x-pack/plugins/index_lifecycle_management/server/routes/api/templates/register_fetch_route.ts +++ b/x-pack/plugins/index_lifecycle_management/server/routes/api/templates/register_fetch_route.ts @@ -31,7 +31,8 @@ function filterAndFormatTemplates(templates: any): any { const formattedTemplates = []; const templateNames = Object.keys(templates); for (const templateName of templateNames) { - const { settings, index_patterns } = templates[templateName]; // eslint-disable-line camelcase + // eslint-disable-next-line @typescript-eslint/naming-convention + const { settings, index_patterns } = templates[templateName]; if (isReservedSystemTemplate(templateName, index_patterns)) { continue; } diff --git a/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx index e40cdc026210d..910d9be842da8 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import React from 'react'; import axios from 'axios'; import axiosXhrAdapter from 'axios/lib/adapters/xhr'; diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.helpers.ts index 9397ce21ba827..db7541c93f9ac 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.helpers.ts @@ -14,8 +14,8 @@ import { findTestSubject, } from '../../../../../test_utils'; import { DataStream } from '../../../common'; -import { IndexManagementHome } from '../../../public/application/sections/home'; // eslint-disable-line @kbn/eslint/no-restricted-paths -import { indexManagementStore } from '../../../public/application/store'; // eslint-disable-line @kbn/eslint/no-restricted-paths +import { IndexManagementHome } from '../../../public/application/sections/home'; +import { indexManagementStore } from '../../../public/application/store'; import { WithAppDependencies, services, TestSubjects } from '../helpers'; export interface DataStreamsTabTestBed extends TestBed { diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/home.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/home.helpers.ts index c58109364890a..27920ad8cdbdb 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/home.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/home.helpers.ts @@ -5,8 +5,8 @@ */ import { registerTestBed, TestBed, TestBedConfig } from '../../../../../test_utils'; -import { IndexManagementHome } from '../../../public/application/sections/home'; // eslint-disable-line @kbn/eslint/no-restricted-paths -import { indexManagementStore } from '../../../public/application/store'; // eslint-disable-line @kbn/eslint/no-restricted-paths +import { IndexManagementHome } from '../../../public/application/sections/home'; +import { indexManagementStore } from '../../../public/application/store'; import { WithAppDependencies, services, TestSubjects } from '../helpers'; const testBedConfig: TestBedConfig = { diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.helpers.ts index 23b40f4cbd3d7..fe938bb087d2e 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.helpers.ts @@ -12,7 +12,7 @@ import { TestBedConfig, findTestSubject, } from '../../../../../test_utils'; -import { TemplateList } from '../../../public/application/sections/home/template_list'; // eslint-disable-line @kbn/eslint/no-restricted-paths +import { TemplateList } from '../../../public/application/sections/home/template_list'; import { TemplateDeserialized } from '../../../common'; import { WithAppDependencies, TestSubjects } from '../helpers'; diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.helpers.ts index 11ea29fd9b78c..b660adb9eec08 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/indices_tab.helpers.ts @@ -13,8 +13,8 @@ import { TestBedConfig, findTestSubject, } from '../../../../../test_utils'; -import { IndexManagementHome } from '../../../public/application/sections/home'; // eslint-disable-line @kbn/eslint/no-restricted-paths -import { indexManagementStore } from '../../../public/application/store'; // eslint-disable-line @kbn/eslint/no-restricted-paths +import { IndexManagementHome } from '../../../public/application/sections/home'; +import { indexManagementStore } from '../../../public/application/store'; import { WithAppDependencies, services, TestSubjects } from '../helpers'; const testBedConfig: TestBedConfig = { diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.helpers.ts index 1a58cfa8fb55e..62adb8c433366 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.helpers.ts @@ -5,7 +5,7 @@ */ import { registerTestBed, TestBedConfig } from '../../../../../test_utils'; -import { TemplateClone } from '../../../public/application/sections/template_clone'; // eslint-disable-line @kbn/eslint/no-restricted-paths +import { TemplateClone } from '../../../public/application/sections/template_clone'; import { WithAppDependencies } from '../helpers'; import { formSetup } from './template_form.helpers'; diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.helpers.ts index ab0a7b8567607..9ad8d61e637e5 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.helpers.ts @@ -5,7 +5,7 @@ */ import { registerTestBed, TestBedConfig } from '../../../../../test_utils'; -import { TemplateCreate } from '../../../public/application/sections/template_create'; // eslint-disable-line @kbn/eslint/no-restricted-paths +import { TemplateCreate } from '../../../public/application/sections/template_create'; import { WithAppDependencies } from '../helpers'; import { formSetup, TestSubjects } from './template_form.helpers'; diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.helpers.ts index 29ecd84e585ce..c3a139f89cb5f 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.helpers.ts @@ -5,7 +5,7 @@ */ import { registerTestBed, TestBedConfig } from '../../../../../test_utils'; -import { TemplateEdit } from '../../../public/application/sections/template_edit'; // eslint-disable-line @kbn/eslint/no-restricted-paths +import { TemplateEdit } from '../../../public/application/sections/template_edit'; import { WithAppDependencies } from '../helpers'; import { formSetup, TestSubjects } from './template_form.helpers'; diff --git a/x-pack/plugins/index_management/common/lib/data_stream_serialization.ts b/x-pack/plugins/index_management/common/lib/data_stream_serialization.ts index 51528ed9856ce..7832662aea494 100644 --- a/x-pack/plugins/index_management/common/lib/data_stream_serialization.ts +++ b/x-pack/plugins/index_management/common/lib/data_stream_serialization.ts @@ -7,12 +7,13 @@ import { DataStream, DataStreamFromEs } from '../types'; export function deserializeDataStream(dataStreamFromEs: DataStreamFromEs): DataStream { - const { name, timestamp_field, indices, generation } = dataStreamFromEs; + const { name, timestamp_field: timeStampField, indices, generation } = dataStreamFromEs; return { name, - timeStampField: timestamp_field, + timeStampField, indices: indices.map( + // eslint-disable-next-line @typescript-eslint/naming-convention ({ index_name, index_uuid }: { index_name: string; index_uuid: string }) => ({ name: index_name, uuid: index_uuid, diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx index 2f7317e3e656b..79e213229fc51 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import React from 'react'; import axios from 'axios'; import axiosXhrAdapter from 'axios/lib/adapters/xhr'; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/component_templates.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/component_templates.tsx index ea5632ac86192..b07279c57d2be 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/component_templates.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/component_templates.tsx @@ -171,6 +171,7 @@ export const ComponentTemplates = ({ isLoading, components, listItemProps }: Pro
    diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/component_templates_selector.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/component_templates_selector.tsx index ed570579d4e45..ccdfaad78fb6b 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/component_templates_selector.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/component_templates_selector.tsx @@ -157,6 +157,7 @@ export const ComponentTemplatesSelector = ({ {/* Selection */} diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/lib/documentation.ts b/x-pack/plugins/index_management/public/application/components/component_templates/lib/documentation.ts index db06877d6e81a..7bec03a5bade8 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/lib/documentation.ts +++ b/x-pack/plugins/index_management/public/application/components/component_templates/lib/documentation.ts @@ -6,6 +6,7 @@ import { DocLinksStart } from 'src/core/public'; +// eslint-disable-next-line @typescript-eslint/naming-convention export const getDocumentation = ({ ELASTIC_WEBSITE_URL, DOC_LINK_VERSION }: DocLinksStart) => { const docsBase = `${ELASTIC_WEBSITE_URL}guide/en`; const esDocsBase = `${docsBase}/elasticsearch/reference/${DOC_LINK_VERSION}`; diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/datatypes/text_datatype.test.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/datatypes/text_datatype.test.tsx index c03aa4805d27f..66989baa2dc67 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/datatypes/text_datatype.test.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/datatypes/text_datatype.test.tsx @@ -307,8 +307,11 @@ describe.skip('Mappings editor: text datatype', () => { const indexSettings = { analysis: { analyzer: { + // eslint-disable-next-line @typescript-eslint/naming-convention customAnalyzer_1: {}, + // eslint-disable-next-line @typescript-eslint/naming-convention customAnalyzer_2: {}, + // eslint-disable-next-line @typescript-eslint/naming-convention customAnalyzer_3: {}, }, }, diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/configuration_form.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/configuration_form.tsx index 20b2e11855029..3a3e19783d74d 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/configuration_form.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/configuration_form.tsx @@ -24,9 +24,11 @@ const formSerializer: SerializerFunc = (formData) => { dynamicMapping: { enabled: dynamicMappingsEnabled, throwErrorsForUnmappedFields, + /* eslint-disable @typescript-eslint/naming-convention */ numeric_detection, date_detection, dynamic_date_formats, + /* eslint-enable @typescript-eslint/naming-convention */ }, sourceField, metaField, @@ -51,9 +53,11 @@ const formSerializer: SerializerFunc = (formData) => { const formDeserializer = (formData: GenericObject) => { const { dynamic, + /* eslint-disable @typescript-eslint/naming-convention */ numeric_detection, date_detection, dynamic_date_formats, + /* eslint-enable @typescript-eslint/naming-convention */ _source: { enabled, includes, excludes } = {} as { enabled?: boolean; includes?: string[]; diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/dynamic_mapping_section/dynamic_mapping_section.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/dynamic_mapping_section/dynamic_mapping_section.tsx index 05d871ccfac71..c5001740c26c6 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/dynamic_mapping_section/dynamic_mapping_section.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/configuration_form/dynamic_mapping_section/dynamic_mapping_section.tsx @@ -55,6 +55,7 @@ export const DynamicMappingSection = () => ( {(formData) => { const { 'dynamicMapping.enabled': enabled, + // eslint-disable-next-line @typescript-eslint/naming-convention 'dynamicMapping.date_detection': dateDetection, } = formData; diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/dynamic_parameter.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/dynamic_parameter.tsx index 1882802b27487..f8b7f90f983c5 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/dynamic_parameter.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/dynamic_parameter.tsx @@ -24,6 +24,7 @@ export const dynamicSerializer = (field: Field): Field => { const dynamic = field.dynamic_toggle === true ? true : field.dynamic_strict === true ? 'strict' : false; + // eslint-disable-next-line @typescript-eslint/naming-convention const { dynamic_toggle, dynamic_strict, ...rest } = field; return { diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/create_field.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/create_field.tsx index dc631b7dbf32d..ecaa40b398d08 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/create_field.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/create_field.tsx @@ -164,8 +164,10 @@ export const CreateField = React.memo(function CreateFieldComponent({ >
    0, + // eslint-disable-next-line @typescript-eslint/naming-convention 'mappingsEditor__createFieldWrapper--multiField': isMultiField, })} style={{ diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/fields_list_item.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/fields_list_item.tsx index c4d0a65905557..4ab0ea0fb355b 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/fields_list_item.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/fields_list_item.tsx @@ -193,6 +193,7 @@ function FieldListItemComponent( return (
  • treeDepth, })} diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/search_fields/search_result_item.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/search_fields/search_result_item.tsx index 73d3e078f6ff3..a2d9a50f28394 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/search_fields/search_result_item.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/search_fields/search_result_item.tsx @@ -89,8 +89,11 @@ export const SearchResultItem = React.memo(function FieldListItemFlatComponent({
    @@ -99,7 +102,9 @@ export const SearchResultItem = React.memo(function FieldListItemFlatComponent({ gutterSize="s" alignItems="center" className={classNames('mappingsEditor__fieldsListItem__content', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'mappingsEditor__fieldsListItem__content--toggle': hasChildFields || hasMultiFields, + // eslint-disable-next-line @typescript-eslint/naming-convention 'mappingsEditor__fieldsListItem__content--multiField': isMultiField, })} > diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/templates_form/templates_form.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/templates_form/templates_form.tsx index 44a809a7a01bf..9367eb6faee20 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/templates_form/templates_form.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/templates_form/templates_form.tsx @@ -44,6 +44,7 @@ const formSerializer: SerializerFunc = (formData) }; const formDeserializer = (formData: { [key: string]: any }) => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { dynamic_templates } = formData; return { diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_editor.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_editor.tsx index 292882f1c5b4b..39451639bfb86 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_editor.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_editor.tsx @@ -59,11 +59,13 @@ export const MappingsEditor = React.memo(({ onChange, value, indexSettings }: Pr _meta, _routing, dynamic, + /* eslint-disable @typescript-eslint/naming-convention */ numeric_detection, date_detection, dynamic_date_formats, properties, dynamic_templates, + /* eslint-enable @typescript-eslint/naming-convention */ } = mappingsDefinition; const parsed = { diff --git a/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_table/data_stream_table.tsx b/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_table/data_stream_table.tsx index d01d8fa03a3fa..d1e093f1ffc83 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_table/data_stream_table.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_table/data_stream_table.tsx @@ -42,7 +42,6 @@ export const DataStreamTable: React.FunctionComponent = ({ sortable: true, render: (name: DataStream['name'], item: DataStream) => { return ( - /* eslint-disable-next-line @elastic/eui/href-or-on-click */ { - const { reason, caused_by } = causedBy; // eslint-disable-line @typescript-eslint/camelcase + const { reason, caused_by } = causedBy; // eslint-disable-line @typescript-eslint/naming-convention if (reason) { accumulator.push(reason); } - // eslint-disable-next-line @typescript-eslint/camelcase if (caused_by) { return extractCausedByChain(caused_by, accumulator); } @@ -31,8 +30,8 @@ export const wrapEsError = (err: any, statusCodeToMessageMap: any = {}) => { const { error: { - root_cause = [], // eslint-disable-line @typescript-eslint/camelcase - caused_by = {}, // eslint-disable-line @typescript-eslint/camelcase + root_cause = [], // eslint-disable-line @typescript-eslint/naming-convention + caused_by = {}, // eslint-disable-line @typescript-eslint/naming-convention } = {}, } = JSON.parse(response); diff --git a/x-pack/plugins/infra/common/errors/metrics.ts b/x-pack/plugins/infra/common/errors/metrics.ts index 2acf2b741cec9..08d58a7db326e 100644 --- a/x-pack/plugins/infra/common/errors/metrics.ts +++ b/x-pack/plugins/infra/common/errors/metrics.ts @@ -5,6 +5,5 @@ */ export enum InfraMetricsErrorCodes { - // eslint-disable-next-line @typescript-eslint/camelcase invalid_node = 'METRICS_INVALID_NODE', } diff --git a/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx b/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx index b69078beec670..7ca17617871ff 100644 --- a/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx +++ b/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx @@ -39,7 +39,6 @@ import { import { IErrorObject } from '../../../../../triggers_actions_ui/public/types'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { AlertsContextValue } from '../../../../../triggers_actions_ui/public/application/context/alerts_context'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { MetricsExplorerKueryBar } from '../../../pages/metrics/metrics_explorer/components/kuery_bar'; import { useSourceViaHttp } from '../../../containers/source/use_source_via_http'; import { sqsMetricTypes } from '../../../../common/inventory_models/aws_sqs/toolbar_items'; diff --git a/x-pack/plugins/infra/public/alerting/inventory/index.ts b/x-pack/plugins/infra/public/alerting/inventory/index.ts index 30f16ef137a17..b5f6e17cc2a13 100644 --- a/x-pack/plugins/infra/public/alerting/inventory/index.ts +++ b/x-pack/plugins/infra/public/alerting/inventory/index.ts @@ -10,7 +10,6 @@ import { METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID } from '../../../server/lib/al // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { AlertTypeModel } from '../../../../triggers_actions_ui/public/types'; import { validateMetricThreshold } from './components/validation'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths export function createInventoryMetricAlertType(): AlertTypeModel { return { diff --git a/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx b/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx index 8bb8b3934b5fd..8031f7a03731a 100644 --- a/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx +++ b/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx @@ -20,7 +20,6 @@ import { import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; import { AlertPreview } from '../../common'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { Comparator, Aggregators, diff --git a/x-pack/plugins/infra/public/components/document_title.tsx b/x-pack/plugins/infra/public/components/document_title.tsx index 51f179760ec70..5ae3aa7ec8b42 100644 --- a/x-pack/plugins/infra/public/components/document_title.tsx +++ b/x-pack/plugins/infra/public/components/document_title.tsx @@ -6,10 +6,10 @@ import React from 'react'; -type titleProp = string | ((previousTitle: string) => string); +type TitleProp = string | ((previousTitle: string) => string); interface DocumentTitleProps { - title: titleProp; + title: TitleProp; } interface DocumentTitleState { @@ -47,7 +47,7 @@ const wrapWithSharedState = () => { return null; } - private getTitle(title: titleProp) { + private getTitle(title: TitleProp) { return typeof title === 'function' ? title(titles[this.state.index - 1]) : title; } diff --git a/x-pack/plugins/infra/public/components/logging/log_text_stream/jump_to_tail.tsx b/x-pack/plugins/infra/public/components/logging/log_text_stream/jump_to_tail.tsx index 78caa8054860f..50c26784bbdab 100644 --- a/x-pack/plugins/infra/public/components/logging/log_text_stream/jump_to_tail.tsx +++ b/x-pack/plugins/infra/public/components/logging/log_text_stream/jump_to_tail.tsx @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable max-classes-per-file */ - import { EuiButtonEmpty, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import * as React from 'react'; diff --git a/x-pack/plugins/infra/public/components/logging/log_text_stream/loading_item_view.tsx b/x-pack/plugins/infra/public/components/logging/log_text_stream/loading_item_view.tsx index eb187a7af03f6..1dd6e0b23e6bc 100644 --- a/x-pack/plugins/infra/public/components/logging/log_text_stream/loading_item_view.tsx +++ b/x-pack/plugins/infra/public/components/logging/log_text_stream/loading_item_view.tsx @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable max-classes-per-file */ - import { EuiText, EuiFlexGroup, diff --git a/x-pack/plugins/infra/public/components/logging/log_text_stream/scrollable_log_text_stream_view.tsx b/x-pack/plugins/infra/public/components/logging/log_text_stream/scrollable_log_text_stream_view.tsx index 74d1878fc89c2..fc0c50b9044dc 100644 --- a/x-pack/plugins/infra/public/components/logging/log_text_stream/scrollable_log_text_stream_view.tsx +++ b/x-pack/plugins/infra/public/components/logging/log_text_stream/scrollable_log_text_stream_view.tsx @@ -326,8 +326,6 @@ export class ScrollableLogTextStreamView extends React.PureComponent< } }; - // this is actually a method but not recognized as such - // eslint-disable-next-line @typescript-eslint/member-ordering private handleVisibleChildrenChange = callWithoutRepeats( ({ topChild, diff --git a/x-pack/plugins/infra/public/components/navigation/routed_tabs.tsx b/x-pack/plugins/infra/public/components/navigation/routed_tabs.tsx index 29db3c893a460..d9340d804fb24 100644 --- a/x-pack/plugins/infra/public/components/navigation/routed_tabs.tsx +++ b/x-pack/plugins/infra/public/components/navigation/routed_tabs.tsx @@ -42,7 +42,6 @@ const Tab = ({ title, pathname, app }: TabConfiguration) => { children={({ match, history }) => { return ( - {/* eslint-disable-next-line @elastic/eui/href-or-on-click */} {title} diff --git a/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/charts.tsx b/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/charts.tsx index b9595548debf2..270ccac000637 100644 --- a/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/charts.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/charts.tsx @@ -19,13 +19,13 @@ import { NoData } from '../../../../components/empty_states/no_data'; import { MetricsExplorerChart } from './chart'; import { SourceQuery } from '../../../../graphql/types'; -type stringOrNull = string | null; +type StringOrNull = string | null; interface Props { loading: boolean; options: MetricsExplorerOptions; chartOptions: MetricsExplorerChartOptions; - onLoadMore: (afterKey: stringOrNull | Record) => void; + onLoadMore: (afterKey: StringOrNull | Record) => void; onRefetch: () => void; onFilter: (filter: string) => void; onTimeChange: (start: string, end: string) => void; diff --git a/x-pack/plugins/infra/server/lib/adapters/framework/adapter_types.ts b/x-pack/plugins/infra/server/lib/adapters/framework/adapter_types.ts index 117749ae87bbe..1ecae84c54ffb 100644 --- a/x-pack/plugins/infra/server/lib/adapters/framework/adapter_types.ts +++ b/x-pack/plugins/infra/server/lib/adapters/framework/adapter_types.ts @@ -171,6 +171,6 @@ export interface InfraTSVBSeries { export type InfraTSVBDataPoint = [number, number]; -export type InfraRouteConfig = { +export type InfraRouteConfig = { method: RouteMethod; -} & RouteConfig; +} & RouteConfig; diff --git a/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts index 453f01ef028f1..2dcab5b49dcdb 100644 --- a/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts +++ b/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/array-type */ - import { GraphQLSchema } from 'graphql'; import { runHttpQuery } from 'apollo-server-core'; import { schema, TypeOf } from '@kbn/config-schema'; @@ -43,9 +41,9 @@ export class KibanaFramework { this.plugins = plugins; } - public registerRoute( - config: InfraRouteConfig, - handler: RequestHandler + public registerRoute( + config: InfraRouteConfig, + handler: RequestHandler ) { const defaultOptions = { tags: ['access:infra'], diff --git a/x-pack/plugins/infra/server/lib/adapters/metrics/adapter_types.ts b/x-pack/plugins/infra/server/lib/adapters/metrics/adapter_types.ts index 6659cb060b1a8..f786c043ee27c 100644 --- a/x-pack/plugins/infra/server/lib/adapters/metrics/adapter_types.ts +++ b/x-pack/plugins/infra/server/lib/adapters/metrics/adapter_types.ts @@ -40,12 +40,12 @@ export enum InfraMetricModelMetricType { min = 'min', calculation = 'calculation', cardinality = 'cardinality', - series_agg = 'series_agg', // eslint-disable-line @typescript-eslint/camelcase - positive_only = 'positive_only', // eslint-disable-line @typescript-eslint/camelcase + series_agg = 'series_agg', + positive_only = 'positive_only', derivative = 'derivative', count = 'count', sum = 'sum', - cumulative_sum = 'cumulative_sum', // eslint-disable-line @typescript-eslint/camelcase + cumulative_sum = 'cumulative_sum', } export interface InfraMetricModel { @@ -80,7 +80,7 @@ export interface InfraMetricModelBasicMetric { export interface InfraMetricModelSeriesAgg { id: string; function: string; - type: InfraMetricModelMetricType.series_agg; // eslint-disable-line @typescript-eslint/camelcase + type: InfraMetricModelMetricType.series_agg; } export interface InfraMetricModelDerivative { diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/test_mocks.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/test_mocks.ts index 5c2f76cea87c4..164f1ed6d18e5 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/test_mocks.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/test_mocks.ts @@ -68,6 +68,7 @@ export const emptyRateResponse = { buckets: [ { doc_count: 2, + // eslint-disable-next-line @typescript-eslint/naming-convention aggregatedValue_max: { value: null }, }, ], diff --git a/x-pack/plugins/infra/server/lib/log_analysis/log_entry_anomalies.ts b/x-pack/plugins/infra/server/lib/log_analysis/log_entry_anomalies.ts index 950de4261bda0..a55958aee1285 100644 --- a/x-pack/plugins/infra/server/lib/log_analysis/log_entry_anomalies.ts +++ b/x-pack/plugins/infra/server/lib/log_analysis/log_entry_anomalies.ts @@ -246,6 +246,7 @@ async function fetchLogEntryAnomalies( const anomalies = hits.map((result) => { const { + // eslint-disable-next-line @typescript-eslint/naming-convention job_id, record_score: anomalyScore, typical, diff --git a/x-pack/plugins/infra/server/lib/log_analysis/queries/log_entry_categories.ts b/x-pack/plugins/infra/server/lib/log_analysis/queries/log_entry_categories.ts index c7ad60eeaabc2..3ef10d3378a66 100644 --- a/x-pack/plugins/infra/server/lib/log_analysis/queries/log_entry_categories.ts +++ b/x-pack/plugins/infra/server/lib/log_analysis/queries/log_entry_categories.ts @@ -46,4 +46,5 @@ export const logEntryCategoriesResponseRT = rt.intersection([ }), ]); +// eslint-disable-next-line @typescript-eslint/naming-convention export type logEntryCategoriesResponse = rt.TypeOf; diff --git a/x-pack/plugins/infra/server/lib/log_analysis/queries/log_entry_category_examples.ts b/x-pack/plugins/infra/server/lib/log_analysis/queries/log_entry_category_examples.ts index 2f4502f991dd9..6e2afa874b757 100644 --- a/x-pack/plugins/infra/server/lib/log_analysis/queries/log_entry_category_examples.ts +++ b/x-pack/plugins/infra/server/lib/log_analysis/queries/log_entry_category_examples.ts @@ -82,4 +82,5 @@ export const logEntryCategoryExamplesResponseRT = rt.intersection([ }), ]); +// eslint-disable-next-line @typescript-eslint/naming-convention export type logEntryCategoryExamplesResponse = rt.TypeOf; diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/index.tsx index 0eaf785405590..443708ec6384f 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/index.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/index.tsx @@ -94,7 +94,6 @@ const IngestManagerRoutes = memo<{ history: AppMountParameters['history']; basep setPermissionsError('REQUEST_ERROR'); } })(); - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); if (isPermissionsLoading || permissionsError) { diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/components/settings/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/components/settings/index.tsx index 6bb381e29ded2..dfdd63bd984dd 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/components/settings/index.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/components/settings/index.tsx @@ -74,6 +74,7 @@ export const ConfigSettingsView = memo<{ config: AgentConfig }>( const submitUpdateAgentConfig = async () => { setIsLoading(true); try { + // eslint-disable-next-line @typescript-eslint/naming-convention const { name, description, namespace, monitoring_enabled } = agentConfig; const { data, error } = await sendUpdateAgentConfig(agentConfig.id, { name, diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/edit_package_config_page/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/edit_package_config_page/index.tsx index f4411a6057a15..3005f8d36f343 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/edit_package_config_page/index.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/edit_package_config_page/index.tsx @@ -100,10 +100,12 @@ export const EditPackageConfigPage: React.FunctionComponent = () => { id, revision, inputs, + /* eslint-disable @typescript-eslint/naming-convention */ created_by, created_at, updated_by, updated_at, + /* eslint-enable @typescript-eslint/naming-convention */ ...restOfPackageConfig } = packageConfigData.item; // Remove `compiled_stream` from all stream info, we assign this after saving @@ -114,6 +116,7 @@ export const EditPackageConfigPage: React.FunctionComponent = () => { return { ...restOfInput, streams: streams.map((stream) => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { compiled_stream, ...restOfStream } = stream; return restOfStream; }), diff --git a/x-pack/plugins/ingest_manager/server/services/agent_config.ts b/x-pack/plugins/ingest_manager/server/services/agent_config.ts index 63d4e6f012e07..10b5d9aa0b2f8 100644 --- a/x-pack/plugins/ingest_manager/server/services/agent_config.ts +++ b/x-pack/plugins/ingest_manager/server/services/agent_config.ts @@ -218,6 +218,7 @@ class AgentConfigService { if (!baseAgentConfig) { throw new Error('Agent config not found'); } + // eslint-disable-next-line @typescript-eslint/naming-convention const { namespace, monitoring_enabled } = baseAgentConfig; const newAgentConfig = await this.create( soClient, @@ -393,6 +394,7 @@ class AgentConfigService { outputs: { // TEMPORARY as we only support a default output ...[defaultOutput].reduce( + // eslint-disable-next-line @typescript-eslint/naming-convention (outputs, { config: outputConfig, name, type, hosts, ca_sha256, api_key }) => { outputs[name] = { type, diff --git a/x-pack/plugins/ingest_manager/server/services/agents/crud.ts b/x-pack/plugins/ingest_manager/server/services/agents/crud.ts index 4420135aec952..a57735e25ff7b 100644 --- a/x-pack/plugins/ingest_manager/server/services/agents/crud.ts +++ b/x-pack/plugins/ingest_manager/server/services/agents/crud.ts @@ -51,6 +51,7 @@ export async function listAgents( filters.push(`(${agentActiveCondition}) OR (${recentlySeenEphemeralAgent})`); } + // eslint-disable-next-line @typescript-eslint/naming-convention const { saved_objects, total } = await soClient.find({ type: AGENT_SAVED_OBJECT_TYPE, sortField, diff --git a/x-pack/plugins/ingest_manager/server/services/agents/events.ts b/x-pack/plugins/ingest_manager/server/services/agents/events.ts index 55970607c74ab..dfa599e4ffdfd 100644 --- a/x-pack/plugins/ingest_manager/server/services/agents/events.ts +++ b/x-pack/plugins/ingest_manager/server/services/agents/events.ts @@ -19,6 +19,7 @@ export async function getAgentEvents( ) { const { page, perPage, kuery } = options; + // eslint-disable-next-line @typescript-eslint/naming-convention const { total, saved_objects } = await soClient.find({ type: AGENT_EVENT_SAVED_OBJECT_TYPE, filter: diff --git a/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts b/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts index 02e2c8151fac7..e1266ac594164 100644 --- a/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts +++ b/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts @@ -24,6 +24,7 @@ export async function listEnrollmentApiKeys( ): Promise<{ items: EnrollmentAPIKey[]; total: any; page: any; perPage: any }> { const { page = 1, perPage = 20, kuery } = options; + // eslint-disable-next-line @typescript-eslint/naming-convention const { saved_objects, total } = await soClient.find({ type: ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE, page, diff --git a/x-pack/plugins/ingest_manager/server/services/package_config.ts b/x-pack/plugins/ingest_manager/server/services/package_config.ts index 5d1c5d1717714..a369aa5c41cd4 100644 --- a/x-pack/plugins/ingest_manager/server/services/package_config.ts +++ b/x-pack/plugins/ingest_manager/server/services/package_config.ts @@ -121,6 +121,7 @@ class PackageConfigService { options?: { user?: AuthenticatedUser; bumpConfigRevision?: boolean } ): Promise { const isoDate = new Date().toISOString(); + // eslint-disable-next-line @typescript-eslint/naming-convention const { saved_objects } = await soClient.bulkCreate( packageConfigs.map((packageConfig) => ({ type: SAVED_OBJECT_TYPE, diff --git a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_clone.helpers.ts b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_clone.helpers.ts index 2791ffc32c858..f369bfe66f642 100644 --- a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_clone.helpers.ts +++ b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_clone.helpers.ts @@ -6,7 +6,7 @@ import { registerTestBed, TestBedConfig, TestBed } from '../../../../../test_utils'; import { BASE_PATH } from '../../../common/constants'; -import { PipelinesClone } from '../../../public/application/sections/pipelines_clone'; // eslint-disable-line @kbn/eslint/no-restricted-paths +import { PipelinesClone } from '../../../public/application/sections/pipelines_clone'; import { getFormActions, PipelineFormTestSubjects } from './pipeline_form.helpers'; import { WithAppDependencies } from './setup_environment'; diff --git a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_create.helpers.ts b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_create.helpers.ts index 54a62a8357e52..ce5ab1faa01be 100644 --- a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_create.helpers.ts +++ b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_create.helpers.ts @@ -6,7 +6,7 @@ import { registerTestBed, TestBedConfig, TestBed } from '../../../../../test_utils'; import { BASE_PATH } from '../../../common/constants'; -import { PipelinesCreate } from '../../../public/application/sections/pipelines_create'; // eslint-disable-line @kbn/eslint/no-restricted-paths +import { PipelinesCreate } from '../../../public/application/sections/pipelines_create'; import { getFormActions, PipelineFormTestSubjects } from './pipeline_form.helpers'; import { WithAppDependencies } from './setup_environment'; diff --git a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_edit.helpers.ts b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_edit.helpers.ts index 12320f034a819..31c9630086178 100644 --- a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_edit.helpers.ts +++ b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/pipelines_edit.helpers.ts @@ -6,7 +6,7 @@ import { registerTestBed, TestBedConfig, TestBed } from '../../../../../test_utils'; import { BASE_PATH } from '../../../common/constants'; -import { PipelinesEdit } from '../../../public/application/sections/pipelines_edit'; // eslint-disable-line @kbn/eslint/no-restricted-paths +import { PipelinesEdit } from '../../../public/application/sections/pipelines_edit'; import { getFormActions, PipelineFormTestSubjects } from './pipeline_form.helpers'; import { WithAppDependencies } from './setup_environment'; diff --git a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/setup_environment.tsx index a5796c10f8d93..c380032bd9482 100644 --- a/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/ingest_pipelines/__jest__/client_integration/helpers/setup_environment.tsx @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import React from 'react'; import { LocationDescriptorObject } from 'history'; import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public'; @@ -17,7 +16,6 @@ import { import { usageCollectionPluginMock } from '../../../../../../src/plugins/usage_collection/public/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { HttpService } from '../../../../../../src/core/public/http'; import { diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/context_menu.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/context_menu.tsx index 5cee5311c62a9..1c2f2cc2f4843 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/context_menu.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/context_menu.tsx @@ -26,6 +26,7 @@ export const ContextMenu: FunctionComponent = (props) => { const [isOpen, setIsOpen] = useState(false); const containerClasses = classNames({ + // eslint-disable-next-line @typescript-eslint/naming-convention 'pipelineProcessorsEditor__item--displayNone': hidden, }); diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/inline_text_input.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/inline_text_input.tsx index ea936115f1ac9..e91974adca20a 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/inline_text_input.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/inline_text_input.tsx @@ -26,6 +26,7 @@ export const InlineTextInput: FunctionComponent = ({ const [textValue, setTextValue] = useState(text ?? ''); const containerClasses = classNames('pipelineProcessorsEditor__item__textContainer', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'pipelineProcessorsEditor__item__textContainer--notEditing': !isShowingTextInput && !disabled, }); diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/pipeline_processors_editor_item.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/pipeline_processors_editor_item.tsx index 3fbef4c1b7898..b43e2bc1342c3 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/pipeline_processors_editor_item.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/pipeline_processors_editor_item.tsx @@ -62,15 +62,19 @@ export const PipelineProcessorsEditorItem: FunctionComponent = memo( const isDimmed = isEditingOtherProcessor || isMovingOtherProcessor; const panelClasses = classNames('pipelineProcessorsEditor__item', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'pipelineProcessorsEditor__item--selected': isMovingThisProcessor || isEditingThisProcessor, + // eslint-disable-next-line @typescript-eslint/naming-convention 'pipelineProcessorsEditor__item--dimmed': isDimmed, }); const actionElementClasses = classNames({ + // eslint-disable-next-line @typescript-eslint/naming-convention 'pipelineProcessorsEditor__item--displayNone': isInMoveMode, }); const inlineTextInputContainerClasses = classNames({ + // eslint-disable-next-line @typescript-eslint/naming-convention 'pipelineProcessorsEditor__item--displayNone': isInMoveMode && !processor.options.description, }); @@ -80,6 +84,7 @@ export const PipelineProcessorsEditorItem: FunctionComponent = memo( : i18nTexts.cancelMoveButtonLabel; const dataTestSubj = !isMovingThisProcessor ? 'moveItemButton' : 'cancelMoveItemButton'; const moveButtonClasses = classNames('pipelineProcessorsEditor__item__moveButton', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'pipelineProcessorsEditor__item__moveButton--cancel': isMovingThisProcessor, }); const icon = isMovingThisProcessor ? 'cross' : 'sortable'; @@ -143,7 +148,7 @@ export const PipelineProcessorsEditorItem: FunctionComponent = memo( onChange={(nextDescription) => { let nextOptions: Record; if (!nextDescription) { - const { description: __, ...restOptions } = processor.options; + const { description: _description, ...restOptions } = processor.options; nextOptions = restOptions; } else { nextOptions = { diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processors_tree/components/drop_zone_button.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processors_tree/components/drop_zone_button.tsx index 193b5b9afe447..57ecb6f7f1187 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processors_tree/components/drop_zone_button.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processors_tree/components/drop_zone_button.tsx @@ -32,10 +32,13 @@ export const DropZoneButton: FunctionComponent = (props) => { const { onClick, isDisabled, isVisible } = props; const isUnavailable = isVisible && isDisabled; const containerClasses = classNames({ + // eslint-disable-next-line @typescript-eslint/naming-convention 'pipelineProcessorsEditor__tree__dropZoneContainer--visible': isVisible, + // eslint-disable-next-line @typescript-eslint/naming-convention 'pipelineProcessorsEditor__tree__dropZoneContainer--unavailable': isUnavailable, }); const buttonClasses = classNames({ + // eslint-disable-next-line @typescript-eslint/naming-convention 'pipelineProcessorsEditor__tree__dropZoneButton--visible': isVisible, }); diff --git a/x-pack/plugins/ingest_pipelines/server/routes/api/create.ts b/x-pack/plugins/ingest_pipelines/server/routes/api/create.ts index c2328bcc9d0ab..4600580985b57 100644 --- a/x-pack/plugins/ingest_pipelines/server/routes/api/create.ts +++ b/x-pack/plugins/ingest_pipelines/server/routes/api/create.ts @@ -33,6 +33,7 @@ export const registerCreateRoute = ({ const { callAsCurrentUser } = ctx.core.elasticsearch.legacy.client; const pipeline = req.body as Pipeline; + // eslint-disable-next-line @typescript-eslint/naming-convention const { name, description, processors, version, on_failure } = pipeline; try { diff --git a/x-pack/plugins/ingest_pipelines/server/routes/api/update.ts b/x-pack/plugins/ingest_pipelines/server/routes/api/update.ts index cd0e3568f0f60..82a5ccbc280d7 100644 --- a/x-pack/plugins/ingest_pipelines/server/routes/api/update.ts +++ b/x-pack/plugins/ingest_pipelines/server/routes/api/update.ts @@ -32,6 +32,7 @@ export const registerUpdateRoute = ({ license.guardApiRoute(async (ctx, req, res) => { const { callAsCurrentUser } = ctx.core.elasticsearch.legacy.client; const { name } = req.params; + // eslint-disable-next-line @typescript-eslint/naming-convention const { description, processors, version, on_failure } = req.body; try { diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx index b06b316ec79aa..7efaecb125c8e 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx @@ -71,6 +71,7 @@ const PreviewRenderer = ({ return (
    @@ -123,6 +124,7 @@ const SuggestionPreview = ({ diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.tsx index 35c510521b35b..b8f868a8694dd 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.tsx @@ -100,7 +100,9 @@ export function FieldSelect({ label, value, className: classNames({ + // eslint-disable-next-line @typescript-eslint/naming-convention 'lnFieldSelect__option--incompatible': !compatible, + // eslint-disable-next-line @typescript-eslint/naming-convention 'lnFieldSelect__option--nonExistant': !exists, }), 'data-test-subj': `lns-fieldOption${compatible ? '' : 'Incompatible'}-${label}`, diff --git a/x-pack/plugins/lens/public/persistence/saved_object_store.ts b/x-pack/plugins/lens/public/persistence/saved_object_store.ts index 7632be3d82046..af90634874fb1 100644 --- a/x-pack/plugins/lens/public/persistence/saved_object_store.ts +++ b/x-pack/plugins/lens/public/persistence/saved_object_store.ts @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { SavedObjectAttributes } from 'kibana/server'; import { Query, Filter } from '../../../../../src/plugins/data/public'; diff --git a/x-pack/plugins/lists/common/schemas/common/schemas.ts b/x-pack/plugins/lists/common/schemas/common/schemas.ts index 76aa896a741f6..0d52b075ebf12 100644 --- a/x-pack/plugins/lists/common/schemas/common/schemas.ts +++ b/x-pack/plugins/lists/common/schemas/common/schemas.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ +/* eslint-disable @typescript-eslint/naming-convention */ import * as t from 'io-ts'; diff --git a/x-pack/plugins/lists/common/schemas/elastic_query/index_es_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/elastic_query/index_es_list_item_schema.ts index 8dc5a376d1495..8bc42d531768b 100644 --- a/x-pack/plugins/lists/common/schemas/elastic_query/index_es_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/elastic_query/index_es_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/elastic_query/index_es_list_schema.ts b/x-pack/plugins/lists/common/schemas/elastic_query/index_es_list_schema.ts index be41e57f99421..347e1be03dc8c 100644 --- a/x-pack/plugins/lists/common/schemas/elastic_query/index_es_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/elastic_query/index_es_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/elastic_query/update_es_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/elastic_query/update_es_list_item_schema.ts index 20187de535a8e..10302e529d2b9 100644 --- a/x-pack/plugins/lists/common/schemas/elastic_query/update_es_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/elastic_query/update_es_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { esDataTypeUnion, metaOrUndefined, updated_at, updated_by } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/elastic_query/update_es_list_schema.ts b/x-pack/plugins/lists/common/schemas/elastic_query/update_es_list_schema.ts index 80b9733908d39..5b2461156e81a 100644 --- a/x-pack/plugins/lists/common/schemas/elastic_query/update_es_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/elastic_query/update_es_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/elastic_response/search_es_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/elastic_response/search_es_list_item_schema.ts index 76419587c5925..445c53116bc2b 100644 --- a/x-pack/plugins/lists/common/schemas/elastic_response/search_es_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/elastic_response/search_es_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/elastic_response/search_es_list_schema.ts b/x-pack/plugins/lists/common/schemas/elastic_response/search_es_list_schema.ts index 6807201cf18d9..7252f3ca4987f 100644 --- a/x-pack/plugins/lists/common/schemas/elastic_response/search_es_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/elastic_response/search_es_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/request/create_endpoint_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/create_endpoint_list_item_schema.ts index 626b9e3e624ef..dacd9d515de51 100644 --- a/x-pack/plugins/lists/common/schemas/request/create_endpoint_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/create_endpoint_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/request/create_exception_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/create_exception_list_item_schema.ts index 039a38594a367..fd3390721d41e 100644 --- a/x-pack/plugins/lists/common/schemas/request/create_exception_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/create_exception_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/request/create_exception_list_schema.ts b/x-pack/plugins/lists/common/schemas/request/create_exception_list_schema.ts index 7009fbd709e54..ffec974602714 100644 --- a/x-pack/plugins/lists/common/schemas/request/create_exception_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/create_exception_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/request/create_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/create_list_item_schema.ts index 351eae48a638d..8627d98bec5b8 100644 --- a/x-pack/plugins/lists/common/schemas/request/create_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/create_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { id, list_id, meta, value } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/delete_endpoint_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/delete_endpoint_list_item_schema.ts index 5af5bcd17e744..6855261ee375f 100644 --- a/x-pack/plugins/lists/common/schemas/request/delete_endpoint_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/delete_endpoint_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { id, item_id } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/delete_exception_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/delete_exception_list_item_schema.ts index da6516f4b6fe4..97abdcf730240 100644 --- a/x-pack/plugins/lists/common/schemas/request/delete_exception_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/delete_exception_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { id, item_id, namespace_type } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/delete_exception_list_schema.ts b/x-pack/plugins/lists/common/schemas/request/delete_exception_list_schema.ts index 0911a9342f7a9..4e12ac12e9e90 100644 --- a/x-pack/plugins/lists/common/schemas/request/delete_exception_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/delete_exception_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { id, list_id, namespace_type } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/delete_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/delete_list_item_schema.ts index 5e2425271c463..7012a9b723ed1 100644 --- a/x-pack/plugins/lists/common/schemas/request/delete_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/delete_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { id, list_id, valueOrUndefined } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/delete_list_schema.ts b/x-pack/plugins/lists/common/schemas/request/delete_list_schema.ts index 830e7fe695d1d..630c77bf80dd2 100644 --- a/x-pack/plugins/lists/common/schemas/request/delete_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/delete_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { id } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/export_list_item_query_schema.ts b/x-pack/plugins/lists/common/schemas/request/export_list_item_query_schema.ts index 8d14f015d3805..c393a9b7c0876 100644 --- a/x-pack/plugins/lists/common/schemas/request/export_list_item_query_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/export_list_item_query_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { list_id } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/find_endpoint_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/find_endpoint_list_item_schema.ts index bc839ce1346f3..af94229c4ebd3 100644 --- a/x-pack/plugins/lists/common/schemas/request/find_endpoint_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/find_endpoint_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { filter, sort_field, sort_order } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/find_exception_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/find_exception_list_item_schema.ts index 634c080d70b75..4f9f8ef3632ad 100644 --- a/x-pack/plugins/lists/common/schemas/request/find_exception_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/find_exception_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { sort_field, sort_order } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/find_exception_list_schema.ts b/x-pack/plugins/lists/common/schemas/request/find_exception_list_schema.ts index 7ce01c79bbe42..7765bbfbb29bd 100644 --- a/x-pack/plugins/lists/common/schemas/request/find_exception_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/find_exception_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { filter, namespace_type, sort_field, sort_order } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/find_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/find_list_item_schema.ts index ba3dfc6ee33ec..477b111af424d 100644 --- a/x-pack/plugins/lists/common/schemas/request/find_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/find_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { cursor, filter, list_id, sort_field, sort_order } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/find_list_schema.ts b/x-pack/plugins/lists/common/schemas/request/find_list_schema.ts index e5020cc8eff84..8bbe8003970ca 100644 --- a/x-pack/plugins/lists/common/schemas/request/find_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/find_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { cursor, filter, sort_field, sort_order } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/import_list_item_query_schema.ts b/x-pack/plugins/lists/common/schemas/request/import_list_item_query_schema.ts index e45f77ca18ae1..6b0818fdcbe44 100644 --- a/x-pack/plugins/lists/common/schemas/request/import_list_item_query_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/import_list_item_query_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { RequiredKeepUndefined } from '../../types'; diff --git a/x-pack/plugins/lists/common/schemas/request/import_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/import_list_item_schema.ts index 671aeda757eff..4b6f599ab013e 100644 --- a/x-pack/plugins/lists/common/schemas/request/import_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/import_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { file } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/patch_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/patch_list_item_schema.ts index 9c5284c15ca99..f61def1365f5f 100644 --- a/x-pack/plugins/lists/common/schemas/request/patch_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/patch_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { _version, id, meta, value } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/patch_list_schema.ts b/x-pack/plugins/lists/common/schemas/request/patch_list_schema.ts index c92abd2e912eb..394eab8ddb348 100644 --- a/x-pack/plugins/lists/common/schemas/request/patch_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/patch_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { _version, description, id, meta, name, version } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/read_endpoint_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/read_endpoint_list_item_schema.ts index d6c54e289effe..01690f0a6b262 100644 --- a/x-pack/plugins/lists/common/schemas/request/read_endpoint_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/read_endpoint_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { id, item_id } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/read_exception_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/read_exception_list_item_schema.ts index a2ba8126c7788..12e2e2dc278a7 100644 --- a/x-pack/plugins/lists/common/schemas/request/read_exception_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/read_exception_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { id, item_id, namespace_type } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/read_exception_list_schema.ts b/x-pack/plugins/lists/common/schemas/request/read_exception_list_schema.ts index f22eca6a8ab15..5db0d2d3662d8 100644 --- a/x-pack/plugins/lists/common/schemas/request/read_exception_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/read_exception_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { id, list_id, namespace_type } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/read_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/read_list_item_schema.ts index 063f430aa9cea..80d1321406113 100644 --- a/x-pack/plugins/lists/common/schemas/request/read_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/read_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { id, list_id, value } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/read_list_schema.ts b/x-pack/plugins/lists/common/schemas/request/read_list_schema.ts index e395875462cb4..b0de5f81514eb 100644 --- a/x-pack/plugins/lists/common/schemas/request/read_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/read_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { id } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/update_endpoint_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/update_endpoint_list_item_schema.ts index 5bf0cb3b7984e..6ce5ad7858b78 100644 --- a/x-pack/plugins/lists/common/schemas/request/update_endpoint_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/update_endpoint_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/request/update_exception_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/update_exception_list_item_schema.ts index 7fbd5cd65f04d..659dde0b5b533 100644 --- a/x-pack/plugins/lists/common/schemas/request/update_exception_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/update_exception_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/request/update_exception_list_schema.ts b/x-pack/plugins/lists/common/schemas/request/update_exception_list_schema.ts index dd1bc65d18230..54e0bbafe4981 100644 --- a/x-pack/plugins/lists/common/schemas/request/update_exception_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/update_exception_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/request/update_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/request/update_list_item_schema.ts index c6ed5ef0e9517..731c4f20a3ef3 100644 --- a/x-pack/plugins/lists/common/schemas/request/update_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/update_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { _version, id, meta, value } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/request/update_list_schema.ts b/x-pack/plugins/lists/common/schemas/request/update_list_schema.ts index a9778f23f1302..cd0ed47cc3cb5 100644 --- a/x-pack/plugins/lists/common/schemas/request/update_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/request/update_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { _version, description, id, meta, name, version } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/response/create_endpoint_list_schema.ts b/x-pack/plugins/lists/common/schemas/response/create_endpoint_list_schema.ts index 4653b73347f72..a2ee6adf9ead9 100644 --- a/x-pack/plugins/lists/common/schemas/response/create_endpoint_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/response/create_endpoint_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { exceptionListSchema } from './exception_list_schema'; diff --git a/x-pack/plugins/lists/common/schemas/response/exception_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/response/exception_list_item_schema.ts index 54907f3f8a854..65a1a26eaa622 100644 --- a/x-pack/plugins/lists/common/schemas/response/exception_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/response/exception_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/response/exception_list_schema.ts b/x-pack/plugins/lists/common/schemas/response/exception_list_schema.ts index 2dbabb0e2bc3b..6597cb20508ca 100644 --- a/x-pack/plugins/lists/common/schemas/response/exception_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/response/exception_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/response/found_exception_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/response/found_exception_list_item_schema.ts index a58bf433017e6..8f30064c6aff9 100644 --- a/x-pack/plugins/lists/common/schemas/response/found_exception_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/response/found_exception_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { page, per_page, total } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/response/found_exception_list_schema.ts b/x-pack/plugins/lists/common/schemas/response/found_exception_list_schema.ts index a2ea09a3263ae..c60a90dff5229 100644 --- a/x-pack/plugins/lists/common/schemas/response/found_exception_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/response/found_exception_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { page, per_page, total } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/response/found_list_item_schema.ts b/x-pack/plugins/lists/common/schemas/response/found_list_item_schema.ts index f792774cd0c12..5a64f4e6965e5 100644 --- a/x-pack/plugins/lists/common/schemas/response/found_list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/response/found_list_item_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { cursor, page, per_page, total } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/response/found_list_schema.ts b/x-pack/plugins/lists/common/schemas/response/found_list_schema.ts index aaf4a721d050d..1f3f6571a712e 100644 --- a/x-pack/plugins/lists/common/schemas/response/found_list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/response/found_list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { cursor, page, per_page, total } from '../common/schemas'; diff --git a/x-pack/plugins/lists/common/schemas/response/list_item_schema.ts b/x-pack/plugins/lists/common/schemas/response/list_item_schema.ts index 9ee801298f950..fbe66913f9818 100644 --- a/x-pack/plugins/lists/common/schemas/response/list_item_schema.ts +++ b/x-pack/plugins/lists/common/schemas/response/list_item_schema.ts @@ -6,8 +6,6 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ - import { _versionOrUndefined, created_at, diff --git a/x-pack/plugins/lists/common/schemas/response/list_schema.ts b/x-pack/plugins/lists/common/schemas/response/list_schema.ts index 539c6221fcb0f..be0fe53f4d926 100644 --- a/x-pack/plugins/lists/common/schemas/response/list_schema.ts +++ b/x-pack/plugins/lists/common/schemas/response/list_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { diff --git a/x-pack/plugins/lists/common/schemas/saved_objects/exceptions_list_so_schema.ts b/x-pack/plugins/lists/common/schemas/saved_objects/exceptions_list_so_schema.ts index 2bd2a51ca8c74..f4db77f4ee057 100644 --- a/x-pack/plugins/lists/common/schemas/saved_objects/exceptions_list_so_schema.ts +++ b/x-pack/plugins/lists/common/schemas/saved_objects/exceptions_list_so_schema.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { commentsArrayOrUndefined, entriesArrayOrUndefined } from '../types'; diff --git a/x-pack/plugins/lists/common/schemas/types/comment.ts b/x-pack/plugins/lists/common/schemas/types/comment.ts index 4d7aba3b3ad98..0c0d7543fea51 100644 --- a/x-pack/plugins/lists/common/schemas/types/comment.ts +++ b/x-pack/plugins/lists/common/schemas/types/comment.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { NonEmptyString } from '../../shared_imports'; diff --git a/x-pack/plugins/lists/common/schemas/types/entries.ts b/x-pack/plugins/lists/common/schemas/types/entries.ts index 4f20b9278d3ff..9f014a3e75c14 100644 --- a/x-pack/plugins/lists/common/schemas/types/entries.ts +++ b/x-pack/plugins/lists/common/schemas/types/entries.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { entriesMatchAny } from './entry_match_any'; diff --git a/x-pack/plugins/lists/common/schemas/types/entry_exists.ts b/x-pack/plugins/lists/common/schemas/types/entry_exists.ts index 4d9c09cc93574..50bf4ca776d52 100644 --- a/x-pack/plugins/lists/common/schemas/types/entry_exists.ts +++ b/x-pack/plugins/lists/common/schemas/types/entry_exists.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { NonEmptyString } from '../../shared_imports'; diff --git a/x-pack/plugins/lists/common/schemas/types/entry_list.ts b/x-pack/plugins/lists/common/schemas/types/entry_list.ts index fcfec5e0cccdf..edf93ebffada0 100644 --- a/x-pack/plugins/lists/common/schemas/types/entry_list.ts +++ b/x-pack/plugins/lists/common/schemas/types/entry_list.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { NonEmptyString } from '../../shared_imports'; diff --git a/x-pack/plugins/lists/common/schemas/types/entry_match.ts b/x-pack/plugins/lists/common/schemas/types/entry_match.ts index 247d64674e27d..50cf2138d1587 100644 --- a/x-pack/plugins/lists/common/schemas/types/entry_match.ts +++ b/x-pack/plugins/lists/common/schemas/types/entry_match.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { NonEmptyString } from '../../shared_imports'; diff --git a/x-pack/plugins/lists/common/schemas/types/entry_match_any.ts b/x-pack/plugins/lists/common/schemas/types/entry_match_any.ts index b6c4ef509c477..cff943b9a1275 100644 --- a/x-pack/plugins/lists/common/schemas/types/entry_match_any.ts +++ b/x-pack/plugins/lists/common/schemas/types/entry_match_any.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { NonEmptyString } from '../../shared_imports'; diff --git a/x-pack/plugins/lists/common/schemas/types/entry_nested.ts b/x-pack/plugins/lists/common/schemas/types/entry_nested.ts index f9e8e4356b811..96653eac81ae7 100644 --- a/x-pack/plugins/lists/common/schemas/types/entry_nested.ts +++ b/x-pack/plugins/lists/common/schemas/types/entry_nested.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ - import * as t from 'io-ts'; import { NonEmptyString } from '../../shared_imports'; diff --git a/x-pack/plugins/lists/public/exceptions/hooks/use_exception_list.ts b/x-pack/plugins/lists/public/exceptions/hooks/use_exception_list.ts index 8097a7b8c5898..50196a1a0bcc7 100644 --- a/x-pack/plugins/lists/public/exceptions/hooks/use_exception_list.ts +++ b/x-pack/plugins/lists/public/exceptions/hooks/use_exception_list.ts @@ -94,6 +94,7 @@ export const useExceptionList = ({ } setLoading(false); } else { + // eslint-disable-next-line @typescript-eslint/naming-convention const { page, per_page, total, data } = await fetchExceptionListsItemsByListIds({ filterOptions: filters, http, diff --git a/x-pack/plugins/lists/public/lists/api.ts b/x-pack/plugins/lists/public/lists/api.ts index 211b2445a0429..2b123280474df 100644 --- a/x-pack/plugins/lists/public/lists/api.ts +++ b/x-pack/plugins/lists/public/lists/api.ts @@ -44,6 +44,7 @@ const findLists = async ({ http, cursor, page, + // eslint-disable-next-line @typescript-eslint/naming-convention per_page, signal, }: ApiParams & FindListSchemaEncoded): Promise => { @@ -82,6 +83,7 @@ export { findListsWithValidation as findLists }; const importList = async ({ file, http, + // eslint-disable-next-line @typescript-eslint/naming-convention list_id, type, signal, @@ -154,6 +156,7 @@ export { deleteListWithValidation as deleteList }; const exportList = async ({ http, + // eslint-disable-next-line @typescript-eslint/naming-convention list_id, signal, }: ApiParams & ExportListItemQuerySchemaEncoded): Promise => diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils.ts b/x-pack/plugins/lists/server/services/exception_lists/utils.ts index 836f642899086..2989a09b0ce00 100644 --- a/x-pack/plugins/lists/server/services/exception_lists/utils.ts +++ b/x-pack/plugins/lists/server/services/exception_lists/utils.ts @@ -70,6 +70,7 @@ export const transformSavedObjectToExceptionList = ({ const { version: _version, attributes: { + /* eslint-disable @typescript-eslint/naming-convention */ _tags, created_at, created_by, @@ -83,6 +84,7 @@ export const transformSavedObjectToExceptionList = ({ type, updated_by, version, + /* eslint-enable @typescript-eslint/naming-convention */ }, id, updated_at: updatedAt, @@ -168,6 +170,7 @@ export const transformSavedObjectToExceptionListItem = ({ const { version: _version, attributes: { + /* eslint-disable @typescript-eslint/naming-convention */ _tags, comments, created_at, @@ -182,6 +185,7 @@ export const transformSavedObjectToExceptionListItem = ({ tie_breaker_id, type, updated_by, + /* eslint-enable @typescript-eslint/naming-convention */ }, id, updated_at: updatedAt, diff --git a/x-pack/plugins/lists/server/services/utils/transform_elastic_to_list_item.ts b/x-pack/plugins/lists/server/services/utils/transform_elastic_to_list_item.ts index 26fe15e9106fe..14794870bf67a 100644 --- a/x-pack/plugins/lists/server/services/utils/transform_elastic_to_list_item.ts +++ b/x-pack/plugins/lists/server/services/utils/transform_elastic_to_list_item.ts @@ -25,6 +25,7 @@ export const transformElasticToListItem = ({ const { _id, _source: { + /* eslint-disable @typescript-eslint/naming-convention */ created_at, deserializer, serializer, @@ -34,6 +35,7 @@ export const transformElasticToListItem = ({ list_id, tie_breaker_id, meta, + /* eslint-enable @typescript-eslint/naming-convention */ }, } = hit; const value = findSourceValue(hit._source); diff --git a/x-pack/plugins/maps/public/actions/map_actions.ts b/x-pack/plugins/maps/public/actions/map_actions.ts index 4914432f02de0..7191fb312b211 100644 --- a/x-pack/plugins/maps/public/actions/map_actions.ts +++ b/x-pack/plugins/maps/public/actions/map_actions.ts @@ -3,8 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/consistent-type-definitions */ - import { Dispatch } from 'redux'; import turfBboxPolygon from '@turf/bbox-polygon'; import turfBooleanContains from '@turf/boolean-contains'; diff --git a/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.test.ts b/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.test.ts index 7954d0c59d97f..2ddbd367baea5 100644 --- a/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.test.ts +++ b/x-pack/plugins/maps/public/classes/layers/tile_layer/tile_layer.test.ts @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -// eslint-disable-next-line max-classes-per-file import { ITileLayerArguments, TileLayer } from './tile_layer'; import { SOURCE_TYPES } from '../../../../common/constants'; import { XYZTMSSourceDescriptor } from '../../../../common/descriptor_types'; diff --git a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/convert_to_geojson.test.ts b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/convert_to_geojson.test.ts index e79d8e09fce9b..523cc86915010 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/convert_to_geojson.test.ts +++ b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/convert_to_geojson.test.ts @@ -53,6 +53,7 @@ describe('convertCompositeRespToGeoJson', () => { avg_of_bytes: 5359.2307692307695, doc_count: 65, 'terms_of_machine.os.keyword': 'win xp', + // eslint-disable-next-line @typescript-eslint/naming-convention 'terms_of_machine.os.keyword__percentage': 25, }, type: 'Feature', @@ -80,6 +81,7 @@ describe('convertCompositeRespToGeoJson', () => { avg_of_bytes: 5359.2307692307695, doc_count: 65, 'terms_of_machine.os.keyword': 'win xp', + // eslint-disable-next-line @typescript-eslint/naming-convention 'terms_of_machine.os.keyword__percentage': 25, }, type: 'Feature', @@ -127,6 +129,7 @@ describe('convertRegularRespToGeoJson', () => { avg_of_bytes: 5359.2307692307695, doc_count: 65, 'terms_of_machine.os.keyword': 'win xp', + // eslint-disable-next-line @typescript-eslint/naming-convention 'terms_of_machine.os.keyword__percentage': 25, }, type: 'Feature', @@ -154,6 +157,7 @@ describe('convertRegularRespToGeoJson', () => { avg_of_bytes: 5359.2307692307695, doc_count: 65, 'terms_of_machine.os.keyword': 'win xp', + // eslint-disable-next-line @typescript-eslint/naming-convention 'terms_of_machine.os.keyword__percentage': 25, }, type: 'Feature', diff --git a/x-pack/plugins/maps/public/classes/sources/es_pew_pew_source/convert_to_lines.test.ts b/x-pack/plugins/maps/public/classes/sources/es_pew_pew_source/convert_to_lines.test.ts index 14c62aa0207fe..23e6c25ac0d04 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_pew_pew_source/convert_to_lines.test.ts +++ b/x-pack/plugins/maps/public/classes/sources/es_pew_pew_source/convert_to_lines.test.ts @@ -19,6 +19,7 @@ const esResponse = { { key: '4/9/3', doc_count: 1, + // eslint-disable-next-line @typescript-eslint/naming-convention terms_of_Carrier: { buckets: [ { @@ -34,6 +35,7 @@ const esResponse = { }, count: 1, }, + // eslint-disable-next-line @typescript-eslint/naming-convention avg_of_FlightDelayMin: { value: 3, }, @@ -59,9 +61,12 @@ it('Should convert elasticsearch aggregation response into feature collection of }, id: '10.39269994944334,43.68389896117151,4/9/3', properties: { + // eslint-disable-next-line @typescript-eslint/naming-convention avg_of_FlightDelayMin: 3, doc_count: 1, + // eslint-disable-next-line @typescript-eslint/naming-convention terms_of_Carrier: 'ES-Air', + // eslint-disable-next-line @typescript-eslint/naming-convention terms_of_Carrier__percentage: 100, }, type: 'Feature', diff --git a/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_field_config_editor.tsx b/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_field_config_editor.tsx index b2a93a4ef88ad..080138839ba2e 100644 --- a/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_field_config_editor.tsx +++ b/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_field_config_editor.tsx @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/consistent-type-definitions */ import React, { ChangeEvent, Component, Fragment } from 'react'; import { diff --git a/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source_editor.tsx b/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source_editor.tsx index 49487e96a4544..72fe2d9a90a71 100644 --- a/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source_editor.tsx +++ b/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source_editor.tsx @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/consistent-type-definitions */ import React, { Component, ChangeEvent } from 'react'; import _ from 'lodash'; diff --git a/x-pack/plugins/maps/public/classes/styles/vector/components/legend/symbol_icon.tsx b/x-pack/plugins/maps/public/classes/styles/vector/components/legend/symbol_icon.tsx index c5d41ae2b1a9b..839f7a42eb9d6 100644 --- a/x-pack/plugins/maps/public/classes/styles/vector/components/legend/symbol_icon.tsx +++ b/x-pack/plugins/maps/public/classes/styles/vector/components/legend/symbol_icon.tsx @@ -55,12 +55,7 @@ export class SymbolIcon extends Component { return null; } - const { - symbolId, // eslint-disable-line no-unused-vars - fill, // eslint-disable-line no-unused-vars - stroke, // eslint-disable-line no-unused-vars - ...rest - } = this.props; + const { symbolId, fill, stroke, ...rest } = this.props; return ( extends IStyleProperty { getValueSuggestions(query: string): Promise; } -type fieldFormatter = (value: string | number | undefined) => string | number; +type FieldFormatter = (value: string | number | undefined) => string | number; export class DynamicStyleProperty extends AbstractStyleProperty implements IDynamicStyleProperty { @@ -56,14 +55,14 @@ export class DynamicStyleProperty extends AbstractStyleProperty protected readonly _field: IField | null; protected readonly _layer: IVectorLayer; - protected readonly _getFieldFormatter: (fieldName: string) => null | fieldFormatter; + protected readonly _getFieldFormatter: (fieldName: string) => null | FieldFormatter; constructor( options: T, styleName: VECTOR_STYLES, field: IField | null, vectorLayer: IVectorLayer, - getFieldFormatter: (fieldName: string) => null | fieldFormatter + getFieldFormatter: (fieldName: string) => null | FieldFormatter ) { super(options, styleName); this._field = field; diff --git a/x-pack/plugins/maps/public/classes/util/es_agg_utils.test.ts b/x-pack/plugins/maps/public/classes/util/es_agg_utils.test.ts index 445a7621194b7..b51f48fe62157 100644 --- a/x-pack/plugins/maps/public/classes/util/es_agg_utils.test.ts +++ b/x-pack/plugins/maps/public/classes/util/es_agg_utils.test.ts @@ -34,6 +34,7 @@ describe('extractPropertiesFromBucket', () => { expect(properties).toEqual({ doc_count: 3, 'terms_of_machine.os.keyword': 'win xp', + // eslint-disable-next-line @typescript-eslint/naming-convention 'terms_of_machine.os.keyword__percentage': 33, }); }); diff --git a/x-pack/plugins/maps/public/components/tooltip_selector/tooltip_selector.tsx b/x-pack/plugins/maps/public/components/tooltip_selector/tooltip_selector.tsx index 6c07c322d5c49..84316a1b9105d 100644 --- a/x-pack/plugins/maps/public/components/tooltip_selector/tooltip_selector.tsx +++ b/x-pack/plugins/maps/public/components/tooltip_selector/tooltip_selector.tsx @@ -176,7 +176,9 @@ export class TooltipSelector extends Component { {(provided, state) => (
    diff --git a/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/flyout_body.tsx b/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/flyout_body.tsx index 3f493ef7d4355..f7de84a9c1ad0 100644 --- a/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/flyout_body.tsx +++ b/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/flyout_body.tsx @@ -9,7 +9,6 @@ import { EuiButtonEmpty, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { LayerWizardSelect } from './layer_wizard_select'; import { LayerWizard, RenderWizardArguments } from '../../../classes/layers/layer_wizard_registry'; -/* eslint-disable @typescript-eslint/consistent-type-definitions */ type Props = RenderWizardArguments & { layerWizard: LayerWizard | null; diff --git a/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/layer_wizard_select.test.tsx b/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/layer_wizard_select.test.tsx index e802c5259e5ed..d64e38cf49dea 100644 --- a/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/layer_wizard_select.test.tsx +++ b/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/layer_wizard_select.test.tsx @@ -17,6 +17,7 @@ const defaultProps = { describe('LayerWizardSelect', () => { beforeAll(() => { + // eslint-disable-next-line @typescript-eslint/no-var-requires require('../../../classes/layers/layer_wizard_registry').getLayerWizards = async () => { return [ { diff --git a/x-pack/plugins/maps/public/index_pattern_util.test.ts b/x-pack/plugins/maps/public/index_pattern_util.test.ts index 27b0a4aac9bf7..ffcc6da52677a 100644 --- a/x-pack/plugins/maps/public/index_pattern_util.test.ts +++ b/x-pack/plugins/maps/public/index_pattern_util.test.ts @@ -68,6 +68,7 @@ describe('Gold+ licensing', () => { describe('basic license', () => { beforeEach(() => { + // eslint-disable-next-line @typescript-eslint/no-var-requires require('./kibana_services').getIsGoldPlus = () => false; }); @@ -90,6 +91,7 @@ describe('Gold+ licensing', () => { describe('gold license', () => { beforeEach(() => { + // eslint-disable-next-line @typescript-eslint/no-var-requires require('./kibana_services').getIsGoldPlus = () => true; }); describe('getAggregatableGeoFieldTypes', () => { diff --git a/x-pack/plugins/maps_legacy_licensing/public/plugin.ts b/x-pack/plugins/maps_legacy_licensing/public/plugin.ts index 69c25efd96e75..eaf527f856bc5 100644 --- a/x-pack/plugins/maps_legacy_licensing/public/plugin.ts +++ b/x-pack/plugins/maps_legacy_licensing/public/plugin.ts @@ -13,7 +13,6 @@ import { LicensingPluginSetup, ILicense } from '../../licensing/public'; * @public */ -// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface MapsLegacyLicensingSetupDependencies { licensing: LicensingPluginSetup; mapsLegacy: any; diff --git a/x-pack/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx b/x-pack/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx index a354612a348dc..07e33a43d3ff9 100644 --- a/x-pack/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx +++ b/x-pack/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx @@ -69,7 +69,7 @@ const Tooltip: FC<{ service: ChartTooltipService }> = React.memo(({ service }) = .slice(1) .map(({ label, value, color, isHighlighted, seriesIdentifier, valueAccessor }) => { const classes = classNames('mlChartTooltip__item', { - /* eslint @typescript-eslint/camelcase:0 */ + // eslint-disable-next-line @typescript-eslint/naming-convention echTooltip__rowHighlighted: isHighlighted, }); return ( diff --git a/x-pack/plugins/ml/public/application/components/data_grid/column_chart.tsx b/x-pack/plugins/ml/public/application/components/data_grid/column_chart.tsx index 00e2d5b14a96b..a3a67fbb8bb75 100644 --- a/x-pack/plugins/ml/public/application/components/data_grid/column_chart.tsx +++ b/x-pack/plugins/ml/public/application/components/data_grid/column_chart.tsx @@ -61,6 +61,7 @@ export const ColumnChart: FC = ({ chartData, columnType, dataTestSubj }) )}
    { setVisibleColumns(defaultVisibleColumns); - // eslint-disable-next-line react-hooks/exhaustive-deps }, [defaultVisibleColumns.join()]); const [invalidSortingColumnns, setInvalidSortingColumnns] = useState([]); diff --git a/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts b/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts index 3bc3b8c2c6dfd..e3da9b509e620 100644 --- a/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts +++ b/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts @@ -23,6 +23,5 @@ interface StartPlugins { } export type StartServices = CoreStart & StartPlugins & { kibanaVersion: string } & MlServicesContext; -// eslint-disable-next-line react-hooks/rules-of-hooks export const useMlKibana = () => useKibana(); export type MlKibanaReactContextValue = KibanaReactContextValue; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/common/fields.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/common/fields.ts index 1b28875a624f8..1b99aac812fcd 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/common/fields.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/common/fields.ts @@ -47,6 +47,7 @@ export const EXTENDED_NUMERICAL_TYPES = new Set([ ES_FIELD_TYPES.SCALED_FLOAT, ]); +// eslint-disable-next-line @typescript-eslint/naming-convention export const ML__ID_COPY = 'ml__id_copy'; export const isKeywordAndTextType = (fieldName: string): boolean => { diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/analysis_fields_table.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/analysis_fields_table.tsx index a229a79d316d7..a52cbb99d7f48 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/analysis_fields_table.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/analysis_fields_table.tsx @@ -54,7 +54,7 @@ const columns = [ id: 'is_included', alignment: LEFT_ALIGNMENT, isSortable: true, - // eslint-disable-next-line @typescript-eslint/camelcase + // eslint-disable-next-line @typescript-eslint/naming-convention render: ({ is_included }: { is_included: boolean }) => (is_included ? 'Yes' : 'No'), }, { @@ -64,7 +64,7 @@ const columns = [ id: 'is_required', alignment: LEFT_ALIGNMENT, isSortable: true, - // eslint-disable-next-line @typescript-eslint/camelcase + // eslint-disable-next-line @typescript-eslint/naming-convention render: ({ is_required }: { is_required: boolean }) => (is_required ? 'Yes' : 'No'), }, { diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts index 2cecffc993257..eab5165a42137 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts @@ -63,7 +63,6 @@ export const useIndexData = ( useEffect(() => { resetPagination(); // custom comparison - // eslint-disable-next-line react-hooks/exhaustive-deps }, [JSON.stringify(query)]); const getIndexData = async function () { @@ -103,7 +102,6 @@ export const useIndexData = ( useEffect(() => { getIndexData(); // custom comparison - // eslint-disable-next-line react-hooks/exhaustive-deps }, [indexPattern.title, JSON.stringify([query, pagination, sortingColumns])]); const dataLoader = useMemo(() => new DataLoader(indexPattern, toastNotifications), [ @@ -132,7 +130,6 @@ export const useIndexData = ( fetchColumnChartsData(); } // custom comparison - // eslint-disable-next-line react-hooks/exhaustive-deps }, [ dataGrid.chartsVisible, indexPattern.title, diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts index 98dd40986e32b..8d53214d23d47 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts @@ -70,7 +70,6 @@ export const useExplorationResults = ( useEffect(() => { getIndexData(jobConfig, dataGrid, searchQuery); // custom comparison - // eslint-disable-next-line react-hooks/exhaustive-deps }, [jobConfig && jobConfig.id, dataGrid.pagination, searchQuery, dataGrid.sortingColumns]); const dataLoader = useMemo( @@ -103,7 +102,6 @@ export const useExplorationResults = ( fetchColumnChartsData(); } // custom comparison - // eslint-disable-next-line react-hooks/exhaustive-deps }, [ dataGrid.chartsVisible, jobConfig?.dest.index, diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx index 4c4731d0dad5f..2b1c40f0eb734 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx @@ -56,7 +56,6 @@ export const OutlierExploration: FC = React.memo(({ jobId }) = const { columnsWithCharts, errorMessage, status, tableItems } = outlierData; - /* eslint-disable-next-line react-hooks/rules-of-hooks */ const colorRange = useColorRange( COLOR_RANGE.BLUE, COLOR_RANGE_SCALE.INFLUENCER, diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts index 90294a09c0adc..24649ae5f1e71 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts @@ -77,7 +77,6 @@ export const useOutlierData = ( useEffect(() => { getIndexData(jobConfig, dataGrid, searchQuery); // custom comparison - // eslint-disable-next-line react-hooks/exhaustive-deps }, [jobConfig && jobConfig.id, dataGrid.pagination, searchQuery, dataGrid.sortingColumns]); const dataLoader = useMemo( @@ -112,7 +111,6 @@ export const useOutlierData = ( fetchColumnChartsData(); } // custom comparison - // eslint-disable-next-line react-hooks/exhaustive-deps }, [ dataGrid.chartsVisible, jobConfig?.dest.index, diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/regression_exploration/evaluate_panel.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/regression_exploration/evaluate_panel.tsx index 75c41c097192e..895d217555ef4 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/regression_exploration/evaluate_panel.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/regression_exploration/evaluate_panel.tsx @@ -94,6 +94,7 @@ export const EvaluatePanel: FC = ({ jobConfig, jobStatus, searchQuery }) genErrorEval.eval && isRegressionEvaluateResponse(genErrorEval.eval) ) { + // eslint-disable-next-line @typescript-eslint/naming-convention const { mse, msle, huber, r_squared } = getValuesFromResponse(genErrorEval.eval); setGeneralizationEval({ mse, @@ -131,6 +132,7 @@ export const EvaluatePanel: FC = ({ jobConfig, jobStatus, searchQuery }) trainingErrorEval.eval && isRegressionEvaluateResponse(trainingErrorEval.eval) ) { + // eslint-disable-next-line @typescript-eslint/naming-convention const { mse, msle, huber, r_squared } = getValuesFromResponse(trainingErrorEval.eval); setTrainingEval({ mse, diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_button.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_button.tsx index 010aa7b8513b5..d78e1bcc1a913 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_button.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_button.tsx @@ -314,6 +314,7 @@ export type CloneDataFrameAnalyticsConfig = Omit< export function extractCloningConfig({ id, version, + // eslint-disable-next-line @typescript-eslint/naming-convention create_time, ...configToClone }: DeepReadonly): CloneDataFrameAnalyticsConfig { diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/expanded_row.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/expanded_row.tsx index 5276fedff0fde..645c6c276a6f9 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/expanded_row.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/expanded_row.tsx @@ -95,6 +95,7 @@ export const ExpandedRow: FC = ({ item }) => { genErrorEval.eval && isRegressionEvaluateResponse(genErrorEval.eval) ) { + // eslint-disable-next-line @typescript-eslint/naming-convention const { mse, msle, huber, r_squared } = getValuesFromResponse(genErrorEval.eval); setGeneralizationEval({ mse, @@ -129,6 +130,7 @@ export const ExpandedRow: FC = ({ item }) => { trainingErrorEval.eval && isRegressionEvaluateResponse(trainingErrorEval.eval) ) { + // eslint-disable-next-line @typescript-eslint/naming-convention const { mse, msle, huber, r_squared } = getValuesFromResponse(trainingErrorEval.eval); setTrainingEval({ mse, diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts index 69599f43ef297..f932e4d0db7d7 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts @@ -18,7 +18,6 @@ import { CloneDataFrameAnalyticsConfig } from '../../components/action_clone'; export enum DEFAULT_MODEL_MEMORY_LIMIT { regression = '100mb', - // eslint-disable-next-line @typescript-eslint/camelcase outlier_detection = '50mb', classification = '100mb', } diff --git a/x-pack/plugins/ml/public/application/services/results_service/index.ts b/x-pack/plugins/ml/public/application/services/results_service/index.ts index 6c508422e7063..5547c4096e3de 100644 --- a/x-pack/plugins/ml/public/application/services/results_service/index.ts +++ b/x-pack/plugins/ml/public/application/services/results_service/index.ts @@ -10,9 +10,9 @@ import { ml, MlApiServices } from '../ml_api_service'; export type MlResultsService = typeof mlResultsService; -type time = string; +type Time = string; export interface ModelPlotOutputResults { - results: Record; + results: Record; } export interface CriteriaField { diff --git a/x-pack/plugins/ml/public/application/util/custom_url_utils.test.ts b/x-pack/plugins/ml/public/application/util/custom_url_utils.test.ts index 428060dd2c31b..2912aad6819cf 100644 --- a/x-pack/plugins/ml/public/application/util/custom_url_utils.test.ts +++ b/x-pack/plugins/ml/public/application/util/custom_url_utils.test.ts @@ -211,7 +211,6 @@ describe('ML - custom URL utils', () => { ); }); - // eslint-disable-next-line ban/ban test('truncates long queries', () => { const TEST_DOC_WITH_METHOD: AnomalyRecordDoc = { ...TEST_DOC, diff --git a/x-pack/plugins/monitoring/public/alerts/panel.tsx b/x-pack/plugins/monitoring/public/alerts/panel.tsx index 91a426cc8798e..91604acf115fa 100644 --- a/x-pack/plugins/monitoring/public/alerts/panel.tsx +++ b/x-pack/plugins/monitoring/public/alerts/panel.tsx @@ -23,7 +23,6 @@ import { AlertMessage } from '../../server/alerts/types'; import { Legacy } from '../legacy_shims'; import { replaceTokens } from './lib/replace_tokens'; import { AlertsContextProvider } from '../../../triggers_actions_ui/public'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { AlertEdit } from '../../../triggers_actions_ui/public'; import { isInSetupMode, hideBottomBar, showBottomBar } from '../lib/setup_mode'; import { BASE_ALERT_API_PATH } from '../../../alerts/common'; diff --git a/x-pack/plugins/monitoring/public/lib/setup_mode.tsx b/x-pack/plugins/monitoring/public/lib/setup_mode.tsx index b99093a3d8ad1..3425e0ee2a818 100644 --- a/x-pack/plugins/monitoring/public/lib/setup_mode.tsx +++ b/x-pack/plugins/monitoring/public/lib/setup_mode.tsx @@ -110,7 +110,7 @@ export const updateSetupModeData = async (uuid?: string, fetchWithoutClusterUuid text, }); }); - return toggleSetupMode(false); // eslint-disable-line no-use-before-define + return toggleSetupMode(false); } notifySetupModeDataChange(); @@ -160,7 +160,7 @@ export const toggleSetupMode = (inSetupMode: boolean) => { setupModeState.enabled = inSetupMode; globalState.inSetupMode = inSetupMode; globalState.save(); - setSetupModeMenuItem(); // eslint-disable-line no-use-before-define + setSetupModeMenuItem(); notifySetupModeDataChange(); if (inSetupMode) { diff --git a/x-pack/plugins/monitoring/server/telemetry_collection/get_kibana_stats.ts b/x-pack/plugins/monitoring/server/telemetry_collection/get_kibana_stats.ts index 45df56b2139ff..e87c8398ad0b0 100644 --- a/x-pack/plugins/monitoring/server/telemetry_collection/get_kibana_stats.ts +++ b/x-pack/plugins/monitoring/server/telemetry_collection/get_kibana_stats.ts @@ -104,9 +104,11 @@ export function getUsageStats(rawStats: SearchResponse) { dashboard, visualization, search, + /* eslint-disable @typescript-eslint/naming-convention */ index_pattern, graph_workspace, timelion_sheet, + /* eslint-enable @typescript-eslint/naming-convention */ xpack, ...pluginsTop } = currUsage; diff --git a/x-pack/plugins/observability/public/data_handler.ts b/x-pack/plugins/observability/public/data_handler.ts index 834d7a52d767f..b0bdcf17b9066 100644 --- a/x-pack/plugins/observability/public/data_handler.ts +++ b/x-pack/plugins/observability/public/data_handler.ts @@ -40,7 +40,6 @@ export async function fetchHasData(): Promise> return result.value; } - // eslint-disable-next-line no-console console.error('Error while fetching has data', result.reason); return false; }); diff --git a/x-pack/plugins/observability/public/hooks/use_route_params.tsx b/x-pack/plugins/observability/public/hooks/use_route_params.tsx index 93a79bfda7fc1..1b32933eec3e6 100644 --- a/x-pack/plugins/observability/public/hooks/use_route_params.tsx +++ b/x-pack/plugins/observability/public/hooks/use_route_params.tsx @@ -36,12 +36,10 @@ export function useRouteParams(params: Params) { const queryResult = rts.queryRt.decode(queryParams); const pathResult = rts.pathRt.decode(pathParams); if (isLeft(queryResult)) { - // eslint-disable-next-line no-console console.error(PathReporter.report(queryResult)[0]); } if (isLeft(pathResult)) { - // eslint-disable-next-line no-console console.error(PathReporter.report(pathResult)[0]); } diff --git a/x-pack/plugins/observability/public/services/get_news_feed.ts b/x-pack/plugins/observability/public/services/get_news_feed.ts index 3a6e60fa74188..af8d062154e2d 100644 --- a/x-pack/plugins/observability/public/services/get_news_feed.ts +++ b/x-pack/plugins/observability/public/services/get_news_feed.ts @@ -20,7 +20,6 @@ export async function getNewsFeed({ core }: { core: AppMountContext['core'] }): try { return await core.http.get('https://feeds.elastic.co/observability-solution/v8.0.0.json'); } catch (e) { - // eslint-disable-next-line no-console console.error('Error while fetching news feed', e); return { items: [] }; } diff --git a/x-pack/plugins/observability/public/services/get_observability_alerts.ts b/x-pack/plugins/observability/public/services/get_observability_alerts.ts index fe5451597688a..602e4cf2bdd13 100644 --- a/x-pack/plugins/observability/public/services/get_observability_alerts.ts +++ b/x-pack/plugins/observability/public/services/get_observability_alerts.ts @@ -23,7 +23,6 @@ export async function getObservabilityAlerts({ core }: { core: AppMountContext[' return data.filter(({ consumer }) => allowedConsumers.includes(consumer)); } catch (e) { - // eslint-disable-next-line no-console console.error('Error while fetching alerts', e); return []; } diff --git a/x-pack/plugins/oss_telemetry/server/test_utils/index.ts b/x-pack/plugins/oss_telemetry/server/test_utils/index.ts index 3eee1978d4f1c..9201899d5a161 100644 --- a/x-pack/plugins/oss_telemetry/server/test_utils/index.ts +++ b/x-pack/plugins/oss_telemetry/server/test_utils/index.ts @@ -13,7 +13,6 @@ import { ConcreteTaskInstance, TaskStatus, TaskManagerStartContract, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '../../../task_manager/server'; export const getMockTaskInstance = ( diff --git a/x-pack/plugins/painless_lab/public/application/components/main_controls.tsx b/x-pack/plugins/painless_lab/public/application/components/main_controls.tsx index 7018cfd27c509..4d44ae0176103 100644 --- a/x-pack/plugins/painless_lab/public/application/components/main_controls.tsx +++ b/x-pack/plugins/painless_lab/public/application/components/main_controls.tsx @@ -93,6 +93,7 @@ export function MainControls({ let classes = ''; if (isNavLegacy) { classes = classNames('painlessLab__bottomBar', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'painlessLab__bottomBar-isNavDrawerLocked': isNavDrawerLocked, }); } diff --git a/x-pack/plugins/painless_lab/public/links.ts b/x-pack/plugins/painless_lab/public/links.ts index 8f610140c3f34..c3a6ab5fafabf 100644 --- a/x-pack/plugins/painless_lab/public/links.ts +++ b/x-pack/plugins/painless_lab/public/links.ts @@ -8,6 +8,7 @@ import { DocLinksStart } from 'src/core/public'; export type Links = ReturnType; +// eslint-disable-next-line @typescript-eslint/naming-convention export const getLinks = ({ DOC_LINK_VERSION, ELASTIC_WEBSITE_URL }: DocLinksStart) => Object.freeze({ painlessExecuteAPI: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-execute-api.html`, diff --git a/x-pack/plugins/reporting/public/lib/job_completion_notifications.ts b/x-pack/plugins/reporting/public/lib/job_completion_notifications.ts index 99f3773856325..06694361b757d 100644 --- a/x-pack/plugins/reporting/public/lib/job_completion_notifications.ts +++ b/x-pack/plugins/reporting/public/lib/job_completion_notifications.ts @@ -6,7 +6,7 @@ import { JOB_COMPLETION_NOTIFICATIONS_SESSION_KEY } from '../../constants'; -type jobId = string; +type JobId = string; const set = (jobs: any) => { sessionStorage.setItem(JOB_COMPLETION_NOTIFICATIONS_SESSION_KEY, JSON.stringify(jobs)); @@ -17,13 +17,13 @@ const getAll = () => { return sessionValue ? JSON.parse(sessionValue) : []; }; -export const add = (jobId: jobId) => { +export const add = (jobId: JobId) => { const jobs = getAll(); jobs.push(jobId); set(jobs); }; -export const remove = (jobId: jobId) => { +export const remove = (jobId: JobId) => { const jobs = getAll(); const index = jobs.indexOf(jobId); diff --git a/x-pack/plugins/reporting/public/panel_actions/get_csv_panel_action.test.ts b/x-pack/plugins/reporting/public/panel_actions/get_csv_panel_action.test.ts index f07235742a1d3..b97a56c15fb4d 100644 --- a/x-pack/plugins/reporting/public/panel_actions/get_csv_panel_action.test.ts +++ b/x-pack/plugins/reporting/public/panel_actions/get_csv_panel_action.test.ts @@ -9,7 +9,7 @@ import { first } from 'rxjs/operators'; import { LicensingPluginSetup } from '../../../licensing/public'; import { GetCsvReportPanelAction } from './get_csv_panel_action'; -type licenseResults = 'valid' | 'invalid' | 'unavailable' | 'expired'; +type LicenseResults = 'valid' | 'invalid' | 'unavailable' | 'expired'; describe('GetCsvReportPanelAction', () => { let core: any; @@ -27,7 +27,7 @@ describe('GetCsvReportPanelAction', () => { }); beforeEach(() => { - mockLicense$ = (state: licenseResults = 'valid') => { + mockLicense$ = (state: LicenseResults = 'valid') => { return (of({ check: jest.fn().mockImplementation(() => ({ state })), }) as unknown) as LicensingPluginSetup['license$']; diff --git a/x-pack/plugins/reporting/server/export_types/common/validate_urls.test.ts b/x-pack/plugins/reporting/server/export_types/common/validate_urls.test.ts index 5e576e13c0227..5464f3d6dd505 100644 --- a/x-pack/plugins/reporting/server/export_types/common/validate_urls.test.ts +++ b/x-pack/plugins/reporting/server/export_types/common/validate_urls.test.ts @@ -35,6 +35,7 @@ describe('Validate URLS', () => { }); it(`throws for JS URLs`, () => { + // eslint-disable-next-line no-script-url expect(() => validateUrls(['javascript:alert(document.cookies)'])).toThrow(); }); diff --git a/x-pack/plugins/reporting/server/lib/screenshots/observable.test.ts b/x-pack/plugins/reporting/server/lib/screenshots/observable.test.ts index 0ad41cd904853..b25e8fab3abcf 100644 --- a/x-pack/plugins/reporting/server/lib/screenshots/observable.test.ts +++ b/x-pack/plugins/reporting/server/lib/screenshots/observable.test.ts @@ -16,7 +16,6 @@ jest.mock('../../browsers/chromium/puppeteer', () => ({ })); import * as Rx from 'rxjs'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { loggingSystemMock } from '../../../../../../src/core/server/mocks'; import { HeadlessChromiumDriver } from '../../browsers'; import { LevelLogger } from '../'; diff --git a/x-pack/plugins/reporting/server/routes/generation.test.ts b/x-pack/plugins/reporting/server/routes/generation.test.ts index c73c443d2390b..87a696948ad84 100644 --- a/x-pack/plugins/reporting/server/routes/generation.test.ts +++ b/x-pack/plugins/reporting/server/routes/generation.test.ts @@ -15,12 +15,12 @@ import { createMockReportingCore } from '../test_helpers'; import { createMockLevelLogger } from '../test_helpers/create_mock_levellogger'; import { registerJobGenerationRoutes } from './generation'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; describe('POST /api/reporting/generate', () => { const reportingSymbol = Symbol('reporting'); - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; let mockExportTypesRegistry: ExportTypesRegistry; let callClusterStub: any; let core: ReportingCore; diff --git a/x-pack/plugins/reporting/server/routes/jobs.test.ts b/x-pack/plugins/reporting/server/routes/jobs.test.ts index a0e3379da12be..2957bc76f4682 100644 --- a/x-pack/plugins/reporting/server/routes/jobs.test.ts +++ b/x-pack/plugins/reporting/server/routes/jobs.test.ts @@ -16,12 +16,12 @@ import { createMockReportingCore } from '../test_helpers'; import { ExportTypeDefinition } from '../types'; import { registerJobInfoRoutes } from './jobs'; -type setupServerReturn = UnwrapPromise>; +type SetupServerReturn = UnwrapPromise>; describe('GET /api/reporting/jobs/download', () => { const reportingSymbol = Symbol('reporting'); - let server: setupServerReturn['server']; - let httpSetup: setupServerReturn['httpSetup']; + let server: SetupServerReturn['server']; + let httpSetup: SetupServerReturn['httpSetup']; let exportTypesRegistry: ExportTypesRegistry; let core: ReportingCore; diff --git a/x-pack/plugins/reporting/server/test_helpers/create_mock_server.ts b/x-pack/plugins/reporting/server/test_helpers/create_mock_server.ts index 01b9f6cbd9cd6..078d153cff18d 100644 --- a/x-pack/plugins/reporting/server/test_helpers/create_mock_server.ts +++ b/x-pack/plugins/reporting/server/test_helpers/create_mock_server.ts @@ -6,7 +6,6 @@ // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { createHttpServer, createCoreContext } from 'src/core/server/http/test_utils'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { coreMock } from 'src/core/server/mocks'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ContextService } from 'src/core/server/context/context_service'; diff --git a/x-pack/plugins/rollup/server/lib/format_es_error.ts b/x-pack/plugins/rollup/server/lib/format_es_error.ts index 9dde027cd6949..0f00bfb0c1e7c 100644 --- a/x-pack/plugins/rollup/server/lib/format_es_error.ts +++ b/x-pack/plugins/rollup/server/lib/format_es_error.ts @@ -8,13 +8,12 @@ function extractCausedByChain( causedBy: Record = {}, accumulator: string[] = [] ): string[] { - const { reason, caused_by } = causedBy; // eslint-disable-line @typescript-eslint/camelcase + const { reason, caused_by } = causedBy; // eslint-disable-line @typescript-eslint/naming-convention if (reason) { accumulator.push(reason); } - // eslint-disable-next-line @typescript-eslint/camelcase if (caused_by) { return extractCausedByChain(caused_by, accumulator); } @@ -36,8 +35,8 @@ export function wrapEsError( const { error: { - root_cause = [], // eslint-disable-line @typescript-eslint/camelcase - caused_by = undefined, // eslint-disable-line @typescript-eslint/camelcase + root_cause = [], // eslint-disable-line @typescript-eslint/naming-convention + caused_by = undefined, // eslint-disable-line @typescript-eslint/naming-convention } = {}, } = JSON.parse(response); diff --git a/x-pack/plugins/searchprofiler/public/application/components/percentage_badge.tsx b/x-pack/plugins/searchprofiler/public/application/components/percentage_badge.tsx index e39e37e8656db..700b6f85f4db8 100644 --- a/x-pack/plugins/searchprofiler/public/application/components/percentage_badge.tsx +++ b/x-pack/plugins/searchprofiler/public/application/components/percentage_badge.tsx @@ -24,7 +24,9 @@ export const PercentageBadge = ({ timePercentage, label, valueType = 'percent' } return ( { }); test('defaults max signals to 100', () => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { max_signals, ...noMaxSignals } = getAddPrepackagedRulesSchemaMock(); const payload: AddPrepackagedRulesSchema = { ...noMaxSignals, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_schema.test.ts index c2c2f4784f2b5..56bc68a275ee4 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_schema.test.ts @@ -1298,6 +1298,7 @@ describe('create rules schema', () => { }); test('defaults max signals to 100', () => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { max_signals, ...noMaxSignals } = getCreateRulesSchemaMock(); const payload: CreateRulesSchema = { ...noMaxSignals, @@ -1453,6 +1454,7 @@ describe('create rules schema', () => { }); test('it generates a uuid v4 whenever you omit the rule_id', () => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { rule_id, ...noRuleId } = getCreateRulesSchemaMock(); const decoded = createRulesSchema.decode(noRuleId); const checked = exactCheck(noRuleId, decoded); diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_schema.ts index 308b3c24010fb..7b6b98383cc33 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_schema.ts @@ -6,7 +6,6 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { description, anomaly_threshold, @@ -47,7 +46,6 @@ import { RiskScoreMapping, SeverityMapping, } from '../common/schemas'; -/* eslint-enable @typescript-eslint/camelcase */ import { DefaultStringArray, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.ts index 75fa2da92b787..3874ff8ec90eb 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.ts @@ -6,9 +6,7 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { rule_id, FileName, ExcludeExportDetails } from '../common/schemas'; -/* eslint-enable @typescript-eslint/camelcase */ import { DefaultExportFileName } from '../types/default_export_file_name'; import { DefaultStringBooleanFalse } from '../types/default_string_boolean_false'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.ts index 87076803c9582..2e008c2b7401d 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.ts @@ -6,11 +6,9 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { queryFilter, fields, sort_field, sort_order, PerPage, Page } from '../common/schemas'; import { DefaultPerPage } from '../types/default_per_page'; import { DefaultPage } from '../types/default_page'; -/* eslint-enable @typescript-eslint/camelcase */ export const findRulesSchema = t.exact( t.partial({ diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.test.ts index 00a3f2126f44a..db2e9acc4615f 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.test.ts @@ -681,6 +681,7 @@ describe('import rules schema', () => { }); test('defaults max signals to 100', () => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { max_signals, ...noMaxSignals } = getImportRulesSchemaMock(); const payload: ImportRulesSchema = { ...noMaxSignals, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.ts index d141ca56828b6..698716fea696e 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.ts @@ -6,7 +6,6 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { description, anomaly_threshold, @@ -53,7 +52,6 @@ import { RiskScoreMapping, SeverityMapping, } from '../common/schemas'; -/* eslint-enable @typescript-eslint/camelcase */ import { DefaultStringArray, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.ts index dd325c1a5034f..a674ac86af87b 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.ts @@ -6,7 +6,6 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { description, anomaly_threshold, @@ -49,7 +48,6 @@ import { severity_mapping, } from '../common/schemas'; import { listArrayOrUndefined } from '../types/lists'; -/* eslint-enable @typescript-eslint/camelcase */ /** * All of the patch elements should default to undefined if not set diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_schema.ts index cb8f21128b052..5d6bc5be6b75a 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_schema.ts @@ -6,9 +6,7 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { rule_id, id } from '../common/schemas'; -/* eslint-enable @typescript-eslint/camelcase */ export const queryRulesSchema = t.exact( t.partial({ diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_schema.ts index 0e922aeaf8cdf..1464896e50294 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_schema.ts @@ -6,9 +6,7 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { signal_ids, signal_status_query, status } from '../common/schemas'; -/* eslint-enable @typescript-eslint/camelcase */ export const setSignalsStatusSchema = t.intersection([ t.type({ diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_schema.test.ts index 024198d783048..1cbd3b99c27d7 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_schema.test.ts @@ -664,6 +664,7 @@ describe('update rules schema', () => { }); test('defaults max signals to 100', () => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { max_signals, ...noMaxSignals } = getUpdateRulesSchemaMock(); const payload: UpdateRulesSchema = { ...noMaxSignals, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_schema.ts index 4f284eedef3fd..1299dada065e1 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_schema.ts @@ -6,7 +6,6 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { description, anomaly_threshold, @@ -49,7 +48,6 @@ import { RiskScoreMapping, SeverityMapping, } from '../common/schemas'; -/* eslint-enable @typescript-eslint/camelcase */ import { DefaultStringArray, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.ts index 986d3ad87ec85..b07fb9cc19b7b 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.ts @@ -6,9 +6,7 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { rule_id, status_code, message } from '../common/schemas'; -/* eslint-enable @typescript-eslint/camelcase */ // We use id: t.string intentionally and _never_ the id from global schemas as // sometimes echo back out the id that the user gave us and it is not guaranteed diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.ts index adea77e7b933f..1131dee0aa8a2 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.ts @@ -6,10 +6,8 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { success, success_count } from '../common/schemas'; import { errorSchema } from './error_schema'; -/* eslint-enable @typescript-eslint/camelcase */ export const importRulesSchema = t.exact( t.type({ diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.ts index 73d144500e003..5e8da6bfcea0b 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.ts @@ -6,14 +6,12 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { rules_installed, rules_updated, timelines_installed, timelines_updated, } from '../common/schemas'; -/* eslint-enable @typescript-eslint/camelcase */ const prePackagedRulesSchema = t.type({ rules_installed, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.ts index aabdbdd7300f4..889241d68eb2a 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.ts @@ -6,7 +6,6 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { rules_installed, rules_custom_installed, @@ -16,7 +15,6 @@ import { timelines_not_installed, timelines_not_updated, } from '../common/schemas'; -/* eslint-enable @typescript-eslint/camelcase */ export const prePackagedTimelinesStatusSchema = t.type({ timelines_installed, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.ts index 4bd18a13e4ebb..04df25d805f9e 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.ts @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase */ import * as t from 'io-ts'; import { isObject } from 'lodash/fp'; import { Either, left, fold } from 'fp-ts/lib/Either'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.ts index d23d4ad2e83d4..c39edbbf76f45 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.ts @@ -6,9 +6,7 @@ import * as t from 'io-ts'; -/* eslint-disable @typescript-eslint/camelcase */ import { timeline_id, type } from '../common/schemas'; -/* eslint-enable @typescript-eslint/camelcase */ /** * Special schema type that is only the type and the timeline_id. diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_max_signals_number.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_max_signals_number.ts index 518af32dcf2b4..642ee1cef9686 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_max_signals_number.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_max_signals_number.ts @@ -6,7 +6,6 @@ import * as t from 'io-ts'; import { Either } from 'fp-ts/lib/Either'; -// eslint-disable-next-line @typescript-eslint/camelcase import { max_signals } from '../common/schemas'; import { DEFAULT_MAX_SIGNALS } from '../../../constants'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_risk_score_mapping_array.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_risk_score_mapping_array.ts index bf88ece913767..d96323018dfec 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_risk_score_mapping_array.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_risk_score_mapping_array.ts @@ -6,7 +6,6 @@ import * as t from 'io-ts'; import { Either } from 'fp-ts/lib/Either'; -// eslint-disable-next-line @typescript-eslint/camelcase import { risk_score_mapping, RiskScoreMapping } from '../common/schemas'; /** diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_severity_mapping_array.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_severity_mapping_array.ts index 56b0ac1b75982..ec8f6b0a3739b 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_severity_mapping_array.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/default_severity_mapping_array.ts @@ -6,7 +6,6 @@ import * as t from 'io-ts'; import { Either } from 'fp-ts/lib/Either'; -// eslint-disable-next-line @typescript-eslint/camelcase import { severity_mapping, SeverityMapping } from '../common/schemas'; /** diff --git a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts index 7c15bc143e0fd..288ff46439645 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts @@ -10,7 +10,7 @@ import { RuleAlertAction } from './types'; export const transformRuleToAlertAction = ({ group, id, - action_type_id, + action_type_id, // eslint-disable-line @typescript-eslint/naming-convention params, }: RuleAlertAction): AlertAction => ({ group, diff --git a/x-pack/plugins/security_solution/common/types/timeline/index.ts b/x-pack/plugins/security_solution/common/types/timeline/index.ts index 98d17fc87f6ce..84a007e322f11 100644 --- a/x-pack/plugins/security_solution/common/types/timeline/index.ts +++ b/x-pack/plugins/security_solution/common/types/timeline/index.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @typescript-eslint/camelcase, @typescript-eslint/no-empty-interface */ - import * as runtimeTypes from 'io-ts'; import { stringEnum, unionWithNullType } from '../../utility_types'; @@ -257,9 +255,9 @@ export const SavedTimelineRuntimeType = runtimeTypes.partial({ updatedBy: unionWithNullType(runtimeTypes.string), }); -export interface SavedTimeline extends runtimeTypes.TypeOf {} +export type SavedTimeline = runtimeTypes.TypeOf; -export interface SavedTimelineNote extends runtimeTypes.TypeOf {} +export type SavedTimelineNote = runtimeTypes.TypeOf; /* * Timeline IDs @@ -317,8 +315,9 @@ export const TimelineSavedToReturnObjectRuntimeType = runtimeTypes.intersection( }), ]); -export interface TimelineSavedObject - extends runtimeTypes.TypeOf {} +export type TimelineSavedObject = runtimeTypes.TypeOf< + typeof TimelineSavedToReturnObjectRuntimeType +>; /** * All Timeline Saved object type with metadata @@ -342,9 +341,8 @@ export const TimelineErrorResponseType = runtimeTypes.type({ message: runtimeTypes.string, }); -export interface TimelineErrorResponse - extends runtimeTypes.TypeOf {} -export interface TimelineResponse extends runtimeTypes.TypeOf {} +export type TimelineErrorResponse = runtimeTypes.TypeOf; +export type TimelineResponse = runtimeTypes.TypeOf; /** * All Timeline Saved object type with metadata @@ -355,8 +353,7 @@ export const AllTimelineSavedObjectRuntimeType = runtimeTypes.type({ data: TimelineSavedToReturnObjectRuntimeType, }); -export interface AllTimelineSavedObject - extends runtimeTypes.TypeOf {} +export type AllTimelineSavedObject = runtimeTypes.TypeOf; /** * Import/export timelines diff --git a/x-pack/plugins/security_solution/public/app/index.tsx b/x-pack/plugins/security_solution/public/app/index.tsx index 0afd945af8597..69bf2549d7439 100644 --- a/x-pack/plugins/security_solution/public/app/index.tsx +++ b/x-pack/plugins/security_solution/public/app/index.tsx @@ -8,7 +8,6 @@ import React from 'react'; import { Store, Action } from 'redux'; import { render, unmountComponentAtNode } from 'react-dom'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { AppMountParameters } from '../../../../../src/core/public'; import { State } from '../common/store'; import { StartServices } from '../types'; diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.tsx index 43922462cd092..e2e3a600a95ff 100644 --- a/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.tsx @@ -52,6 +52,7 @@ interface ConfigureCasesComponentProps { } const ConfigureCasesComponent: React.FC = ({ userCanCrud }) => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { http, triggers_actions_ui, notifications, application, docLinks } = useKibana().services; const [connectorIsValid, setConnectorIsValid] = useState(true); diff --git a/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.tsx index a12611ea27035..66cfb0398b44c 100644 --- a/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.tsx +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.tsx @@ -35,7 +35,6 @@ export const LinkToApp = memo( {children} ) : ( - // eslint-disable-next-line @elastic/eui/href-or-on-click {children} diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.tsx index f6b703b7e622e..bea1eb8f0e17b 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.tsx @@ -33,7 +33,6 @@ import { EmptyNestedEntry, } from '../types'; import { getEntryValue, getExceptionOperatorSelect } from '../helpers'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import exceptionableFields from '../exceptionable_fields.json'; /** diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx index 2b526ede12acf..18d2130dd3811 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx @@ -226,6 +226,7 @@ export const filterExceptionItems = ( export const formatExceptionItemForUpdate = ( exceptionItem: ExceptionListItemSchema ): UpdateExceptionListItemSchema => { + /* eslint-disable @typescript-eslint/naming-convention */ const { created_at, created_by, @@ -233,6 +234,7 @@ export const formatExceptionItemForUpdate = ( tie_breaker_id, updated_at, updated_by, + /* eslint-enable @typescript-eslint/naming-convention */ ...fieldsToUpdate } = exceptionItem; return { diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/index.stories.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/index.stories.tsx index fec7354855935..a540a34b70677 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/index.stories.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item/index.stories.tsx @@ -118,6 +118,7 @@ storiesOf('Components|ExceptionItem', module) ); }) .add('with loadingItemIds', () => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { id, namespace_type, ...rest } = getExceptionListItemSchemaMock(); return ( diff --git a/x-pack/plugins/security_solution/public/common/components/links/index.tsx b/x-pack/plugins/security_solution/public/common/components/links/index.tsx index 4a9ad94d8f36d..2f7aa1b14cfda 100644 --- a/x-pack/plugins/security_solution/public/common/components/links/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/links/index.tsx @@ -311,9 +311,11 @@ const ReputationLinkComponent: React.FC<{ ipReputationLinksSetting ?.slice(0, allItemsLimit) .filter( + // eslint-disable-next-line @typescript-eslint/naming-convention ({ url_template, name }) => !isNil(url_template) && !isNil(name) && !isUrlInvalid(url_template) ) + // eslint-disable-next-line @typescript-eslint/naming-convention .map(({ name, url_template }: { name: string; url_template: string }) => ({ name: isDefaultReputationLink(name) ? defaultNameMapping[name] : name, url_template: url_template.replace(`{{ip}}`, encodeURIComponent(domain)), diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts index 845ef580ddbe2..a10e4cf568dd1 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts @@ -6,7 +6,6 @@ import { getOr, omit } from 'lodash/fp'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ChromeBreadcrumb } from '../../../../../../../../src/core/public'; import { APP_NAME } from '../../../../../common/constants'; import { StartServices } from '../../../../types'; diff --git a/x-pack/plugins/security_solution/public/common/hooks/types.ts b/x-pack/plugins/security_solution/public/common/hooks/types.ts index 36b626b0ba9f1..301b8bd655333 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/types.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/types.ts @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { SimpleSavedObject } from '../../../../../../src/core/public'; // eslint-disable-next-line @typescript-eslint/consistent-type-definitions diff --git a/x-pack/plugins/security_solution/public/common/lib/compose/kibana_compose.tsx b/x-pack/plugins/security_solution/public/common/lib/compose/kibana_compose.tsx index 342db7f43943d..30d3311a40b61 100644 --- a/x-pack/plugins/security_solution/public/common/lib/compose/kibana_compose.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/compose/kibana_compose.tsx @@ -8,7 +8,6 @@ import { InMemoryCache, IntrospectionFragmentMatcher } from 'apollo-cache-inmemo import ApolloClient from 'apollo-client'; import { ApolloLink } from 'apollo-link'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import introspectionQueryResultData from '../../../graphql/introspection.json'; import { AppFrontendLibs } from '../lib'; import { getLinks } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts index 8a8138691ba17..00f53ae273b4b 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { CoreStart } from '../../../../../../../src/core/public'; type GlobalServices = Pick; diff --git a/x-pack/plugins/security_solution/public/common/mock/kibana_core.ts b/x-pack/plugins/security_solution/public/common/mock/kibana_core.ts index e82c37e3a5b66..13b3c4b249bfe 100644 --- a/x-pack/plugins/security_solution/public/common/mock/kibana_core.ts +++ b/x-pack/plugins/security_solution/public/common/mock/kibana_core.ts @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { coreMock } from '../../../../../../src/core/public/mocks'; import { dataPluginMock } from '../../../../../../src/plugins/data/public/mocks'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_histogram_panel/helpers.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_histogram_panel/helpers.tsx index 0cbed86f18768..bb8cc2267249f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_histogram_panel/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_histogram_panel/helpers.tsx @@ -18,6 +18,7 @@ export const formatAlertsData = (alertsData: AlertSearchResponse<{}, AlertsAggre return [ ...acc, + // eslint-disable-next-line @typescript-eslint/naming-convention ...alertsBucket.map(({ key, doc_count }: AlertsBucket) => ({ x: key, y: doc_count, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.tsx index be9725dac5ff3..5bab2e3c78970 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.tsx @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable react/display-name */ - import React from 'react'; import ApolloClient from 'apollo-client'; import { Dispatch } from 'redux'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.test.tsx index 4a2d17ec126fb..8b3d05ce5a574 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.test.tsx @@ -23,7 +23,6 @@ import { mockAboutStepRule, mockDefineStepRule, } from '../../../pages/detection_engine/rules/all/__mocks__/mock'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { coreMock } from '../../../../../../../../src/core/public/mocks'; import { DEFAULT_TIMELINE_TITLE } from '../../../../timelines/components/timeline/translations'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts index 1f75ff0210bd5..78d2e2a5b0c2f 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts @@ -7,7 +7,6 @@ import * as t from 'io-ts'; import { RuleTypeSchema } from '../../../../../common/detection_engine/types'; -/* eslint-disable @typescript-eslint/camelcase */ import { author, building_block_type, @@ -18,7 +17,6 @@ import { timestamp_override, threshold, } from '../../../../../common/detection_engine/schemas/common/schemas'; -/* eslint-enable @typescript-eslint/camelcase */ import { listArray, listArrayOrUndefined, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx index 6ba65ceca8fe9..70f278197b005 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx @@ -234,7 +234,6 @@ const CreateRulePageComponent: React.FC = () => { } }; - // eslint-disable-next-line react-hooks/rules-of-hooks const manageAccordions = useCallback( (id: RuleStep, isOpen: boolean) => { const activeRuleIdx = stepsRuleOrder.findIndex((step) => step === openAccordionId); @@ -256,7 +255,6 @@ const CreateRulePageComponent: React.FC = () => { [isStepRuleInReadOnlyView, openAccordionId, stepsData] ); - // eslint-disable-next-line react-hooks/rules-of-hooks const manageIsEditable = useCallback( async (id: RuleStep) => { const activeForm = await stepsForm.current[openAccordionId]?.submit(); diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx index 4327ef96c93a7..016d0c7c67a9e 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable react-hooks/rules-of-hooks, complexity */ +/* eslint-disable complexity */ // TODO: Disabling complexity is temporary till this component is refactored as part of lists UI integration import { @@ -247,7 +247,6 @@ export const RuleDetailsPageComponent: FC = ({ ))} ), - // eslint-disable-next-line react-hooks/exhaustive-deps [ruleDetailTabs, ruleDetailTab, setRuleDetailTab] ); const ruleError = useMemo( @@ -318,13 +317,13 @@ export const RuleDetailsPageComponent: FC = ({ lists: ExceptionIdentifiers[]; allowedExceptionListTypes: ExceptionListTypeEnum[]; }>( - (acc, { id, list_id, namespace_type, type }) => { + (acc, { id, list_id: listId, namespace_type: namespaceType, type }) => { const { allowedExceptionListTypes, lists } = acc; const shouldAddEndpoint = type === ExceptionListTypeEnum.ENDPOINT && !allowedExceptionListTypes.includes(ExceptionListTypeEnum.ENDPOINT); return { - lists: [...lists, { id, listId: list_id, namespaceType: namespace_type, type }], + lists: [...lists, { id, listId, namespaceType, type }], allowedExceptionListTypes: shouldAddEndpoint ? [...allowedExceptionListTypes, ExceptionListTypeEnum.ENDPOINT] : allowedExceptionListTypes, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/edit/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/edit/index.tsx index 3cc874b85ecf3..13855a4b81494 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/edit/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/edit/index.tsx @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable react-hooks/rules-of-hooks */ - import { EuiButton, EuiCallOut, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts index c1b4fa3e2b7d9..f862a06807e6f 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts @@ -6,7 +6,6 @@ import { isEmpty } from 'lodash/fp'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ChromeBreadcrumb } from '../../../../../../../../src/core/public'; import { getDetectionEngineTabUrl, diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts b/x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts index 5c5c7283eee47..9a24c61ae103d 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts +++ b/x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts @@ -6,7 +6,6 @@ import { get, isEmpty } from 'lodash/fp'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ChromeBreadcrumb } from '../../../../../../../src/core/public'; import { hostsModel } from '../../store'; import { HostsTableType } from '../../store/model'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx index 109392cb7a929..6a0a0cbb1014e 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/host_details.tsx @@ -82,6 +82,7 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { }, [details]); const [policyResponseUri, policyResponseRoutePath] = useMemo(() => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { selected_host, show, ...currentUrlParams } = queryParams; return [ formatUrl( @@ -189,7 +190,6 @@ export const HostDetails = memo(({ details }: { details: HostMetadata }) => { description: details.agent.version, }, ]; - // eslint-disable-next-line react-hooks/exhaustive-deps }, [details.agent.version, details.host.hostname, details.host.ip]); return ( diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index 3e00a5cc33db1..bb6003f73714d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -313,6 +313,7 @@ describe('when on the hosts page', () => { beforeEach(async () => { const { + // eslint-disable-next-line @typescript-eslint/naming-convention host_status, metadata: { host, ...details }, } = mockHostDetailsApiResult(); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index f91bba3e3125a..cdea4bfcf9f86 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -259,7 +259,6 @@ export const HostList = () => { name: i18n.translate('xpack.securitySolution.endpointList.policyStatus', { defaultMessage: 'Configuration Status', }), - // eslint-disable-next-line react/display-name render: (policy: HostInfo['metadata']['Endpoint']['policy']['applied'], item: HostInfo) => { const toRoutePath = getHostDetailsPath({ name: 'hostPolicyResponse', diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/models/policy_details_config.ts b/x-pack/plugins/security_solution/public/management/pages/policy/models/policy_details_config.ts index 7c67dffb8a663..4d32a9fbec694 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/models/policy_details_config.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/models/policy_details_config.ts @@ -48,12 +48,12 @@ export function clone(policyDetailsConfig: UIPolicyConfig): UIPolicyConfig { * Returns value from `configuration` */ export const getIn = (a: UIPolicyConfig) => (key: Key) => < - subKey extends keyof UIPolicyConfig[Key] + SubKey extends keyof UIPolicyConfig[Key] >( - subKey: subKey -) => ( + subKey: SubKey +) => ( leafKey: LeafKey -): UIPolicyConfig[Key][subKey][LeafKey] => { +): UIPolicyConfig[Key][SubKey][LeafKey] => { return a[key][subKey][leafKey]; }; @@ -61,11 +61,11 @@ export const getIn = (a: UIPolicyConfig) => (k * Returns cloned `configuration` with `value` set by the `keyPath`. */ export const setIn = (a: UIPolicyConfig) => (key: Key) => < - subKey extends keyof UIPolicyConfig[Key] + SubKey extends keyof UIPolicyConfig[Key] >( - subKey: subKey -) => (leafKey: LeafKey) => < - V extends UIPolicyConfig[Key][subKey][LeafKey] + subKey: SubKey +) => (leafKey: LeafKey) => < + V extends UIPolicyConfig[Key][SubKey][LeafKey] >( v: V ): UIPolicyConfig => { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors.ts index cce0adf36bcce..d780828fc8833 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors.ts @@ -29,6 +29,7 @@ export const policyDetails = (state: Immutable) => state.pol export const getPolicyDataForUpdate = ( policy: PolicyData | Immutable ): NewPolicyData | Immutable => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { id, revision, created_by, created_at, updated_by, updated_at, ...newPolicy } = policy; return newPolicy; }; diff --git a/x-pack/plugins/security_solution/public/network/pages/ip_details/utils.ts b/x-pack/plugins/security_solution/public/network/pages/ip_details/utils.ts index 640b9d9818cdd..9284a808625a5 100644 --- a/x-pack/plugins/security_solution/public/network/pages/ip_details/utils.ts +++ b/x-pack/plugins/security_solution/public/network/pages/ip_details/utils.ts @@ -6,7 +6,6 @@ import { get, isEmpty } from 'lodash/fp'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ChromeBreadcrumb } from '../../../../../../../src/core/public'; import { decodeIpv6 } from '../../../common/lib/helpers'; import { getIPDetailsUrl } from '../../../common/components/link_to/redirect_to_network'; diff --git a/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.test.tsx index f7f1fbc30aeb7..a35d85d1321f5 100644 --- a/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.test.tsx @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable react/display-name */ - import euiDarkVars from '@elastic/eui/dist/eui_theme_dark.json'; import { mount, ReactWrapper } from 'enzyme'; import React from 'react'; diff --git a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts index 628d0267754f2..060a014b8730f 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable no-shadow */ - import { uniquePidForProcess, uniqueParentPidForProcess, orderByTime } from '../process_event'; import { IndexedProcessTree } from '../../types'; import { ResolverEvent } from '../../../../common/endpoint/types'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts b/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts index 10ace895b3267..272d0aae7eef4 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts @@ -486,12 +486,7 @@ export const ariaFlowtoCandidate: ( const spatiallyIndexedLayout: (state: DataState) => rbush = createSelector( layout, - function ({ - /* eslint-disable no-shadow */ - processNodePositions, - edgeLineSegments, - /* eslint-enable no-shadow */ - }) { + function ({ processNodePositions, edgeLineSegments }) { const spatialIndex: rbush = new rbush(); const processesToIndex: IndexedProcessNode[] = []; const edgeLineSegmentsToIndex: IndexedEdgeLineSegment[] = []; diff --git a/x-pack/plugins/security_solution/public/resolver/store/middleware/resolver_tree_fetcher.ts b/x-pack/plugins/security_solution/public/resolver/store/middleware/resolver_tree_fetcher.ts index 2c98059d420e8..0ec340efbdac9 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/middleware/resolver_tree_fetcher.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/middleware/resolver_tree_fetcher.ts @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable no-duplicate-imports */ - import { Dispatch, MiddlewareAPI } from 'redux'; import { ResolverTree, ResolverEntityIndex } from '../../../../common/endpoint/types'; diff --git a/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/mock_resolver.tsx b/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/mock_resolver.tsx index 36bb2a5ffc9fe..7de7cf48e6039 100644 --- a/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/mock_resolver.tsx +++ b/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/mock_resolver.tsx @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable no-duplicate-imports */ /* eslint-disable react/display-name */ import React, { useMemo, useEffect, useState, useCallback } from 'react'; diff --git a/x-pack/plugins/security_solution/public/resolver/types.ts b/x-pack/plugins/security_solution/public/resolver/types.ts index 38e0cd0483559..c2871fdceb20a 100644 --- a/x-pack/plugins/security_solution/public/resolver/types.ts +++ b/x-pack/plugins/security_solution/public/resolver/types.ts @@ -245,14 +245,14 @@ export type Matrix3 = readonly [ number ]; -type eventSubtypeFull = +type EventSubtypeFull = | 'creation_event' | 'fork_event' | 'exec_event' | 'already_running' | 'termination_event'; -type eventTypeFull = 'process_event'; +type EventTypeFull = 'process_event'; /** * The 'events' which contain process data and are used to model Resolver. @@ -263,8 +263,8 @@ export interface ProcessEvent { readonly machine_id: string; readonly data_buffer: { timestamp_utc: string; - event_subtype_full: eventSubtypeFull; - event_type_full: eventTypeFull; + event_subtype_full: EventSubtypeFull; + event_type_full: EventTypeFull; node_id: number; source_id?: number; process_name: string; diff --git a/x-pack/plugins/security_solution/public/resolver/view/map.tsx b/x-pack/plugins/security_solution/public/resolver/view/map.tsx index 0ca71c5bf60ce..a965f06c04926 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/map.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/map.tsx @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable no-duplicate-imports */ - /* eslint-disable react/display-name */ import React, { useContext } from 'react'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/resolver_without_providers.tsx b/x-pack/plugins/security_solution/public/resolver/view/resolver_without_providers.tsx index f444d5a25e1ef..e74502243ffc8 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/resolver_without_providers.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/resolver_without_providers.tsx @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable no-duplicate-imports */ - /* eslint-disable react/display-name */ import React, { useContext, useCallback } from 'react'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx index 3384165392dc8..a0678fb4a437a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx @@ -114,7 +114,7 @@ const AddressLinksComponent: React.FC<{ fieldName, address, })}`} - render={(_, __, snapshot) => + render={(_props, _provided, snapshot) => snapshot.isDragging ? ( ({ fetchPolicy: 'no-cache', variables: { id: timelineId }, }) - // eslint-disable-next-line .then((result) => { const timelineToOpen: TimelineResult = omitTypenameInTimeline( getOr({}, 'data.getOneTimeline', result) diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx index aa4bb3f1e0467..b0e1eab25e7c7 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable react/display-name */ - import { ActionTimelineToShow, DeleteTimelines, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity.ts index c79bcda71de9b..bcac559d61f79 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity.ts @@ -87,6 +87,7 @@ export function handleEntities(): RequestHandler 0 && newPackageConfig.inputs[0].config !== undefined) { const oldManifest = newPackageConfig.inputs[0].config.artifact_manifest ?? { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts index 5f62ff426ecd0..3ab4775f890ac 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts @@ -28,13 +28,13 @@ export const querySignalsRoute = (router: IRouter) => { }, }, async (context, request, response) => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { query, aggs, _source, track_total_hits, size } = request.body; const siemResponse = buildSiemResponse(response); if ( query == null && aggs == null && _source == null && - // eslint-disable-next-line @typescript-eslint/camelcase track_total_hits == null && size == null ) { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts index c36f6ca831c57..f469aa8634c5a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/get_rule_actions_saved_object.ts @@ -26,6 +26,7 @@ export const getRuleActionsSavedObject = async ({ ruleAlertId, savedObjectsClient, }: GetRuleActionsSavedObject): Promise => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { saved_objects } = await savedObjectsClient.find< IRuleActionsAttributesSavedObjectAttributes >({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_threshold_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_threshold_signals.ts index e2f3d16bd6d03..bdcddbf2ed21b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_threshold_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_threshold_signals.ts @@ -134,6 +134,7 @@ const getTransformedHits = ( } return results.aggregations.threshold.buckets.map( + // eslint-disable-next-line @typescript-eslint/naming-convention ({ key, doc_count }: { key: string; doc_count: number }) => { const source = { '@timestamp': new Date().toISOString(), diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts index bfc72a169566e..dd0698b8d1124 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts @@ -12,6 +12,7 @@ import { RuleTypeParams } from '../types'; import { SearchResponse } from '../../types'; // used for gap detection code +// eslint-disable-next-line @typescript-eslint/naming-convention export type unitType = 's' | 'm' | 'h'; export const isValidUnit = (unitParam: string): unitParam is unitType => ['s', 'm', 'h'].includes(unitParam); diff --git a/x-pack/plugins/security_solution/server/lib/framework/types.ts b/x-pack/plugins/security_solution/server/lib/framework/types.ts index 03c82ceb02e68..68b40b72866b1 100644 --- a/x-pack/plugins/security_solution/server/lib/framework/types.ts +++ b/x-pack/plugins/security_solution/server/lib/framework/types.ts @@ -40,7 +40,7 @@ export interface FrameworkAdapter { callWithRequest( req: FrameworkRequest, method: 'indices.getMapping', - options?: IndicesGetMappingParams // eslint-disable-line + options?: IndicesGetMappingParams ): Promise; getIndexPatternsService(req: FrameworkRequest): FrameworkIndexPatternsService; } diff --git a/x-pack/plugins/security_solution/server/lib/matrix_histogram/utils.ts b/x-pack/plugins/security_solution/server/lib/matrix_histogram/utils.ts index 67568b96fee90..4a6a38421f42a 100644 --- a/x-pack/plugins/security_solution/server/lib/matrix_histogram/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/matrix_histogram/utils.ts @@ -16,6 +16,7 @@ export const getDnsParsedData = ( data.forEach((bucketData: unknown) => { const time = get('key', bucketData); const histData = getOr([], keyBucket, bucketData).map( + // eslint-disable-next-line @typescript-eslint/naming-convention ({ key, doc_count }: DnsHistogramSubBucket) => ({ x: time, y: doc_count, @@ -35,6 +36,7 @@ export const getGenericData = ( data.forEach((bucketData: unknown) => { const group = get('key', bucketData); const histData = getOr([], keyBucket, bucketData).map( + // eslint-disable-next-line @typescript-eslint/naming-convention ({ key, doc_count }: HistogramBucket) => ({ x: key, y: doc_count, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/create_timelines.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/create_timelines.ts index 6bdecb5d80ecc..dc0caaf67d738 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/create_timelines.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/create_timelines.ts @@ -191,7 +191,6 @@ export const getTemplateTimeline = async ( frameworkRequest, templateTimelineId ); - // eslint-disable-next-line no-empty } catch (e) { return null; } diff --git a/x-pack/plugins/security_solution/server/lib/tls/elasticsearch_adapter.ts b/x-pack/plugins/security_solution/server/lib/tls/elasticsearch_adapter.ts index 10929c3d03641..ab9175951a8f5 100644 --- a/x-pack/plugins/security_solution/server/lib/tls/elasticsearch_adapter.ts +++ b/x-pack/plugins/security_solution/server/lib/tls/elasticsearch_adapter.ts @@ -69,7 +69,7 @@ export const formatTlsEdges = (buckets: TlsBuckets[]): TlsEdges[] => { subjects: bucket.subjects.buckets.map(({ key }) => key), ja3: bucket.ja3.buckets.map(({ key }) => key), issuers: bucket.issuers.buckets.map(({ key }) => key), - // eslint-disable-next-line @typescript-eslint/camelcase + // eslint-disable-next-line @typescript-eslint/naming-convention notAfter: bucket.not_after.buckets.map(({ key_as_string }) => key_as_string), }, cursor: { diff --git a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/home.helpers.ts b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/home.helpers.ts index bff66b7068145..917c41b998dec 100644 --- a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/home.helpers.ts +++ b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/home.helpers.ts @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import { act } from 'react-dom/test-utils'; import { diff --git a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/policy_add.helpers.ts b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/policy_add.helpers.ts index bdc2f76224361..e8528889eb231 100644 --- a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/policy_add.helpers.ts +++ b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/policy_add.helpers.ts @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import { registerTestBed, TestBedConfig } from '../../../../../test_utils'; import { PolicyAdd } from '../../../public/application/sections/policy_add'; diff --git a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/policy_edit.helpers.ts b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/policy_edit.helpers.ts index ca53f9306445e..f009afbb2eacc 100644 --- a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/policy_edit.helpers.ts +++ b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/policy_edit.helpers.ts @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import { registerTestBed, TestBedConfig } from '../../../../../test_utils'; import { PolicyEdit } from '../../../public/application/sections/policy_edit'; diff --git a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/repository_add.helpers.ts b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/repository_add.helpers.ts index 2f7c47dbf544c..fa4421988740b 100644 --- a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/repository_add.helpers.ts +++ b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/repository_add.helpers.ts @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import { registerTestBed, TestBed } from '../../../../../test_utils'; import { RepositoryType } from '../../../common/types'; diff --git a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/repository_edit.helpers.ts b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/repository_edit.helpers.ts index 4127fd0546580..043b21270cc8d 100644 --- a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/repository_edit.helpers.ts +++ b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/repository_edit.helpers.ts @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import { registerTestBed, TestBedConfig } from '../../../../../test_utils'; import { RepositoryEdit } from '../../../public/application/sections/repository_edit'; diff --git a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/restore_snapshot.helpers.ts b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/restore_snapshot.helpers.ts index 0cfb6fbc97975..cfe3027b6d43f 100644 --- a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/restore_snapshot.helpers.ts +++ b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/restore_snapshot.helpers.ts @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import { registerTestBed, TestBed, TestBedConfig } from '../../../../../test_utils'; import { RestoreSnapshot } from '../../../public/application/sections/restore_snapshot'; import { WithAppDependencies } from './setup_environment'; diff --git a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/setup_environment.tsx index 2cfffb3572dde..c7ee0648b5c3b 100644 --- a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/setup_environment.tsx @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import React from 'react'; import axios from 'axios'; import axiosXhrAdapter from 'axios/lib/adapters/xhr'; diff --git a/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_table/policy_table.tsx b/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_table/policy_table.tsx index 5f0a208348785..d55bbf0b324cf 100644 --- a/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_table/policy_table.tsx +++ b/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_table/policy_table.tsx @@ -64,7 +64,6 @@ export const PolicyTable: React.FunctionComponent = ({ return ( - {/* eslint-disable-next-line @elastic/eui/href-or-on-click */} uiMetricService.trackUiMetric(UIM_POLICY_SHOW_DETAILS_CLICK) diff --git a/x-pack/plugins/snapshot_restore/public/application/sections/home/repository_list/repository_table/repository_table.tsx b/x-pack/plugins/snapshot_restore/public/application/sections/home/repository_list/repository_table/repository_table.tsx index 70d83846cd74e..d435ff4524ea2 100644 --- a/x-pack/plugins/snapshot_restore/public/application/sections/home/repository_list/repository_table/repository_table.tsx +++ b/x-pack/plugins/snapshot_restore/public/application/sections/home/repository_list/repository_table/repository_table.tsx @@ -55,7 +55,6 @@ export const RepositoryTable: React.FunctionComponent = ({ render: (name: Repository['name']) => { return ( - {/* eslint-disable-next-line @elastic/eui/href-or-on-click */} uiMetricService.trackUiMetric(UIM_REPOSITORY_SHOW_DETAILS_CLICK) diff --git a/x-pack/plugins/snapshot_restore/public/application/sections/home/snapshot_list/snapshot_table/snapshot_table.tsx b/x-pack/plugins/snapshot_restore/public/application/sections/home/snapshot_list/snapshot_table/snapshot_table.tsx index 4910bf909ce3a..46bd5bab53d2b 100644 --- a/x-pack/plugins/snapshot_restore/public/application/sections/home/snapshot_list/snapshot_table/snapshot_table.tsx +++ b/x-pack/plugins/snapshot_restore/public/application/sections/home/snapshot_list/snapshot_table/snapshot_table.tsx @@ -74,7 +74,6 @@ export const SnapshotTable: React.FunctionComponent = ({ truncateText: true, sortable: true, render: (snapshotId: string, snapshot: SnapshotDetails) => ( - /* eslint-disable-next-line @elastic/eui/href-or-on-click */ { - const { reason, caused_by } = causedBy; // eslint-disable-line @typescript-eslint/camelcase + const { reason, caused_by } = causedBy; // eslint-disable-line @typescript-eslint/naming-convention if (reason) { accumulator.push(reason); } - // eslint-disable-next-line @typescript-eslint/camelcase if (caused_by) { return extractCausedByChain(caused_by, accumulator); } @@ -31,8 +30,8 @@ export const wrapEsError = (err: any, statusCodeToMessageMap: any = {}) => { const { error: { - root_cause = [], // eslint-disable-line @typescript-eslint/camelcase - caused_by = {}, // eslint-disable-line @typescript-eslint/camelcase + root_cause = [], // eslint-disable-line @typescript-eslint/naming-convention + caused_by = {}, // eslint-disable-line @typescript-eslint/naming-convention } = {}, } = JSON.parse(response); diff --git a/x-pack/plugins/snapshot_restore/test/fixtures/policy.ts b/x-pack/plugins/snapshot_restore/test/fixtures/policy.ts index 435ae27e8dd46..a293f505147e4 100644 --- a/x-pack/plugins/snapshot_restore/test/fixtures/policy.ts +++ b/x-pack/plugins/snapshot_restore/test/fixtures/policy.ts @@ -3,7 +3,6 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable @kbn/eslint/no-restricted-paths */ import { getRandomString, getRandomNumber } from '../../../../test_utils'; import { SlmPolicy } from '../../common/types'; diff --git a/x-pack/plugins/spaces/server/lib/spaces_client/spaces_client.ts b/x-pack/plugins/spaces/server/lib/spaces_client/spaces_client.ts index b4b0057a2f5a5..dd2e0d40f31ed 100644 --- a/x-pack/plugins/spaces/server/lib/spaces_client/spaces_client.ts +++ b/x-pack/plugins/spaces/server/lib/spaces_client/spaces_client.ts @@ -66,6 +66,7 @@ export class SpacesClient { if (this.useRbac()) { const privilegeFactory = PURPOSE_PRIVILEGE_MAP[purpose]; + // eslint-disable-next-line @typescript-eslint/naming-convention const { saved_objects } = await this.internalSavedObjectRepository.find({ type: 'space', page: 1, @@ -111,6 +112,7 @@ export class SpacesClient { } else { this.debugLogger(`SpacesClient.getAll(), NOT USING RBAC. querying all spaces`); + // eslint-disable-next-line @typescript-eslint/naming-convention const { saved_objects } = await this.callWithRequestSavedObjectRepository.find({ type: 'space', page: 1, diff --git a/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts b/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts index 4ab309cc6015c..3ea4693d9e9d7 100644 --- a/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts +++ b/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts @@ -92,6 +92,7 @@ async function getSpacesUsage( ); const disabledFeatures: Record = disabledFeatureBuckets.reduce( + // eslint-disable-next-line @typescript-eslint/naming-convention (acc, { key, doc_count }) => { return { ...acc, diff --git a/x-pack/plugins/task_manager/server/task_store.ts b/x-pack/plugins/task_manager/server/task_store.ts index 7ec3db5c99aa7..cac37db72202d 100644 --- a/x-pack/plugins/task_manager/server/task_store.ts +++ b/x-pack/plugins/task_manager/server/task_store.ts @@ -443,6 +443,7 @@ export class TaskStore { private async updateByQuery( opts: UpdateByQuerySearchOpts = {}, + // eslint-disable-next-line @typescript-eslint/naming-convention { max_docs }: UpdateByQueryOpts = {} ): Promise { const { query } = ensureQueryOnlyReturnsTaskObjects(opts); @@ -458,6 +459,7 @@ export class TaskStore { }, }); + // eslint-disable-next-line @typescript-eslint/naming-convention const { total, updated, version_conflicts } = result as UpdateDocumentByQueryResponse; return { total, diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/popover_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/popover_form.tsx index f3e96736e40fc..50064274cf98e 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/popover_form.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/popover_form.tsx @@ -103,7 +103,6 @@ export const PopoverForm: React.FC = ({ defaultData, otherAggNames, onCha setAggName(name); } } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [aggConfigDef]); const availableFields: EuiSelectOption[] = []; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/popover_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/popover_form.tsx index ba1bf915afd19..0452638e90dfb 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/popover_form.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/popover_form.tsx @@ -37,7 +37,7 @@ import { } from '../../../../common'; export function isIntervalValid( - interval: optionalInterval, + interval: OptionalInterval, intervalType: PivotSupportedGroupByAggsWithInterval ) { if (interval !== '' && interval !== undefined) { @@ -73,7 +73,7 @@ interface SelectOption { text: string; } -type optionalInterval = string | undefined; +type OptionalInterval = string | undefined; function getDefaultInterval(defaultData: PivotGroupByConfig): string | undefined { if (isGroupByDateHistogram(defaultData)) { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.tsx index ee19b6124da05..009f582424765 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.tsx @@ -65,6 +65,7 @@ type PromptErrorProps = Pick & { }; const TlsAndEncryptionError = ({ + // eslint-disable-next-line @typescript-eslint/naming-convention docLinks: { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION }, className, }: PromptErrorProps) => ( @@ -107,6 +108,7 @@ const TlsAndEncryptionError = ({ ); const EncryptionError = ({ + // eslint-disable-next-line @typescript-eslint/naming-convention docLinks: { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION }, className, }: PromptErrorProps) => ( @@ -158,6 +160,7 @@ const EncryptionError = ({ ); const TlsError = ({ + // eslint-disable-next-line @typescript-eslint/naming-convention docLinks: { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION }, className, }: PromptErrorProps) => ( diff --git a/x-pack/plugins/ui_actions_enhanced/public/custom_time_range_action.test.ts b/x-pack/plugins/ui_actions_enhanced/public/custom_time_range_action.test.ts index 0d6e9743f0f4b..440bbd4242fa5 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/custom_time_range_action.test.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/custom_time_range_action.test.ts @@ -12,9 +12,7 @@ import { mount } from 'enzyme'; import { TimeRangeEmbeddable, TimeRangeContainer, TIME_RANGE_EMBEDDABLE } from './test_helpers'; import { CustomTimeRangeAction } from './custom_time_range_action'; -/* eslint-disable */ import { HelloWorldContainer } from '../../../../src/plugins/embeddable/public/lib/test_samples'; -/* eslint-enable */ import { HelloWorldEmbeddable, diff --git a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.story.tsx b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.story.tsx index cd8452ff74ab4..0b0339a625c50 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.story.tsx +++ b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/components/connected_flyout_manage_drilldowns/connected_flyout_manage_drilldowns.story.tsx @@ -8,11 +8,7 @@ import * as React from 'react'; import { EuiFlyout } from '@elastic/eui'; import { storiesOf } from '@storybook/react'; import { createFlyoutManageDrilldowns } from './connected_flyout_manage_drilldowns'; -import { - dashboardFactory, - urlFactory, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths -} from '../../../components/action_wizard/test_data'; +import { dashboardFactory, urlFactory } from '../../../components/action_wizard/test_data'; import { Storage } from '../../../../../../../src/plugins/kibana_utils/public'; import { StubBrowserStorage } from '../../../../../../../src/test_utils/public/stub_browser_storage'; import { mockDynamicActionManager } from './test_data'; diff --git a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx index 2069a83ab8ba0..01e2a457889ca 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx +++ b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/components/flyout_drilldown_wizard/flyout_drilldown_wizard.story.tsx @@ -4,17 +4,11 @@ * you may not use this file except in compliance with the Elastic License. */ -/* eslint-disable no-console */ - import * as React from 'react'; import { EuiFlyout } from '@elastic/eui'; import { storiesOf } from '@storybook/react'; import { FlyoutDrilldownWizard } from './index'; -import { - dashboardFactory, - urlFactory, - // eslint-disable-next-line @kbn/eslint/no-restricted-paths -} from '../../../components/action_wizard/test_data'; +import { dashboardFactory, urlFactory } from '../../../components/action_wizard/test_data'; import { ActionFactory } from '../../../dynamic_actions'; storiesOf('components/FlyoutDrilldownWizard', module) diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/flyout/container.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/flyout/container.tsx index be4138b7a29f3..8f318e8113ea1 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/flyout/container.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/deprecations/reindex/flyout/container.tsx @@ -43,6 +43,7 @@ interface ReindexFlyoutState { currentFlyoutStep: ReindexFlyoutStep; } +// eslint-disable-next-line @typescript-eslint/naming-convention const getOpenAndCloseIndexDocLink = ({ ELASTIC_WEBSITE_URL, DOC_LINK_VERSION }: DocLinksStart) => ( = ({ idx, }) => { const titleClassName = classNames('upgStepProgress__title', { + // eslint-disable-next-line @typescript-eslint/naming-convention 'upgStepProgress__title--currentStep': status === 'inProgress' || status === 'paused' || diff --git a/x-pack/plugins/uptime/server/lib/alerts/status_check.ts b/x-pack/plugins/uptime/server/lib/alerts/status_check.ts index a34d7eb292eef..8ca2e857a52c9 100644 --- a/x-pack/plugins/uptime/server/lib/alerts/status_check.ts +++ b/x-pack/plugins/uptime/server/lib/alerts/status_check.ts @@ -36,6 +36,7 @@ const { MONITOR_STATUS } = ACTION_GROUP_DEFINITIONS; * @param items to reduce */ export const uniqueMonitorIds = (items: GetMonitorStatusResult[]): Set => + // eslint-disable-next-line @typescript-eslint/naming-convention items.reduce((acc, { monitor_id }) => { acc.add(monitor_id); return acc; diff --git a/x-pack/plugins/uptime/server/lib/requests/__tests__/get_monitor_status.test.ts b/x-pack/plugins/uptime/server/lib/requests/__tests__/get_monitor_status.test.ts index 1783cb3c28522..f12f1527fb56c 100644 --- a/x-pack/plugins/uptime/server/lib/requests/__tests__/get_monitor_status.test.ts +++ b/x-pack/plugins/uptime/server/lib/requests/__tests__/get_monitor_status.test.ts @@ -27,9 +27,11 @@ interface BucketItem { } const genBucketItem = ({ + // eslint-disable-next-line @typescript-eslint/naming-convention monitor_id, status, location, + // eslint-disable-next-line @typescript-eslint/naming-convention doc_count, }: BucketItemCriteria): BucketItem => ({ key: { diff --git a/x-pack/plugins/uptime/server/lib/requests/__tests__/helper.ts b/x-pack/plugins/uptime/server/lib/requests/__tests__/helper.ts index 0eb46e17c6324..878569b5d390f 100644 --- a/x-pack/plugins/uptime/server/lib/requests/__tests__/helper.ts +++ b/x-pack/plugins/uptime/server/lib/requests/__tests__/helper.ts @@ -33,6 +33,7 @@ export const setupMockEsCompositeQuery = ( ): [MockCallES, jest.Mocked>] => { const esMock = elasticsearchServiceMock.createLegacyScopedClusterClient(); + // eslint-disable-next-line @typescript-eslint/naming-convention criteria.forEach(({ after_key, bucketCriteria }) => { const mockResponse = { aggregations: { diff --git a/x-pack/plugins/uptime/server/lib/requests/get_monitor_availability.ts b/x-pack/plugins/uptime/server/lib/requests/get_monitor_availability.ts index eafc0df431f77..798cefc404e1f 100644 --- a/x-pack/plugins/uptime/server/lib/requests/get_monitor_availability.ts +++ b/x-pack/plugins/uptime/server/lib/requests/get_monitor_availability.ts @@ -23,6 +23,7 @@ export interface GetMonitorAvailabilityResult { } export const formatBuckets = async (buckets: any[]): Promise => + // eslint-disable-next-line @typescript-eslint/naming-convention buckets.map(({ key, fields, up_sum, down_sum, ratio }: any) => ({ ...key, name: fields?.hits?.hits?.[0]?._source?.monitor.name, diff --git a/x-pack/plugins/uptime/server/lib/requests/get_monitor_locations.ts b/x-pack/plugins/uptime/server/lib/requests/get_monitor_locations.ts index 17d79002e6f7d..f52e965d488ea 100644 --- a/x-pack/plugins/uptime/server/lib/requests/get_monitor_locations.ts +++ b/x-pack/plugins/uptime/server/lib/requests/get_monitor_locations.ts @@ -115,6 +115,7 @@ export const getMonitorLocations: UMElasticsearchQueryFn< let totalDowns = 0; const monLocs: MonitorLocation[] = []; + // eslint-disable-next-line @typescript-eslint/naming-convention locations.forEach(({ most_recent: mostRecent, up_history, down_history }: any) => { const mostRecentLocation = mostRecent.hits.hits[0]._source; totalUps += up_history.value; diff --git a/x-pack/plugins/uptime/server/lib/requests/get_monitor_status.ts b/x-pack/plugins/uptime/server/lib/requests/get_monitor_status.ts index 33f18b7a94069..a52bbfc8f2442 100644 --- a/x-pack/plugins/uptime/server/lib/requests/get_monitor_status.ts +++ b/x-pack/plugins/uptime/server/lib/requests/get_monitor_status.ts @@ -32,7 +32,7 @@ const formatBuckets = async ( ): Promise => { return buckets .filter((monitor: any) => monitor?.doc_count > numTimes) - .map(({ key, doc_count }: any) => ({ ...key, count: doc_count })); + .map(({ key, doc_count: count }: any) => ({ ...key, count })); }; const getLocationClause = (locations: string[]) => ({ diff --git a/x-pack/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx b/x-pack/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx index 3db3cf5c66011..7caa8b8bc0859 100644 --- a/x-pack/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx @@ -15,7 +15,6 @@ import { httpServiceMock, scopedHistoryMock, } from '../../../../../../src/core/public/mocks'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { AppContextProvider } from '../../../public/application/app_context'; import { LicenseStatus } from '../../../common/types/license_status'; diff --git a/x-pack/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts index 2fc8d430208f6..3cac3eb40d894 100644 --- a/x-pack/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/setup_environment.ts @@ -7,7 +7,6 @@ import axios from 'axios'; import axiosXhrAdapter from 'axios/lib/adapters/xhr'; import { init as initHttpRequests } from './http_requests'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { setHttpClient, setSavedObjectsClient } from '../../../public/application/lib/api'; const mockHttpClient = axios.create({ adapter: axiosXhrAdapter }); diff --git a/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts index 19217729aafd6..caef4b378cf0a 100644 --- a/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_json.helpers.ts @@ -5,9 +5,7 @@ */ import { withAppContext } from './app_context.mock'; import { registerTestBed, TestBed, TestBedConfig } from '../../../../../test_utils'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { WatchEdit } from '../../../public/application/sections/watch_edit/components/watch_edit'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { registerRouter } from '../../../public/application/lib/navigation'; import { ROUTES, WATCH_TYPES } from '../../../common/constants'; diff --git a/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts index 54ba39ee7eaa6..c76f31e744f8d 100644 --- a/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_create_threshold.helpers.ts @@ -4,9 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ import { registerTestBed, TestBed, TestBedConfig } from '../../../../../test_utils'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { WatchEdit } from '../../../public/application/sections/watch_edit/components/watch_edit'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { registerRouter } from '../../../public/application/lib/navigation'; import { ROUTES, WATCH_TYPES } from '../../../common/constants'; import { withAppContext } from './app_context.mock'; diff --git a/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts index 290204d1878ea..5e6dbd0a40bfb 100644 --- a/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_edit.helpers.ts @@ -4,9 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ import { registerTestBed, TestBed, TestBedConfig } from '../../../../../test_utils'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { WatchEdit } from '../../../public/application/sections/watch_edit/components/watch_edit'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { registerRouter } from '../../../public/application/lib/navigation'; import { ROUTES } from '../../../common/constants'; import { WATCH_ID } from './constants'; diff --git a/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts index b5cf3df9509fc..e511dcdc58606 100644 --- a/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_list.helpers.ts @@ -13,7 +13,6 @@ import { TestBedConfig, nextTick, } from '../../../../../test_utils'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { WatchList } from '../../../public/application/sections/watch_list/components/watch_list'; import { ROUTES } from '../../../common/constants'; import { withAppContext } from './app_context.mock'; diff --git a/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts index e116c1bde3677..b869e55aa3464 100644 --- a/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/watch_status.helpers.ts @@ -13,7 +13,6 @@ import { TestBedConfig, nextTick, } from '../../../../../test_utils'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { WatchStatus } from '../../../public/application/sections/watch_status/components/watch_status'; import { ROUTES } from '../../../common/constants'; import { WATCH_ID } from './constants'; diff --git a/x-pack/plugins/watcher/public/application/app_context.tsx b/x-pack/plugins/watcher/public/application/app_context.tsx index e5cf4c33b477a..e8546a1517097 100644 --- a/x-pack/plugins/watcher/public/application/app_context.tsx +++ b/x-pack/plugins/watcher/public/application/app_context.tsx @@ -15,6 +15,7 @@ interface ContextValue extends Omit { const AppContext = createContext(null as any); +// eslint-disable-next-line @typescript-eslint/naming-convention const generateDocLinks = ({ ELASTIC_WEBSITE_URL, DOC_LINK_VERSION }: DocLinksStart) => { const elasticDocLinkBase = `${ELASTIC_WEBSITE_URL}guide/en/`; const esBase = `${elasticDocLinkBase}elasticsearch/reference/${DOC_LINK_VERSION}`; diff --git a/x-pack/test/alerting_api_integration/common/config.ts b/x-pack/test/alerting_api_integration/common/config.ts index 946b3d2f2591b..4947cdbf55484 100644 --- a/x-pack/test/alerting_api_integration/common/config.ts +++ b/x-pack/test/alerting_api_integration/common/config.ts @@ -36,7 +36,6 @@ const enabledActionTypes = [ 'test.throw', ]; -// eslint-disable-next-line import/no-default-export export function createTestConfig(name: string, options: CreateTestConfigOptions) { const { license = 'trial', disabledPlugins = [], ssl = false } = options; diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/alerts_base.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/alerts_base.ts index 8ffe65a8ebb48..b94a547452377 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/alerts_base.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/alerts_base.ts @@ -19,7 +19,6 @@ import { TaskManagerUtils, } from '../../../common/lib'; -// eslint-disable-next-line import/no-default-export export function alertTests({ getService }: FtrProviderContext, space: Space) { const supertestWithoutAuth = getService('supertestWithoutAuth'); const es = getService('legacyEs'); diff --git a/x-pack/test/api_integration/apis/lens/existing_fields.ts b/x-pack/test/api_integration/apis/lens/existing_fields.ts index b3810cf468b55..92336f2892f43 100644 --- a/x-pack/test/api_integration/apis/lens/existing_fields.ts +++ b/x-pack/test/api_integration/apis/lens/existing_fields.ts @@ -129,7 +129,6 @@ const metricBeatData = [ 'system.cpu.user.pct', ]; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertest'); diff --git a/x-pack/test/api_integration/apis/lens/field_stats.ts b/x-pack/test/api_integration/apis/lens/field_stats.ts index 2d394e35725c2..87c9d97be9b60 100644 --- a/x-pack/test/api_integration/apis/lens/field_stats.ts +++ b/x-pack/test/api_integration/apis/lens/field_stats.ts @@ -14,7 +14,6 @@ const COMMON_HEADERS = { 'kbn-xsrf': 'some-xsrf-token', }; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertest'); diff --git a/x-pack/test/api_integration/apis/lens/telemetry.ts b/x-pack/test/api_integration/apis/lens/telemetry.ts index bd6144a2690b0..2c05b02cf470f 100644 --- a/x-pack/test/api_integration/apis/lens/telemetry.ts +++ b/x-pack/test/api_integration/apis/lens/telemetry.ts @@ -18,7 +18,6 @@ const COMMON_HEADERS = { 'kbn-xsrf': 'some-xsrf-token', }; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertest'); const es: Client = getService('legacyEs'); diff --git a/x-pack/test/api_integration/apis/metrics_ui/log_analysis.ts b/x-pack/test/api_integration/apis/metrics_ui/log_analysis.ts index 7bcea4c17cdcd..e40a9f77e2c18 100644 --- a/x-pack/test/api_integration/apis/metrics_ui/log_analysis.ts +++ b/x-pack/test/api_integration/apis/metrics_ui/log_analysis.ts @@ -23,7 +23,6 @@ const COMMON_HEADERS = { 'kbn-xsrf': 'some-xsrf-token', }; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertest'); diff --git a/x-pack/test/api_integration/apis/ml/annotations/create_annotations.ts b/x-pack/test/api_integration/apis/ml/annotations/create_annotations.ts index 14ecf1bfe524e..aff1150997496 100644 --- a/x-pack/test/api_integration/apis/ml/annotations/create_annotations.ts +++ b/x-pack/test/api_integration/apis/ml/annotations/create_annotations.ts @@ -11,7 +11,6 @@ import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/commo import { USER } from '../../../../functional/services/ml/security_common'; import { Annotation } from '../../../../../plugins/ml/common/types/annotations'; import { createJobConfig, createAnnotationRequestBody } from './common_jobs'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/annotations/delete_annotations.ts b/x-pack/test/api_integration/apis/ml/annotations/delete_annotations.ts index 4fbb26e9b5a3e..d3451c4d7da0c 100644 --- a/x-pack/test/api_integration/apis/ml/annotations/delete_annotations.ts +++ b/x-pack/test/api_integration/apis/ml/annotations/delete_annotations.ts @@ -10,7 +10,6 @@ import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/commo import { USER } from '../../../../functional/services/ml/security_common'; import { testSetupJobConfigs, jobIds, testSetupAnnotations } from './common_jobs'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/annotations/get_annotations.ts b/x-pack/test/api_integration/apis/ml/annotations/get_annotations.ts index 710473eed6901..29ad905bd3f2d 100644 --- a/x-pack/test/api_integration/apis/ml/annotations/get_annotations.ts +++ b/x-pack/test/api_integration/apis/ml/annotations/get_annotations.ts @@ -11,7 +11,6 @@ import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/commo import { USER } from '../../../../functional/services/ml/security_common'; import { testSetupJobConfigs, jobIds, testSetupAnnotations } from './common_jobs'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/annotations/update_annotations.ts b/x-pack/test/api_integration/apis/ml/annotations/update_annotations.ts index ba73617151120..bcfb7ab0825b8 100644 --- a/x-pack/test/api_integration/apis/ml/annotations/update_annotations.ts +++ b/x-pack/test/api_integration/apis/ml/annotations/update_annotations.ts @@ -12,7 +12,6 @@ import { ANNOTATION_TYPE } from '../../../../../plugins/ml/common/constants/anno import { Annotation } from '../../../../../plugins/ml/common/types/annotations'; import { testSetupJobConfigs, jobIds, testSetupAnnotations } from './common_jobs'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/anomaly_detectors/create.ts b/x-pack/test/api_integration/apis/ml/anomaly_detectors/create.ts index 9c2b1046cc124..71703ed019dc5 100644 --- a/x-pack/test/api_integration/apis/ml/anomaly_detectors/create.ts +++ b/x-pack/test/api_integration/apis/ml/anomaly_detectors/create.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/calendars/create_calendars.ts b/x-pack/test/api_integration/apis/ml/calendars/create_calendars.ts index f163df0109ffd..82f4eee8cc328 100644 --- a/x-pack/test/api_integration/apis/ml/calendars/create_calendars.ts +++ b/x-pack/test/api_integration/apis/ml/calendars/create_calendars.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertestWithoutAuth'); const ml = getService('ml'); diff --git a/x-pack/test/api_integration/apis/ml/calendars/delete_calendars.ts b/x-pack/test/api_integration/apis/ml/calendars/delete_calendars.ts index 5c5d5a3c432fa..eef8479b811b4 100644 --- a/x-pack/test/api_integration/apis/ml/calendars/delete_calendars.ts +++ b/x-pack/test/api_integration/apis/ml/calendars/delete_calendars.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertestWithoutAuth'); const ml = getService('ml'); diff --git a/x-pack/test/api_integration/apis/ml/calendars/get_calendars.ts b/x-pack/test/api_integration/apis/ml/calendars/get_calendars.ts index e115986b2f092..0b4f4a8f73ede 100644 --- a/x-pack/test/api_integration/apis/ml/calendars/get_calendars.ts +++ b/x-pack/test/api_integration/apis/ml/calendars/get_calendars.ts @@ -9,7 +9,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertestWithoutAuth'); const ml = getService('ml'); diff --git a/x-pack/test/api_integration/apis/ml/calendars/update_calendars.ts b/x-pack/test/api_integration/apis/ml/calendars/update_calendars.ts index 5194370b19e66..65832ac9ca81e 100644 --- a/x-pack/test/api_integration/apis/ml/calendars/update_calendars.ts +++ b/x-pack/test/api_integration/apis/ml/calendars/update_calendars.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertestWithoutAuth'); const ml = getService('ml'); diff --git a/x-pack/test/api_integration/apis/ml/data_visualizer/get_field_histograms.ts b/x-pack/test/api_integration/apis/ml/data_visualizer/get_field_histograms.ts index 8b21c367d29f6..1a71894f8423d 100644 --- a/x-pack/test/api_integration/apis/ml/data_visualizer/get_field_histograms.ts +++ b/x-pack/test/api_integration/apis/ml/data_visualizer/get_field_histograms.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/data_visualizer/get_field_stats.ts b/x-pack/test/api_integration/apis/ml/data_visualizer/get_field_stats.ts index 92776e297f1a2..5373da6a794c7 100644 --- a/x-pack/test/api_integration/apis/ml/data_visualizer/get_field_stats.ts +++ b/x-pack/test/api_integration/apis/ml/data_visualizer/get_field_stats.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/data_visualizer/get_overall_stats.ts b/x-pack/test/api_integration/apis/ml/data_visualizer/get_overall_stats.ts index c6acf37cb9b3a..d87ab16d71c18 100644 --- a/x-pack/test/api_integration/apis/ml/data_visualizer/get_overall_stats.ts +++ b/x-pack/test/api_integration/apis/ml/data_visualizer/get_overall_stats.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/fields_service/field_cardinality.ts b/x-pack/test/api_integration/apis/ml/fields_service/field_cardinality.ts index 647874c1cd5fb..ced4d937863ee 100644 --- a/x-pack/test/api_integration/apis/ml/fields_service/field_cardinality.ts +++ b/x-pack/test/api_integration/apis/ml/fields_service/field_cardinality.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/fields_service/time_field_range.ts b/x-pack/test/api_integration/apis/ml/fields_service/time_field_range.ts index 247bfe89fea1d..2128b1fe8d9e1 100644 --- a/x-pack/test/api_integration/apis/ml/fields_service/time_field_range.ts +++ b/x-pack/test/api_integration/apis/ml/fields_service/time_field_range.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/filters/create_filters.ts b/x-pack/test/api_integration/apis/ml/filters/create_filters.ts index c175d3a9a3d9c..233c95b190f02 100644 --- a/x-pack/test/api_integration/apis/ml/filters/create_filters.ts +++ b/x-pack/test/api_integration/apis/ml/filters/create_filters.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertestWithoutAuth'); const ml = getService('ml'); diff --git a/x-pack/test/api_integration/apis/ml/filters/delete_filters.ts b/x-pack/test/api_integration/apis/ml/filters/delete_filters.ts index bb83a7f720692..d0323360400be 100644 --- a/x-pack/test/api_integration/apis/ml/filters/delete_filters.ts +++ b/x-pack/test/api_integration/apis/ml/filters/delete_filters.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertestWithoutAuth'); const ml = getService('ml'); diff --git a/x-pack/test/api_integration/apis/ml/filters/get_filters.ts b/x-pack/test/api_integration/apis/ml/filters/get_filters.ts index 3dd6093a9917f..f0aa7aac7b9e4 100644 --- a/x-pack/test/api_integration/apis/ml/filters/get_filters.ts +++ b/x-pack/test/api_integration/apis/ml/filters/get_filters.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertestWithoutAuth'); const ml = getService('ml'); diff --git a/x-pack/test/api_integration/apis/ml/filters/update_filters.ts b/x-pack/test/api_integration/apis/ml/filters/update_filters.ts index eb58d545093c4..87eec99906c34 100644 --- a/x-pack/test/api_integration/apis/ml/filters/update_filters.ts +++ b/x-pack/test/api_integration/apis/ml/filters/update_filters.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertestWithoutAuth'); const ml = getService('ml'); diff --git a/x-pack/test/api_integration/apis/ml/job_validation/bucket_span_estimator.ts b/x-pack/test/api_integration/apis/ml/job_validation/bucket_span_estimator.ts index be03311303288..c556a6c28554b 100644 --- a/x-pack/test/api_integration/apis/ml/job_validation/bucket_span_estimator.ts +++ b/x-pack/test/api_integration/apis/ml/job_validation/bucket_span_estimator.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const esSupertest = getService('esSupertest'); diff --git a/x-pack/test/api_integration/apis/ml/job_validation/calculate_model_memory_limit.ts b/x-pack/test/api_integration/apis/ml/job_validation/calculate_model_memory_limit.ts index 076be816e0693..409bd161e601b 100644 --- a/x-pack/test/api_integration/apis/ml/job_validation/calculate_model_memory_limit.ts +++ b/x-pack/test/api_integration/apis/ml/job_validation/calculate_model_memory_limit.ts @@ -8,7 +8,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/job_validation/cardinality.ts b/x-pack/test/api_integration/apis/ml/job_validation/cardinality.ts index ca7b8c332ede3..ed61f234a671d 100644 --- a/x-pack/test/api_integration/apis/ml/job_validation/cardinality.ts +++ b/x-pack/test/api_integration/apis/ml/job_validation/cardinality.ts @@ -8,7 +8,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/job_validation/validate.ts b/x-pack/test/api_integration/apis/ml/job_validation/validate.ts index fc8f837744221..5e9b2d68bd6df 100644 --- a/x-pack/test/api_integration/apis/ml/job_validation/validate.ts +++ b/x-pack/test/api_integration/apis/ml/job_validation/validate.ts @@ -9,7 +9,6 @@ import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; import pkg from '../../../../../../package.json'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/jobs/categorization_field_examples.ts b/x-pack/test/api_integration/apis/ml/jobs/categorization_field_examples.ts index 8ae4beafa525a..b99a4965adb9d 100644 --- a/x-pack/test/api_integration/apis/ml/jobs/categorization_field_examples.ts +++ b/x-pack/test/api_integration/apis/ml/jobs/categorization_field_examples.ts @@ -72,7 +72,6 @@ const defaultRequestBody = { analyzer, }; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/jobs/close_jobs.ts b/x-pack/test/api_integration/apis/ml/jobs/close_jobs.ts index 2bf6c3f29468c..f411595aca995 100644 --- a/x-pack/test/api_integration/apis/ml/jobs/close_jobs.ts +++ b/x-pack/test/api_integration/apis/ml/jobs/close_jobs.ts @@ -12,7 +12,6 @@ import { USER } from '../../../../functional/services/ml/security_common'; import { JOB_STATE, DATAFEED_STATE } from '../../../../../plugins/ml/common/constants/states'; import { MULTI_METRIC_JOB_CONFIG, SINGLE_METRIC_JOB_CONFIG, DATAFEED_CONFIG } from './common_jobs'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/jobs/delete_jobs.ts b/x-pack/test/api_integration/apis/ml/jobs/delete_jobs.ts index b93d3bbce0cec..4976b6441c37a 100644 --- a/x-pack/test/api_integration/apis/ml/jobs/delete_jobs.ts +++ b/x-pack/test/api_integration/apis/ml/jobs/delete_jobs.ts @@ -11,7 +11,6 @@ import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/commo import { USER } from '../../../../functional/services/ml/security_common'; import { MULTI_METRIC_JOB_CONFIG, SINGLE_METRIC_JOB_CONFIG } from './common_jobs'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/jobs/jobs_summary.ts b/x-pack/test/api_integration/apis/ml/jobs/jobs_summary.ts index e9696eeffb6dc..0a6e1ed75020a 100644 --- a/x-pack/test/api_integration/apis/ml/jobs/jobs_summary.ts +++ b/x-pack/test/api_integration/apis/ml/jobs/jobs_summary.ts @@ -11,7 +11,6 @@ import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/commo import { USER } from '../../../../functional/services/ml/security_common'; import { MULTI_METRIC_JOB_CONFIG, SINGLE_METRIC_JOB_CONFIG } from './common_jobs'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/modules/get_module.ts b/x-pack/test/api_integration/apis/ml/modules/get_module.ts index cfb3c17ac7f21..e2a5d3cd425dc 100644 --- a/x-pack/test/api_integration/apis/ml/modules/get_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/get_module.ts @@ -32,7 +32,6 @@ const moduleIds = [ 'uptime_heartbeat', ]; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertestWithoutAuth'); const ml = getService('ml'); diff --git a/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts b/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts index d217a83efe948..6634c4e2ed16c 100644 --- a/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts index 10c0f00234abc..6c3eda197f892 100644 --- a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts @@ -14,7 +14,6 @@ import { Job } from '../../../../../plugins/ml/common/types/anomaly_detection_jo import { USER } from '../../../../functional/services/ml/security_common'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/ml/results/get_anomalies_table_data.ts b/x-pack/test/api_integration/apis/ml/results/get_anomalies_table_data.ts index 01afacea645d6..f769d0d878cb2 100644 --- a/x-pack/test/api_integration/apis/ml/results/get_anomalies_table_data.ts +++ b/x-pack/test/api_integration/apis/ml/results/get_anomalies_table_data.ts @@ -9,7 +9,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; import { Datafeed, Job } from '../../../../../plugins/ml/common/types/anomaly_detection_jobs'; import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/api_integration/apis/transform/delete_transforms.ts b/x-pack/test/api_integration/apis/transform/delete_transforms.ts index 8e5d7354bcaf4..136bb85dd5ac2 100644 --- a/x-pack/test/api_integration/apis/transform/delete_transforms.ts +++ b/x-pack/test/api_integration/apis/transform/delete_transforms.ts @@ -15,7 +15,6 @@ async function asyncForEach(array: any[], callback: Function) { } } -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); const supertest = getService('supertestWithoutAuth'); diff --git a/x-pack/test/case_api_integration/common/lib/mock.ts b/x-pack/test/case_api_integration/common/lib/mock.ts index 728eaf88617e9..cfa4a0ae977f4 100644 --- a/x-pack/test/case_api_integration/common/lib/mock.ts +++ b/x-pack/test/case_api_integration/common/lib/mock.ts @@ -36,6 +36,7 @@ export const postCaseResp = (id: string): Partial => ({ export const removeServerGeneratedPropertiesFromCase = ( config: Partial ): Partial => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { closed_at, created_at, updated_at, version, ...rest } = config; return rest; }; diff --git a/x-pack/test/case_api_integration/common/lib/utils.ts b/x-pack/test/case_api_integration/common/lib/utils.ts index fe9cb48178633..a24e17f9e5efb 100644 --- a/x-pack/test/case_api_integration/common/lib/utils.ts +++ b/x-pack/test/case_api_integration/common/lib/utils.ts @@ -7,6 +7,7 @@ import { Client } from '@elastic/elasticsearch'; import { CasesConfigureRequest, CasesConfigureResponse } from '../../../../plugins/case/common/api'; +// eslint-disable-next-line @typescript-eslint/naming-convention export const getConfiguration = (connector_id: string = 'connector-1'): CasesConfigureRequest => { return { connector_id, @@ -89,6 +90,7 @@ export const getJiraConnector = () => ({ export const removeServerGeneratedPropertiesFromConfigure = ( config: Partial ): Partial => { + // eslint-disable-next-line @typescript-eslint/naming-convention const { created_at, updated_at, version, ...rest } = config; return rest; }; diff --git a/x-pack/test/detection_engine_api_integration/common/config.ts b/x-pack/test/detection_engine_api_integration/common/config.ts index 3e444bcab319a..bb9b3d9e96664 100644 --- a/x-pack/test/detection_engine_api_integration/common/config.ts +++ b/x-pack/test/detection_engine_api_integration/common/config.ts @@ -31,7 +31,6 @@ const enabledActionTypes = [ 'test.rate-limit', ]; -// eslint-disable-next-line import/no-default-export export function createTestConfig(name: string, options: CreateTestConfigOptions) { const { license = 'trial', disabledPlugins = [], ssl = false } = options; diff --git a/x-pack/test/detection_engine_api_integration/utils.ts b/x-pack/test/detection_engine_api_integration/utils.ts index 102a1577a7eaf..604133a1c2dc7 100644 --- a/x-pack/test/detection_engine_api_integration/utils.ts +++ b/x-pack/test/detection_engine_api_integration/utils.ts @@ -24,6 +24,7 @@ export const removeServerGeneratedProperties = ( rule: Partial ): Partial => { const { + /* eslint-disable @typescript-eslint/naming-convention */ created_at, updated_at, id, @@ -33,6 +34,7 @@ export const removeServerGeneratedProperties = ( last_success_message, status, status_date, + /* eslint-enable @typescript-eslint/naming-convention */ ...removedProperties } = rule; return removedProperties; @@ -46,6 +48,7 @@ export const removeServerGeneratedPropertiesIncludingRuleId = ( rule: Partial ): Partial => { const ruleWithRemovedProperties = removeServerGeneratedProperties(rule); + // eslint-disable-next-line @typescript-eslint/naming-convention const { rule_id, ...additionalRuledIdRemoved } = ruleWithRemovedProperties; return additionalRuledIdRemoved; }; @@ -153,6 +156,7 @@ export const getSignalStatusEmptyResponse = () => ({ */ export const getSimpleRuleWithoutRuleId = (): CreateRulesSchema => { const simpleRule = getSimpleRule(); + // eslint-disable-next-line @typescript-eslint/naming-convention const { rule_id, ...ruleWithoutId } = simpleRule; return ruleWithoutId; }; @@ -215,6 +219,7 @@ export const getSimpleRuleOutput = (ruleId = 'rule-1'): Partial => */ export const getSimpleRuleOutputWithoutRuleId = (ruleId = 'rule-1'): Partial => { const rule = getSimpleRuleOutput(ruleId); + // eslint-disable-next-line @typescript-eslint/naming-convention const { rule_id, ...ruleWithoutRuleId } = rule; return ruleWithoutRuleId; }; diff --git a/x-pack/test/functional/apps/lens/index.ts b/x-pack/test/functional/apps/lens/index.ts index 9e04f6e9df22b..b17b7d856841c 100644 --- a/x-pack/test/functional/apps/lens/index.ts +++ b/x-pack/test/functional/apps/lens/index.ts @@ -6,7 +6,6 @@ import { FtrProviderContext } from '../../ftr_provider_context.d'; -// eslint-disable-next-line @typescript-eslint/no-namespace, import/no-default-export export default function ({ getService, loadTestFile }: FtrProviderContext) { const browser = getService('browser'); const log = getService('log'); diff --git a/x-pack/test/functional/apps/lens/lens_reporting.ts b/x-pack/test/functional/apps/lens/lens_reporting.ts index 5fa2bd1a049a7..3e3d217b9d8d7 100644 --- a/x-pack/test/functional/apps/lens/lens_reporting.ts +++ b/x-pack/test/functional/apps/lens/lens_reporting.ts @@ -7,7 +7,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['common', 'dashboard', 'reporting']); const esArchiver = getService('esArchiver'); diff --git a/x-pack/test/functional/apps/lens/persistent_context.ts b/x-pack/test/functional/apps/lens/persistent_context.ts index 9146ec7334625..b57a9884dd11f 100644 --- a/x-pack/test/functional/apps/lens/persistent_context.ts +++ b/x-pack/test/functional/apps/lens/persistent_context.ts @@ -7,7 +7,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['visualize', 'lens', 'header', 'timePicker']); const browser = getService('browser'); diff --git a/x-pack/test/functional/apps/lens/smokescreen.ts b/x-pack/test/functional/apps/lens/smokescreen.ts index 23d4cc972675b..1e93636161067 100644 --- a/x-pack/test/functional/apps/lens/smokescreen.ts +++ b/x-pack/test/functional/apps/lens/smokescreen.ts @@ -7,7 +7,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects([ 'header', diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/advanced_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/advanced_job.ts index b574c67daf7a4..a8836a463e652 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/advanced_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/advanced_job.ts @@ -87,7 +87,6 @@ const isPickFieldsConfigWithSummaryCountField = ( return arg.hasOwnProperty('summaryCountField'); }; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/anomaly_explorer.ts b/x-pack/test/functional/apps/ml/anomaly_detection/anomaly_explorer.ts index c23abead458f1..89308938cfab0 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/anomaly_explorer.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/anomaly_explorer.ts @@ -51,7 +51,6 @@ const testDataList = [ }, ]; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts index 0f8aad36ed372..1581bd54f5c44 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/categorization_job.ts @@ -8,7 +8,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; import { CATEGORY_EXAMPLES_VALIDATION_STATUS } from '../../../../../plugins/ml/common/constants/categorization_job'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts index da56d96d3d59e..50622604c4e5c 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/date_nanos_job.ts @@ -81,7 +81,6 @@ const isPickFieldsConfigWithSummaryCountField = ( return arg.hasOwnProperty('summaryCountField'); }; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/multi_metric_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/multi_metric_job.ts index 945717a694aac..85477b105abe9 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/multi_metric_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/multi_metric_job.ts @@ -7,7 +7,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/population_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/population_job.ts index 8084856aa7c6b..c6de7f8a2bd39 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/population_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/population_job.ts @@ -7,7 +7,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/saved_search_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/saved_search_job.ts index c1276c158eb64..6f40ec5427b74 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/saved_search_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/saved_search_job.ts @@ -7,7 +7,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts index 58d7d7c3ad359..58f3960153bc6 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts @@ -7,7 +7,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_viewer.ts b/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_viewer.ts index b9c40d319dea5..db511c5d75f39 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_viewer.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection/single_metric_viewer.ts @@ -34,7 +34,6 @@ const DATAFEED_CONFIG: Datafeed = { query: { bool: { must: [{ match_all: {} }] } }, }; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); diff --git a/x-pack/test/functional/apps/ml/data_visualizer/file_data_visualizer.ts b/x-pack/test/functional/apps/ml/data_visualizer/file_data_visualizer.ts index fc561a7a93c2d..3c9111c246630 100644 --- a/x-pack/test/functional/apps/ml/data_visualizer/file_data_visualizer.ts +++ b/x-pack/test/functional/apps/ml/data_visualizer/file_data_visualizer.ts @@ -8,7 +8,6 @@ import path from 'path'; import { FtrProviderContext } from '../../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const ml = getService('ml'); diff --git a/x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer.ts b/x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer.ts index aec9153640636..eb76a8b4298af 100644 --- a/x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer.ts +++ b/x-pack/test/functional/apps/ml/data_visualizer/index_data_visualizer.ts @@ -38,7 +38,6 @@ function getFieldTypes(cards: FieldVisConfig[]) { return fieldTypes.sort(); } -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); diff --git a/x-pack/test/functional_with_es_ssl/config.ts b/x-pack/test/functional_with_es_ssl/config.ts index 43192d906336d..5df5a4155efd3 100644 --- a/x-pack/test/functional_with_es_ssl/config.ts +++ b/x-pack/test/functional_with_es_ssl/config.ts @@ -25,7 +25,6 @@ const enabledActionTypes = [ 'test.rate-limit', ]; -// eslint-disable-next-line import/no-default-export export default async function ({ readConfigFile }: FtrConfigProviderContext) { const xpackFunctionalConfig = await readConfigFile(require.resolve('../functional/config.js')); diff --git a/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/public/plugin.ts b/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/public/plugin.ts index 503c328017a9a..b612f54120d42 100644 --- a/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/public/plugin.ts +++ b/x-pack/test/functional_with_es_ssl/fixtures/plugins/alerts/public/plugin.ts @@ -19,6 +19,7 @@ export interface AlertingExamplePublicSetupDeps { } export class AlertingFixturePlugin implements Plugin { + // eslint-disable-next-line @typescript-eslint/naming-convention public setup(core: CoreSetup, { alerts, triggers_actions_ui }: AlertingExamplePublicSetupDeps) { alerts.registerNavigation( 'alerting_fixture', diff --git a/x-pack/test/ingest_manager_api_integration/apis/agent_config/agent_config.ts b/x-pack/test/ingest_manager_api_integration/apis/agent_config/agent_config.ts index 89258600c85e1..6526dc63e212c 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/agent_config/agent_config.ts +++ b/x-pack/test/ingest_manager_api_integration/apis/agent_config/agent_config.ts @@ -59,6 +59,7 @@ export default function ({ getService }: FtrProviderContext) { description: 'Test', }) .expect(200); + // eslint-disable-next-line @typescript-eslint/naming-convention const { id, updated_at, ...newConfig } = item; expect(success).to.be(true); diff --git a/x-pack/test/licensing_plugin/public/updates.ts b/x-pack/test/licensing_plugin/public/updates.ts index 4604cfe032b0b..b939bd7a0f9eb 100644 --- a/x-pack/test/licensing_plugin/public/updates.ts +++ b/x-pack/test/licensing_plugin/public/updates.ts @@ -28,7 +28,7 @@ export default function (ftrContext: FtrProviderContext) { expect( await browser.executeAsync(async (cb) => { - const { setup, testUtils } = window.__coreProvider; + const { setup, testUtils } = window._coreProvider; // this call enforces signature check to detect license update // and causes license re-fetch await setup.core.http.get('/'); @@ -44,7 +44,7 @@ export default function (ftrContext: FtrProviderContext) { expect( await browser.executeAsync(async (cb) => { - const { setup, testUtils } = window.__coreProvider; + const { setup, testUtils } = window._coreProvider; // this call enforces signature check to detect license update // and causes license re-fetch await setup.core.http.get('/'); @@ -60,7 +60,7 @@ export default function (ftrContext: FtrProviderContext) { expect( await browser.executeAsync(async (cb) => { - const { setup, testUtils } = window.__coreProvider; + const { setup, testUtils } = window._coreProvider; // this call enforces signature check to detect license update // and causes license re-fetch await setup.core.http.get('/'); @@ -76,7 +76,7 @@ export default function (ftrContext: FtrProviderContext) { expect( await browser.executeAsync(async (cb) => { - const { setup, testUtils } = window.__coreProvider; + const { setup, testUtils } = window._coreProvider; // this call enforces signature check to detect license update // and causes license re-fetch await setup.core.http.get('/'); diff --git a/x-pack/test/mocha_decorations.d.ts b/x-pack/test/mocha_decorations.d.ts index 3574e717ef649..44f43a22de1f9 100644 --- a/x-pack/test/mocha_decorations.d.ts +++ b/x-pack/test/mocha_decorations.d.ts @@ -7,7 +7,6 @@ import { Suite } from 'mocha'; // We need to use the namespace here to match the Mocha definition -// eslint-disable-next-line @typescript-eslint/no-namespace declare module 'mocha' { interface Suite { /** diff --git a/x-pack/test/oidc_api_integration/apis/implicit_flow/index.ts b/x-pack/test/oidc_api_integration/apis/implicit_flow/index.ts index 1c2f634f8054b..0acae074f129f 100644 --- a/x-pack/test/oidc_api_integration/apis/implicit_flow/index.ts +++ b/x-pack/test/oidc_api_integration/apis/implicit_flow/index.ts @@ -6,7 +6,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ loadTestFile }: FtrProviderContext) { describe('apis', function () { this.tags('ciGroup6'); diff --git a/x-pack/test/oidc_api_integration/apis/implicit_flow/oidc_auth.ts b/x-pack/test/oidc_api_integration/apis/implicit_flow/oidc_auth.ts index f35c72ea135c9..fbfb4df7fac63 100644 --- a/x-pack/test/oidc_api_integration/apis/implicit_flow/oidc_auth.ts +++ b/x-pack/test/oidc_api_integration/apis/implicit_flow/oidc_auth.ts @@ -11,7 +11,6 @@ import { format as formatURL } from 'url'; import { createTokens, getStateAndNonce } from '../../fixtures/oidc_tools'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertestWithoutAuth'); const config = getService('config'); diff --git a/x-pack/test/oidc_api_integration/implicit_flow.config.ts b/x-pack/test/oidc_api_integration/implicit_flow.config.ts index a3d87e809f887..992115d05c5a8 100644 --- a/x-pack/test/oidc_api_integration/implicit_flow.config.ts +++ b/x-pack/test/oidc_api_integration/implicit_flow.config.ts @@ -6,7 +6,6 @@ import { FtrConfigProviderContext } from '@kbn/test/types/ftr'; -// eslint-disable-next-line import/no-default-export export default async function ({ readConfigFile }: FtrConfigProviderContext) { const oidcAPITestsConfig = await readConfigFile(require.resolve('./config.ts')); diff --git a/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/feature_usage.ts b/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/feature_usage.ts index e16d55f8fad2c..770b51fb922ff 100644 --- a/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/feature_usage.ts +++ b/x-pack/test/plugin_api_integration/test_suites/licensed_feature_usage/feature_usage.ts @@ -7,7 +7,6 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); diff --git a/x-pack/test/plugin_functional/config.ts b/x-pack/test/plugin_functional/config.ts index a766e22a34a1d..40a3b3cf1877f 100644 --- a/x-pack/test/plugin_functional/config.ts +++ b/x-pack/test/plugin_functional/config.ts @@ -13,7 +13,6 @@ import { pageObjects } from './page_objects'; // the default export of config files must be a config provider // that returns an object with the projects config values -/* eslint-disable import/no-default-export */ export default async function ({ readConfigFile }: FtrConfigProviderContext) { const xpackFunctionalConfig = await readConfigFile( require.resolve('../security_solution_endpoint/config.ts') diff --git a/x-pack/test/plugin_functional/test_suites/global_search/global_search_api.ts b/x-pack/test/plugin_functional/test_suites/global_search/global_search_api.ts index 841c4d2967e21..146c4297fc2c8 100644 --- a/x-pack/test/plugin_functional/test_suites/global_search/global_search_api.ts +++ b/x-pack/test/plugin_functional/test_suites/global_search/global_search_api.ts @@ -15,7 +15,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const findResultsWithAPI = async (t: string): Promise => { return browser.executeAsync(async (term, cb) => { - const { start } = window.__coreProvider; + const { start } = window._coreProvider; const globalSearchTestApi: GlobalSearchTestApi = start.plugins.globalSearchTest; globalSearchTestApi.findTest(term).then(cb); }, t); diff --git a/x-pack/test/plugin_functional/test_suites/global_search/global_search_providers.ts b/x-pack/test/plugin_functional/test_suites/global_search/global_search_providers.ts index 4e4f42578d11a..726115958d027 100644 --- a/x-pack/test/plugin_functional/test_suites/global_search/global_search_providers.ts +++ b/x-pack/test/plugin_functional/test_suites/global_search/global_search_providers.ts @@ -16,7 +16,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const findResultsWithAPI = async (t: string): Promise => { return browser.executeAsync(async (term, cb) => { - const { start } = window.__coreProvider; + const { start } = window._coreProvider; const globalSearchTestApi: GlobalSearchTestApi = start.plugins.globalSearchTest; globalSearchTestApi.findReal(term).then(cb); }, t); diff --git a/x-pack/test/security_solution_cypress/runner.ts b/x-pack/test/security_solution_cypress/runner.ts index e3bea8b9bbbcf..11c960389e25f 100644 --- a/x-pack/test/security_solution_cypress/runner.ts +++ b/x-pack/test/security_solution_cypress/runner.ts @@ -26,6 +26,7 @@ export async function SiemCypressTestRunner({ getService }: FtrProviderContext) cwd: resolve(__dirname, '../../plugins/security_solution'), env: { FORCE_COLOR: '1', + // eslint-disable-next-line @typescript-eslint/naming-convention CYPRESS_baseUrl: Url.format(config.get('servers.kibana')), CYPRESS_ELASTICSEARCH_URL: Url.format(config.get('servers.elasticsearch')), CYPRESS_ELASTICSEARCH_USERNAME: config.get('servers.elasticsearch.username'), diff --git a/x-pack/test/spaces_api_integration/security_and_spaces/apis/get_all.ts b/x-pack/test/spaces_api_integration/security_and_spaces/apis/get_all.ts index 1420cb35de143..e64f721825089 100644 --- a/x-pack/test/spaces_api_integration/security_and_spaces/apis/get_all.ts +++ b/x-pack/test/spaces_api_integration/security_and_spaces/apis/get_all.ts @@ -20,6 +20,7 @@ export default function getAllSpacesTestSuite({ getService }: TestInvoker) { ); describe('get all', () => { + /* eslint-disable @typescript-eslint/naming-convention */ [ { spaceId: SPACES.DEFAULT.spaceId, @@ -73,6 +74,7 @@ export default function getAllSpacesTestSuite({ getService }: TestInvoker) { monitoringUser: AUTHENTICATION.MONITORING_USER, }, }, + /* eslint-enable @typescript-eslint/naming-convention */ ].forEach((scenario) => { getAllTest(`user with no access can't access any spaces from ${scenario.spaceId}`, { spaceId: scenario.spaceId, diff --git a/x-pack/test/ui_capabilities/common/config.ts b/x-pack/test/ui_capabilities/common/config.ts index 068974386acd7..477a3f702ffbf 100644 --- a/x-pack/test/ui_capabilities/common/config.ts +++ b/x-pack/test/ui_capabilities/common/config.ts @@ -14,7 +14,6 @@ interface CreateTestConfigOptions { disabledPlugins?: string[]; } -// eslint-disable-next-line import/no-default-export export function createTestConfig(name: string, options: CreateTestConfigOptions) { const { license = 'trial', disabledPlugins = [] } = options; diff --git a/x-pack/test/ui_capabilities/common/nav_links_builder.ts b/x-pack/test/ui_capabilities/common/nav_links_builder.ts index 04ab08e08a2ba..886318be8e758 100644 --- a/x-pack/test/ui_capabilities/common/nav_links_builder.ts +++ b/x-pack/test/ui_capabilities/common/nav_links_builder.ts @@ -5,7 +5,7 @@ */ import { Features } from './features'; -type buildCallback = (featureId: string) => boolean; +type BuildCallback = (featureId: string) => boolean; export class NavLinksBuilder { private readonly features: Features; constructor(features: Features) { @@ -38,7 +38,7 @@ export class NavLinksBuilder { return this.build((featureId) => feature.includes(featureId)); } - private build(callback: buildCallback): Record { + private build(callback: BuildCallback): Record { const navLinks = {} as Record; for (const [featureId, feature] of Object.entries(this.features)) { feature.app.forEach((app) => { diff --git a/x-pack/typings/rison_node.d.ts b/x-pack/typings/rison_node.d.ts index f830adc897445..295392af2e05b 100644 --- a/x-pack/typings/rison_node.d.ts +++ b/x-pack/typings/rison_node.d.ts @@ -16,11 +16,11 @@ declare module 'rison-node' { export const decode: (input: string) => RisonValue; - // eslint-disable-next-line @typescript-eslint/camelcase + // eslint-disable-next-line @typescript-eslint/naming-convention export const decode_object: (input: string) => RisonObject; export const encode: (input: Input) => string; - // eslint-disable-next-line @typescript-eslint/camelcase + // eslint-disable-next-line @typescript-eslint/naming-convention export const encode_object: (input: Input) => string; } diff --git a/yarn.lock b/yarn.lock index 0638267afd256..7aff34fab23ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5798,23 +5798,26 @@ resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d" integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg== -"@typescript-eslint/eslint-plugin@^2.34.0": - version "2.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz#6f8ce8a46c7dea4a6f1d171d2bb8fbae6dac2be9" - integrity sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ== +"@typescript-eslint/eslint-plugin@^3.7.1": + version "3.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.7.1.tgz#d144c49a9a0ffe8dd704bb179c243df76c111bc9" + integrity sha512-3DB9JDYkMrc8Au00rGFiJLK2Ja9CoMP6Ut0sHsXp3ZtSugjNxvSSHTnKLfo4o+QmjYBJqEznDqsG1zj4F2xnsg== dependencies: - "@typescript-eslint/experimental-utils" "2.34.0" + "@typescript-eslint/experimental-utils" "3.7.1" + debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" + semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@2.34.0": - version "2.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz#d3524b644cdb40eebceca67f8cf3e4cc9c8f980f" - integrity sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA== +"@typescript-eslint/experimental-utils@3.7.1": + version "3.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.7.1.tgz#ab036caaed4c870d22531d41f9352f3147364d61" + integrity sha512-TqE97pv7HrqWcGJbLbZt1v59tcqsSVpWTOf1AqrWK7n8nok2sGgVtYRuGXeNeLw3wXlLEbY1MKP3saB2HsO/Ng== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.34.0" + "@typescript-eslint/types" "3.7.1" + "@typescript-eslint/typescript-estree" "3.7.1" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -5827,16 +5830,22 @@ "@typescript-eslint/typescript-estree" "2.15.0" eslint-scope "^5.0.0" -"@typescript-eslint/parser@^2.34.0": - version "2.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.34.0.tgz#50252630ca319685420e9a39ca05fe185a256bc8" - integrity sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA== +"@typescript-eslint/parser@^3.7.1": + version "3.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.7.1.tgz#5d9ccecb116d12d9c6073e9861c57c9b1aa88128" + integrity sha512-W4QV/gXvfIsccN8225784LNOorcm7ch68Fi3V4Wg7gmkWSQRKevO4RrRqWo6N/Z/myK1QAiGgeaXN57m+R/8iQ== dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "2.34.0" - "@typescript-eslint/typescript-estree" "2.34.0" + "@typescript-eslint/experimental-utils" "3.7.1" + "@typescript-eslint/types" "3.7.1" + "@typescript-eslint/typescript-estree" "3.7.1" eslint-visitor-keys "^1.1.0" +"@typescript-eslint/types@3.7.1": + version "3.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.7.1.tgz#90375606b2fd73c1224fe9e397ee151e28fa1e0c" + integrity sha512-PZe8twm5Z4b61jt7GAQDor6KiMhgPgf4XmUb9zdrwTbgtC/Sj29gXP1dws9yEn4+aJeyXrjsD9XN7AWFhmnUfg== + "@typescript-eslint/typescript-estree@2.15.0": version "2.15.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.15.0.tgz#79ae52eed8701b164d91e968a65d85a9105e76d3" @@ -5850,13 +5859,14 @@ semver "^6.3.0" tsutils "^3.17.1" -"@typescript-eslint/typescript-estree@2.34.0": - version "2.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz#14aeb6353b39ef0732cc7f1b8285294937cf37d5" - integrity sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg== +"@typescript-eslint/typescript-estree@3.7.1": + version "3.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.7.1.tgz#ce1ffbd0fa53f34d4ce851a7a364e392432f6eb3" + integrity sha512-m97vNZkI08dunYOr2lVZOHoyfpqRs0KDpd6qkGaIcLGhQ2WPtgHOd/eVbsJZ0VYCQvupKrObAGTOvk3tfpybYA== dependencies: + "@typescript-eslint/types" "3.7.1" + "@typescript-eslint/visitor-keys" "3.7.1" debug "^4.1.1" - eslint-visitor-keys "^1.1.0" glob "^7.1.6" is-glob "^4.0.1" lodash "^4.17.15" @@ -5871,6 +5881,13 @@ lodash.unescape "4.0.1" semver "5.5.0" +"@typescript-eslint/visitor-keys@3.7.1": + version "3.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.7.1.tgz#b90191e74efdee656be8c5a30f428ed16dda46d1" + integrity sha512-xn22sQbEya+Utj2IqJHGLA3i1jDzR43RzWupxojbSWnj3nnPLavaQmWe5utw03CwYao3r00qzXfgJMGNkrzrAA== + dependencies: + eslint-visitor-keys "^1.1.0" + "@webassemblyjs/ast@1.8.5": version "1.8.5" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" @@ -13070,6 +13087,14 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" +eslint-plugin-eslint-comments@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz#9e1cd7b4413526abb313933071d7aba05ca12ffa" + integrity sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ== + dependencies: + escape-string-regexp "^1.0.5" + ignore "^5.0.5" + eslint-plugin-import@^2.19.1: version "2.19.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.19.1.tgz#5654e10b7839d064dd0d46cd1b88ec2133a11448" @@ -16946,7 +16971,7 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4: +ignore@^5.0.5, ignore@^5.1.1, ignore@^5.1.4: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== From 549c256390383ee08bcbe3744c42eb226acc18b5 Mon Sep 17 00:00:00 2001 From: MadameSheema Date: Wed, 5 Aug 2020 17:45:30 +0200 Subject: [PATCH 12/34] [SIEM] Adds rule override Cypress tests (#74367) * implements rule override test * refactors the code --- .../alerts_detection_rules_override.spec.ts | 196 ++++++++++++++++++ .../security_solution/cypress/objects/rule.ts | 50 +++++ .../cypress/screens/create_new_rule.ts | 16 ++ .../cypress/screens/rule_details.ts | 18 ++ .../cypress/tasks/create_new_rule.ts | 76 ++++++- .../rules/risk_score_mapping/index.tsx | 2 +- .../rules/severity_mapping/index.tsx | 8 +- .../rules/step_about_rule/index.tsx | 4 +- 8 files changed, 364 insertions(+), 6 deletions(-) create mode 100644 x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_override.spec.ts diff --git a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_override.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_override.spec.ts new file mode 100644 index 0000000000000..e3526c63e2310 --- /dev/null +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_override.spec.ts @@ -0,0 +1,196 @@ +/* + * 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 { newOverrideRule } from '../objects/rule'; + +import { + CUSTOM_RULES_BTN, + RISK_SCORE, + RULE_NAME, + RULES_ROW, + RULES_TABLE, + SEVERITY, +} from '../screens/alerts_detection_rules'; +import { + ABOUT_INVESTIGATION_NOTES, + ABOUT_OVERRIDE_FALSE_POSITIVES, + ABOUT_OVERRIDE_MITRE, + ABOUT_OVERRIDE_NAME_OVERRIDE, + ABOUT_OVERRIDE_RISK, + ABOUT_OVERRIDE_RISK_OVERRIDE, + ABOUT_OVERRIDE_SEVERITY_OVERRIDE, + ABOUT_OVERRIDE_TAGS, + ABOUT_OVERRIDE_TIMESTAMP_OVERRIDE, + ABOUT_OVERRIDE_URLS, + ABOUT_RULE_DESCRIPTION, + ABOUT_SEVERITY, + ABOUT_STEP, + DEFINITION_CUSTOM_QUERY, + DEFINITION_INDEX_PATTERNS, + DEFINITION_TIMELINE, + DEFINITION_STEP, + INVESTIGATION_NOTES_MARKDOWN, + INVESTIGATION_NOTES_TOGGLE, + RULE_ABOUT_DETAILS_HEADER_TOGGLE, + RULE_NAME_HEADER, + SCHEDULE_LOOPBACK, + SCHEDULE_RUNS, + SCHEDULE_STEP, +} from '../screens/rule_details'; + +import { + goToManageAlertsDetectionRules, + waitForAlertsIndexToBeCreated, + waitForAlertsPanelToBeLoaded, +} from '../tasks/alerts'; +import { + changeToThreeHundredRowsPerPage, + filterByCustomRules, + goToCreateNewRule, + goToRuleDetails, + waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded, + waitForRulesToBeLoaded, +} from '../tasks/alerts_detection_rules'; +import { + createAndActivateRule, + fillAboutRuleWithOverrideAndContinue, + fillDefineCustomRuleWithImportedQueryAndContinue, +} from '../tasks/create_new_rule'; +import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver'; +import { loginAndWaitForPageWithoutDateRange } from '../tasks/login'; + +import { DETECTIONS_URL } from '../urls/navigation'; + +describe('Detection rules, override', () => { + before(() => { + esArchiverLoad('timeline'); + }); + + after(() => { + esArchiverUnload('timeline'); + }); + + it('Creates and activates a new custom rule with override option', () => { + loginAndWaitForPageWithoutDateRange(DETECTIONS_URL); + waitForAlertsPanelToBeLoaded(); + waitForAlertsIndexToBeCreated(); + goToManageAlertsDetectionRules(); + waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded(); + goToCreateNewRule(); + fillDefineCustomRuleWithImportedQueryAndContinue(newOverrideRule); + fillAboutRuleWithOverrideAndContinue(newOverrideRule); + createAndActivateRule(); + + cy.get(CUSTOM_RULES_BTN).invoke('text').should('eql', 'Custom rules (1)'); + + changeToThreeHundredRowsPerPage(); + waitForRulesToBeLoaded(); + + const expectedNumberOfRules = 1; + cy.get(RULES_TABLE).then(($table) => { + cy.wrap($table.find(RULES_ROW).length).should('eql', expectedNumberOfRules); + }); + + filterByCustomRules(); + + cy.get(RULES_TABLE).then(($table) => { + cy.wrap($table.find(RULES_ROW).length).should('eql', 1); + }); + cy.get(RULE_NAME).invoke('text').should('eql', newOverrideRule.name); + cy.get(RISK_SCORE).invoke('text').should('eql', newOverrideRule.riskScore); + cy.get(SEVERITY).invoke('text').should('eql', newOverrideRule.severity); + cy.get('[data-test-subj="rule-switch"]').should('have.attr', 'aria-checked', 'true'); + + goToRuleDetails(); + + let expectedUrls = ''; + newOverrideRule.referenceUrls.forEach((url) => { + expectedUrls = expectedUrls + url; + }); + let expectedFalsePositives = ''; + newOverrideRule.falsePositivesExamples.forEach((falsePositive) => { + expectedFalsePositives = expectedFalsePositives + falsePositive; + }); + let expectedTags = ''; + newOverrideRule.tags.forEach((tag) => { + expectedTags = expectedTags + tag; + }); + let expectedMitre = ''; + newOverrideRule.mitre.forEach((mitre) => { + expectedMitre = expectedMitre + mitre.tactic; + mitre.techniques.forEach((technique) => { + expectedMitre = expectedMitre + technique; + }); + }); + const expectedIndexPatterns = [ + 'apm-*-transaction*', + 'auditbeat-*', + 'endgame-*', + 'filebeat-*', + 'logs-*', + 'packetbeat-*', + 'winlogbeat-*', + ]; + + cy.get(RULE_NAME_HEADER).invoke('text').should('eql', `${newOverrideRule.name} Beta`); + + cy.get(ABOUT_RULE_DESCRIPTION).invoke('text').should('eql', newOverrideRule.description); + + const expectedOverrideSeverities = ['Low', 'Medium', 'High', 'Critical']; + + cy.get(ABOUT_STEP).eq(ABOUT_SEVERITY).invoke('text').should('eql', newOverrideRule.severity); + newOverrideRule.severityOverride.forEach((severity, i) => { + cy.get(ABOUT_STEP) + .eq(ABOUT_OVERRIDE_SEVERITY_OVERRIDE + i) + .invoke('text') + .should( + 'eql', + `${severity.sourceField}:${severity.sourceValue}${expectedOverrideSeverities[i]}` + ); + }); + + cy.get(ABOUT_STEP) + .eq(ABOUT_OVERRIDE_RISK) + .invoke('text') + .should('eql', newOverrideRule.riskScore); + cy.get(ABOUT_STEP) + .eq(ABOUT_OVERRIDE_RISK_OVERRIDE) + .invoke('text') + .should('eql', `${newOverrideRule.riskOverride}signal.rule.risk_score`); + cy.get(ABOUT_STEP).eq(ABOUT_OVERRIDE_URLS).invoke('text').should('eql', expectedUrls); + cy.get(ABOUT_STEP) + .eq(ABOUT_OVERRIDE_FALSE_POSITIVES) + .invoke('text') + .should('eql', expectedFalsePositives); + cy.get(ABOUT_STEP) + .eq(ABOUT_OVERRIDE_NAME_OVERRIDE) + .invoke('text') + .should('eql', newOverrideRule.nameOverride); + cy.get(ABOUT_STEP).eq(ABOUT_OVERRIDE_MITRE).invoke('text').should('eql', expectedMitre); + cy.get(ABOUT_STEP) + .eq(ABOUT_OVERRIDE_TIMESTAMP_OVERRIDE) + .invoke('text') + .should('eql', newOverrideRule.timestampOverride); + cy.get(ABOUT_STEP).eq(ABOUT_OVERRIDE_TAGS).invoke('text').should('eql', expectedTags); + + cy.get(RULE_ABOUT_DETAILS_HEADER_TOGGLE).eq(INVESTIGATION_NOTES_TOGGLE).click({ force: true }); + cy.get(ABOUT_INVESTIGATION_NOTES).invoke('text').should('eql', INVESTIGATION_NOTES_MARKDOWN); + + cy.get(DEFINITION_INDEX_PATTERNS).then((patterns) => { + cy.wrap(patterns).each((pattern, index) => { + cy.wrap(pattern).invoke('text').should('eql', expectedIndexPatterns[index]); + }); + }); + cy.get(DEFINITION_STEP) + .eq(DEFINITION_CUSTOM_QUERY) + .invoke('text') + .should('eql', `${newOverrideRule.customQuery} `); + cy.get(DEFINITION_STEP).eq(DEFINITION_TIMELINE).invoke('text').should('eql', 'None'); + + cy.get(SCHEDULE_STEP).eq(SCHEDULE_RUNS).invoke('text').should('eql', '5m'); + cy.get(SCHEDULE_STEP).eq(SCHEDULE_LOOPBACK).invoke('text').should('eql', '1m'); + }); +}); diff --git a/x-pack/plugins/security_solution/cypress/objects/rule.ts b/x-pack/plugins/security_solution/cypress/objects/rule.ts index aeadc34c6e49c..df6b792296f9d 100644 --- a/x-pack/plugins/security_solution/cypress/objects/rule.ts +++ b/x-pack/plugins/security_solution/cypress/objects/rule.ts @@ -18,6 +18,11 @@ interface Mitre { techniques: string[]; } +interface SeverityOverride { + sourceField: string; + sourceValue: string; +} + export interface CustomRule { customQuery: string; name: string; @@ -38,6 +43,13 @@ export interface ThresholdRule extends CustomRule { threshold: string; } +export interface OverrideRule extends CustomRule { + severityOverride: SeverityOverride[]; + riskOverride: string; + nameOverride: string; + timestampOverride: string; +} + export interface MachineLearningRule { machineLearningJob: string; anomalyScoreThreshold: string; @@ -63,6 +75,26 @@ const mitre2: Mitre = { techniques: ['CMSTP (T1191)'], }; +const severityOverride1: SeverityOverride = { + sourceField: 'host.name', + sourceValue: 'host', +}; + +const severityOverride2: SeverityOverride = { + sourceField: 'agent.type', + sourceValue: 'endpoint', +}; + +const severityOverride3: SeverityOverride = { + sourceField: 'host.geo.name', + sourceValue: 'atack', +}; + +const severityOverride4: SeverityOverride = { + sourceField: '@timestamp', + sourceValue: '10/02/2020', +}; + export const newRule: CustomRule = { customQuery: 'host.name:*', name: 'New Rule Test', @@ -77,6 +109,24 @@ export const newRule: CustomRule = { timelineId: '0162c130-78be-11ea-9718-118a926974a4', }; +export const newOverrideRule: OverrideRule = { + customQuery: 'host.name:*', + name: 'New Rule Test', + description: 'The new rule description.', + severity: 'High', + riskScore: '17', + tags: ['test', 'newRule'], + referenceUrls: ['https://www.google.com/', 'https://elastic.co/'], + falsePositivesExamples: ['False1', 'False2'], + mitre: [mitre1, mitre2], + note: '# test markdown', + timelineId: '0162c130-78be-11ea-9718-118a926974a4', + severityOverride: [severityOverride1, severityOverride2, severityOverride3, severityOverride4], + riskOverride: 'destination.port', + nameOverride: 'agent.type', + timestampOverride: '@timestamp', +}; + export const newThresholdRule: ThresholdRule = { customQuery: 'host.name:*', name: 'New Rule Test', diff --git a/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts index af4fe7257ae5b..83ace877cd51d 100644 --- a/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts +++ b/x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts @@ -18,6 +18,8 @@ export const MITRE_BTN = '[data-test-subj="addMitre"]'; export const ADVANCED_SETTINGS_BTN = '[data-test-subj="advancedSettings"] .euiAccordion__button'; +export const COMBO_BOX_INPUT = '[data-test-subj="comboBoxInput"]'; + export const CREATE_AND_ACTIVATE_BTN = '[data-test-subj="create-activate"]'; export const CUSTOM_QUERY_INPUT = '[data-test-subj="queryInput"]'; @@ -53,17 +55,31 @@ export const REFERENCE_URLS_INPUT = export const RISK_INPUT = '.euiRangeInput'; +export const RISK_MAPPING_OVERRIDE_OPTION = '#risk_score-mapping-override'; + +export const RISK_OVERRIDE = + '[data-test-subj="detectionEngineStepAboutRuleRiskScore-riskOverride"]'; + export const RULE_DESCRIPTION_INPUT = '[data-test-subj="detectionEngineStepAboutRuleDescription"] [data-test-subj="input"]'; export const RULE_NAME_INPUT = '[data-test-subj="detectionEngineStepAboutRuleName"] [data-test-subj="input"]'; +export const RULE_NAME_OVERRIDE = '[data-test-subj="detectionEngineStepAboutRuleRuleNameOverride"]'; + +export const RULE_TIMESTAMP_OVERRIDE = + '[data-test-subj="detectionEngineStepAboutRuleTimestampOverride"]'; + export const SCHEDULE_CONTINUE_BUTTON = '[data-test-subj="schedule-continue"]'; export const SEVERITY_DROPDOWN = '[data-test-subj="detectionEngineStepAboutRuleSeverity"] [data-test-subj="select"]'; +export const SEVERITY_MAPPING_OVERRIDE_OPTION = '#severity-mapping-override'; + +export const SEVERITY_OVERRIDE_ROW = '[data-test-subj="severityOverrideRow"]'; + export const TAGS_INPUT = '[data-test-subj="detectionEngineStepAboutRuleTags"] [data-test-subj="comboBoxSearchInput"]'; diff --git a/x-pack/plugins/security_solution/cypress/screens/rule_details.ts b/x-pack/plugins/security_solution/cypress/screens/rule_details.ts index 1c0102382ab6b..b221709966943 100644 --- a/x-pack/plugins/security_solution/cypress/screens/rule_details.ts +++ b/x-pack/plugins/security_solution/cypress/screens/rule_details.ts @@ -10,6 +10,24 @@ export const ABOUT_INVESTIGATION_NOTES = '[data-test-subj="stepAboutDetailsNoteC export const ABOUT_MITRE = 4; +export const ABOUT_OVERRIDE_FALSE_POSITIVES = 8; + +export const ABOUT_OVERRIDE_MITRE = 10; + +export const ABOUT_OVERRIDE_NAME_OVERRIDE = 9; + +export const ABOUT_OVERRIDE_RISK = 5; + +export const ABOUT_OVERRIDE_RISK_OVERRIDE = 6; + +export const ABOUT_OVERRIDE_SEVERITY_OVERRIDE = 1; + +export const ABOUT_OVERRIDE_TAGS = 12; + +export const ABOUT_OVERRIDE_TIMESTAMP_OVERRIDE = 11; + +export const ABOUT_OVERRIDE_URLS = 7; + export const ABOUT_RULE_DESCRIPTION = '[data-test-subj=stepAboutRuleDetailsToggleDescriptionText]'; export const ABOUT_RISK = 1; diff --git a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts index de9d343bc91f7..1cce72a48e0f0 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts @@ -8,6 +8,7 @@ import { CustomRule, MachineLearningRule, machineLearningRule, + OverrideRule, ThresholdRule, } from '../objects/rule'; import { @@ -16,6 +17,7 @@ import { ADD_FALSE_POSITIVE_BTN, ADD_REFERENCE_URL_BTN, ADVANCED_SETTINGS_BTN, + COMBO_BOX_INPUT, CREATE_AND_ACTIVATE_BTN, CUSTOM_QUERY_INPUT, DEFINE_CONTINUE_BUTTON, @@ -32,10 +34,16 @@ import { MITRE_TECHNIQUES_INPUT, RISK_INPUT, REFERENCE_URLS_INPUT, + RISK_MAPPING_OVERRIDE_OPTION, + RISK_OVERRIDE, RULE_DESCRIPTION_INPUT, RULE_NAME_INPUT, + RULE_NAME_OVERRIDE, + RULE_TIMESTAMP_OVERRIDE, SCHEDULE_CONTINUE_BUTTON, SEVERITY_DROPDOWN, + SEVERITY_MAPPING_OVERRIDE_OPTION, + SEVERITY_OVERRIDE_ROW, TAGS_INPUT, THRESHOLD_FIELD_SELECTION, THRESHOLD_INPUT_AREA, @@ -92,7 +100,73 @@ export const fillAboutRuleAndContinue = ( cy.get(ABOUT_CONTINUE_BTN).should('exist').click({ force: true }); }; -export const fillDefineCustomRuleWithImportedQueryAndContinue = (rule: CustomRule) => { +export const fillAboutRuleWithOverrideAndContinue = (rule: OverrideRule) => { + cy.get(RULE_NAME_INPUT).type(rule.name, { force: true }); + cy.get(RULE_DESCRIPTION_INPUT).type(rule.description, { force: true }); + + cy.get(SEVERITY_MAPPING_OVERRIDE_OPTION).click(); + rule.severityOverride.forEach((severity, i) => { + cy.get(SEVERITY_OVERRIDE_ROW) + .eq(i) + .within(() => { + cy.get(COMBO_BOX_INPUT).eq(0).type(`${severity.sourceField}{enter}`); + cy.get(COMBO_BOX_INPUT).eq(1).type(`${severity.sourceValue}{enter}`); + }); + }); + + cy.get(SEVERITY_DROPDOWN).click({ force: true }); + cy.get(`#${rule.severity.toLowerCase()}`).click(); + + cy.get(RISK_MAPPING_OVERRIDE_OPTION).click(); + cy.get(RISK_OVERRIDE).within(() => { + cy.get(COMBO_BOX_INPUT).type(`${rule.riskOverride}{enter}`); + }); + + cy.get(RISK_INPUT).clear({ force: true }).type(`${rule.riskScore}`, { force: true }); + + rule.tags.forEach((tag) => { + cy.get(TAGS_INPUT).type(`${tag}{enter}`, { force: true }); + }); + + cy.get(ADVANCED_SETTINGS_BTN).click({ force: true }); + + rule.referenceUrls.forEach((url, index) => { + cy.get(REFERENCE_URLS_INPUT).eq(index).type(url, { force: true }); + cy.get(ADD_REFERENCE_URL_BTN).click({ force: true }); + }); + + rule.falsePositivesExamples.forEach((falsePositive, index) => { + cy.get(FALSE_POSITIVES_INPUT).eq(index).type(falsePositive, { force: true }); + cy.get(ADD_FALSE_POSITIVE_BTN).click({ force: true }); + }); + + rule.mitre.forEach((mitre, index) => { + cy.get(MITRE_TACTIC_DROPDOWN).eq(index).click({ force: true }); + cy.contains(MITRE_TACTIC, mitre.tactic).click(); + + mitre.techniques.forEach((technique) => { + cy.get(MITRE_TECHNIQUES_INPUT).eq(index).type(`${technique}{enter}`, { force: true }); + }); + + cy.get(MITRE_BTN).click({ force: true }); + }); + + cy.get(INVESTIGATION_NOTES_TEXTAREA).type(rule.note, { force: true }); + + cy.get(RULE_NAME_OVERRIDE).within(() => { + cy.get(COMBO_BOX_INPUT).type(`${rule.nameOverride}{enter}`); + }); + + cy.get(RULE_TIMESTAMP_OVERRIDE).within(() => { + cy.get(COMBO_BOX_INPUT).type(`${rule.timestampOverride}{enter}`); + }); + + cy.get(ABOUT_CONTINUE_BTN).should('exist').click({ force: true }); +}; + +export const fillDefineCustomRuleWithImportedQueryAndContinue = ( + rule: CustomRule | OverrideRule +) => { cy.get(IMPORT_QUERY_FROM_SAVED_TIMELINE_LINK).click(); cy.get(TIMELINE(rule.timelineId)).click(); cy.get(CUSTOM_QUERY_INPUT).invoke('text').should('eq', rule.customQuery); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx index 0f16cb99862a5..a0384ef52a841 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx @@ -179,7 +179,7 @@ export const RiskScoreField = ({ error={'errorMessage'} isInvalid={false} fullWidth - data-test-subj={dataTestSubj} + data-test-subj={`${dataTestSubj}-riskOverride`} describedByIds={idAria ? [idAria] : undefined} > diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx index 54d505a4d867f..733e701cff204 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx @@ -220,7 +220,7 @@ export const SeverityField = ({ error={'errorMessage'} isInvalid={false} fullWidth - data-test-subj={dataTestSubj} + data-test-subj={`${dataTestSubj}-severityOverride`} describedByIds={idAria ? [idAria] : undefined} > @@ -245,7 +245,11 @@ export const SeverityField = ({ {(field.value as AboutStepSeverity).mapping.map( (severityMappingItem: SeverityMappingItem, index) => ( - + = ({ path="severity" component={SeverityField} componentProps={{ - 'data-test-subj': 'detectionEngineStepAboutRuleSeverityField', + dataTestSubj: 'detectionEngineStepAboutRuleSeverityField', idAria: 'detectionEngineStepAboutRuleSeverityField', isDisabled: isLoading || indexPatternLoading, options: severityOptions, @@ -158,7 +158,7 @@ const StepAboutRuleComponent: FC = ({ path="riskScore" component={RiskScoreField} componentProps={{ - 'data-test-subj': 'detectionEngineStepAboutRuleRiskScore', + dataTestSubj: 'detectionEngineStepAboutRuleRiskScore', idAria: 'detectionEngineStepAboutRuleRiskScore', isDisabled: isLoading || indexPatternLoading, indices: indexPatterns, From e23c5eafa1171bc074d1aa33fa7e24b99cbb131c Mon Sep 17 00:00:00 2001 From: Yara Tercero Date: Wed, 5 Aug 2020 12:10:28 -0400 Subject: [PATCH 13/34] [Security Solution][Exceptions] - Fixes builder overflow and updates ux for nested entries (#74262) ## Summary - updates the builder nested entries so that the children do not display the parent path - so instead of `parent.child` it just shows `child` - updates the builder to fix overflow issue --- .../common/components/autocomplete/field.tsx | 10 ++++--- .../common/components/autocomplete/helpers.ts | 5 ++-- .../exceptions/builder/entry_item.tsx | 9 +++++-- .../exceptions/builder/exception_item.tsx | 13 +++++++--- .../exceptions/builder/helpers.test.tsx | 11 +++----- .../components/exceptions/builder/helpers.tsx | 26 +++++++++++++------ .../exceptions/viewer/index.test.tsx | 2 ++ 7 files changed, 50 insertions(+), 26 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/components/autocomplete/field.tsx b/x-pack/plugins/security_solution/public/common/components/autocomplete/field.tsx index fab2b1e4a7463..48b24a79bd7c0 100644 --- a/x-pack/plugins/security_solution/public/common/components/autocomplete/field.tsx +++ b/x-pack/plugins/security_solution/public/common/components/autocomplete/field.tsx @@ -36,11 +36,11 @@ export const FieldComponent: React.FC = ({ onChange, }): JSX.Element => { const [touched, setIsTouched] = useState(false); - const getLabel = useCallback((field): string => field.name, []); + const getLabel = useCallback(({ name }): string => name, []); const optionsMemo = useMemo((): IFieldType[] => { if (indexPattern != null) { if (fieldTypeFilter.length > 0) { - return indexPattern.fields.filter((f) => fieldTypeFilter.includes(f.type)); + return indexPattern.fields.filter(({ type }) => fieldTypeFilter.includes(type)); } else { return indexPattern.fields; } @@ -68,6 +68,10 @@ export const FieldComponent: React.FC = ({ onChange(newValues); }; + const handleTouch = useCallback((): void => { + setIsTouched(true); + }, [setIsTouched]); + return ( = ({ isDisabled={isDisabled} isClearable={isClearable} isInvalid={isRequired ? touched && selectedField == null : false} - onFocus={() => setIsTouched(true)} + onFocus={handleTouch} singleSelection={{ asPlainText: true }} data-test-subj="fieldAutocompleteComboBox" style={{ width: `${fieldInputWidth}px` }} diff --git a/x-pack/plugins/security_solution/public/common/components/autocomplete/helpers.ts b/x-pack/plugins/security_solution/public/common/components/autocomplete/helpers.ts index 3dcaf612da649..8bbc022181475 100644 --- a/x-pack/plugins/security_solution/public/common/components/autocomplete/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/components/autocomplete/helpers.ts @@ -69,11 +69,12 @@ export function getGenericComboBoxProps({ const newLabels = options.map(getLabel); const newComboOptions: EuiComboBoxOptionOption[] = newLabels.map((label) => ({ label })); const newSelectedComboOptions = selectedOptions + .map(getLabel) .filter((option) => { - return options.indexOf(option) !== -1; + return newLabels.indexOf(option) !== -1; }) .map((option) => { - return newComboOptions[options.indexOf(option)]; + return newComboOptions[newLabels.indexOf(option)]; }); return { diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/entry_item.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/entry_item.tsx index 3044f6d01b745..450b48a793e4e 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/entry_item.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/entry_item.tsx @@ -5,6 +5,7 @@ */ import React, { useCallback } from 'react'; import { EuiFormRow, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import styled from 'styled-components'; import { IFieldType, IIndexPattern } from '../../../../../../../../src/plugins/data/common'; import { FieldComponent } from '../../autocomplete/field'; @@ -29,6 +30,10 @@ import { } from './helpers'; import { EXCEPTION_OPERATORS_ONLY_LISTS } from '../../autocomplete/operators'; +const MyValuesInput = styled(EuiFlexItem)` + overflow: hidden; +`; + interface EntryItemProps { entry: FormattedBuilderEntry; indexPattern: IIndexPattern; @@ -257,12 +262,12 @@ export const BuilderEntryItem: React.FC = ({ > {renderFieldInput(showLabel)} {renderOperatorInput(showLabel)} - + {renderFieldValueInput( showLabel, entry.nested === 'parent' ? OperatorTypeEnum.EXISTS : entry.operator.type )} - + ); }; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/exception_item.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/exception_item.tsx index cd8b66acd223a..49a159cdfe623 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/exception_item.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/exception_item.tsx @@ -26,6 +26,11 @@ const MyBeautifulLine = styled(EuiFlexItem)` } `; +const MyOverflowContainer = styled(EuiFlexItem)` + overflow: hidden; + width: 100%; +`; + interface BuilderExceptionListItemProps { exceptionItem: ExceptionsBuilderExceptionItem; exceptionId: string; @@ -98,13 +103,13 @@ export const BuilderExceptionListItemComponent = React.memo )} - + {entries.map((item, index) => ( {item.nested === 'child' && } - + - + ))} - + ); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.test.tsx index a3c5d09a0fb64..04ab9ee7216f7 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.test.tsx @@ -161,10 +161,7 @@ describe('Exception builder helpers', () => { const payloadItem: FormattedBuilderEntry = getMockNestedBuilderEntry(); const output = getFilteredIndexPatterns(payloadIndexPattern, payloadItem, 'detection'); const expected: IIndexPattern = { - fields: [ - { ...getField('nestedField.child') }, - { ...getField('nestedField.nestedChild.doublyNestedChild') }, - ], + fields: [{ ...getField('nestedField.child'), name: 'child' }], id: '1234', title: 'logstash-*', }; @@ -243,7 +240,7 @@ describe('Exception builder helpers', () => { }; const output = getFilteredIndexPatterns(payloadIndexPattern, payloadItem, 'endpoint'); const expected: IIndexPattern = { - fields: [getEndpointField('file.Ext.code_signature.status')], + fields: [{ ...getEndpointField('file.Ext.code_signature.status'), name: 'status' }], id: '1234', title: 'logstash-*', }; @@ -405,7 +402,7 @@ describe('Exception builder helpers', () => { aggregatable: false, count: 0, esTypes: ['text'], - name: 'nestedField.child', + name: 'child', readFromDocValues: false, scripted: false, searchable: true, @@ -600,7 +597,7 @@ describe('Exception builder helpers', () => { aggregatable: false, count: 0, esTypes: ['text'], - name: 'nestedField.child', + name: 'child', readFromDocValues: false, scripted: false, searchable: true, diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.tsx index bea1eb8f0e17b..2fda14dfa04d7 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/builder/helpers.tsx @@ -60,13 +60,20 @@ export const getFilteredIndexPatterns = ( // when user has selected a nested entry, only fields with the common parent are shown return { ...indexPatterns, - fields: indexPatterns.fields.filter( - (field) => - field.subType != null && - field.subType.nested != null && - item.parent != null && - field.subType.nested.path.startsWith(item.parent.parent.field) - ), + fields: indexPatterns.fields + .filter((indexField) => { + const fieldHasCommonParentPath = + indexField.subType != null && + indexField.subType.nested != null && + item.parent != null && + indexField.subType.nested.path === item.parent.parent.field; + + return fieldHasCommonParentPath; + }) + .map((f) => { + const fieldNameWithoutParentPath = f.name.split('.').slice(-1)[0]; + return { ...f, name: fieldNameWithoutParentPath }; + }), }; } else if (item.nested === 'parent' && item.field != null) { // when user has selected a nested entry, right above it we show the common parent @@ -145,7 +152,10 @@ export const getFormattedBuilderEntry = ( if (parent != null && parentIndex != null) { return { - field: foundField, + field: + foundField != null + ? { ...foundField, name: foundField.name.split('.').slice(-1)[0] } + : foundField, correspondingKeywordField, operator: getExceptionOperatorSelect(item), value: getEntryValue(item), diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.test.tsx index 84613d1c73536..4c60f3ba5ccce 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.test.tsx @@ -17,6 +17,7 @@ import { useApi, } from '../../../../../public/lists_plugin_deps'; import { getExceptionListSchemaMock } from '../../../../../../lists/common/schemas/response/exception_list_schema.mock'; +import { getFoundExceptionListItemSchemaMock } from '../../../../../../lists/common/schemas/response/found_exception_list_item_schema.mock'; jest.mock('../../../../common/lib/kibana'); jest.mock('../../../../../public/lists_plugin_deps'); @@ -36,6 +37,7 @@ describe('ExceptionsViewer', () => { (useApi as jest.Mock).mockReturnValue({ deleteExceptionItem: jest.fn().mockResolvedValue(true), + getExceptionListsItems: jest.fn().mockResolvedValue(getFoundExceptionListItemSchemaMock()), }); (useExceptionList as jest.Mock).mockReturnValue([ From cf6413ab2f97493a808ebd16f2a29ed6a5fc75a5 Mon Sep 17 00:00:00 2001 From: Marta Bondyra Date: Wed, 5 Aug 2020 18:25:16 +0200 Subject: [PATCH 14/34] [Lens] fix chart switching when on VisualizationDimensionEditor (#70689) --- .../config_panel/layer_panel.test.tsx | 75 ++++++++++++++++--- .../editor_frame/config_panel/layer_panel.tsx | 37 +++++---- 2 files changed, 82 insertions(+), 30 deletions(-) diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx index 9545bd3c840da..b100c885466ab 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx @@ -24,6 +24,7 @@ jest.mock('../../../id_generator'); describe('LayerPanel', () => { let mockVisualization: jest.Mocked; + let mockVisualization2: jest.Mocked; let mockDatasource: DatasourceMock; function getDefaultProps() { @@ -36,6 +37,7 @@ describe('LayerPanel', () => { activeVisualizationId: 'vis1', visualizationMap: { vis1: mockVisualization, + vis2: mockVisualization2, }, activeDatasourceId: 'ds1', datasourceMap: { @@ -72,6 +74,18 @@ describe('LayerPanel', () => { ], }; + mockVisualization2 = { + ...createMockVisualization(), + id: 'testVis2', + visualizationTypes: [ + { + icon: 'empty', + id: 'testVis2', + label: 'TEST2', + }, + ], + }; + mockVisualization.getLayerIds.mockReturnValue(['first']); mockDatasource = createMockDatasource('ds1'); }); @@ -209,16 +223,6 @@ describe('LayerPanel', () => { const panel = mount(group.prop('panel')); expect(panel.find('EuiTabbedContent').prop('tabs')).toHaveLength(2); - act(() => { - panel.find('EuiTab#visualization').simulate('click'); - }); - expect(mockVisualization.renderDimensionEditor).toHaveBeenCalledWith( - expect.any(Element), - expect.objectContaining({ - groupId: 'a', - accessor: 'newid', - }) - ); }); it('should keep the popover open when configuring a new dimension', () => { @@ -267,5 +271,56 @@ describe('LayerPanel', () => { expect(component.find(EuiPopover).prop('isOpen')).toBe(true); }); + it('should close the popover when the active visualization changes', () => { + /** + * The ID generation system for new dimensions has been messy before, so + * this tests that the ID used in the first render is used to keep the popover + * open in future renders + */ + + (generateId as jest.Mock).mockReturnValueOnce(`newid`); + (generateId as jest.Mock).mockReturnValueOnce(`bad`); + mockVisualization.getConfiguration.mockReturnValueOnce({ + groups: [ + { + groupLabel: 'A', + groupId: 'a', + accessors: [], + filterOperations: () => true, + supportsMoreColumns: true, + dataTestSubj: 'lnsGroup', + }, + ], + }); + // Normally the configuration would change in response to a state update, + // but this test is updating it directly + mockVisualization.getConfiguration.mockReturnValueOnce({ + groups: [ + { + groupLabel: 'A', + groupId: 'a', + accessors: ['newid'], + filterOperations: () => true, + supportsMoreColumns: false, + dataTestSubj: 'lnsGroup', + }, + ], + }); + + const component = mountWithIntl(); + + const group = component.find('DimensionPopover'); + const triggerButton = mountWithIntl(group.prop('trigger')); + act(() => { + triggerButton.find('[data-test-subj="lns-empty-dimension"]').first().simulate('click'); + }); + component.update(); + expect(component.find(EuiPopover).prop('isOpen')).toBe(true); + act(() => { + component.setProps({ activeVisualizationId: 'vis2' }); + }); + component.update(); + expect(component.find(EuiPopover).prop('isOpen')).toBe(false); + }); }); }); diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx index f72b1429967d2..a384e339e8fbd 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { useContext, useState } from 'react'; +import React, { useContext, useState, useEffect } from 'react'; import { EuiPanel, EuiSpacer, @@ -26,6 +26,13 @@ import { generateId } from '../../../id_generator'; import { ConfigPanelWrapperProps, DimensionPopoverState } from './types'; import { DimensionPopover } from './dimension_popover'; +const initialPopoverState = { + isOpen: false, + openId: null, + addingToGroupId: null, + tabId: null, +}; + export function LayerPanel( props: Exclude & { layerId: string; @@ -41,15 +48,15 @@ export function LayerPanel( } ) { const dragDropContext = useContext(DragContext); - const [popoverState, setPopoverState] = useState({ - isOpen: false, - openId: null, - addingToGroupId: null, - tabId: null, - }); + const [popoverState, setPopoverState] = useState(initialPopoverState); const { framePublicAPI, layerId, isOnlyLayer, onRemoveLayer } = props; const datasourcePublicAPI = framePublicAPI.datasourceLayers[layerId]; + + useEffect(() => { + setPopoverState(initialPopoverState); + }, [props.activeVisualizationId]); + if ( !datasourcePublicAPI || !props.activeVisualizationId || @@ -243,12 +250,7 @@ export function LayerPanel( suggestedPriority: group.suggestedPriority, togglePopover: () => { if (popoverState.isOpen) { - setPopoverState({ - isOpen: false, - openId: null, - addingToGroupId: null, - tabId: null, - }); + setPopoverState(initialPopoverState); } else { setPopoverState({ isOpen: true, @@ -264,7 +266,7 @@ export function LayerPanel( panel={ t.id === popoverState.tabId)} + selectedTab={tabs.find((t) => t.id === popoverState.tabId) || tabs[0]} size="s" onTabClick={(tab) => { setPopoverState({ @@ -358,12 +360,7 @@ export function LayerPanel( })} onClick={() => { if (popoverState.isOpen) { - setPopoverState({ - isOpen: false, - openId: null, - addingToGroupId: null, - tabId: null, - }); + setPopoverState(initialPopoverState); } else { setPopoverState({ isOpen: true, From 5c770e5930f3302ded04a62d4f3f0125bb4ce7fb Mon Sep 17 00:00:00 2001 From: Gidi Meir Morris Date: Wed, 5 Aug 2020 17:35:38 +0100 Subject: [PATCH 15/34] [Task Manager] Correctly handle `running` tasks when calling RunNow and reduce flakiness in related tests (#73244) This PR addresses two issues which caused several tests to be flaky in TM. When `runNow` was introduced to TM we added a pinned query which returned specific tasks by ID. This query does not have the filter applied to it which causes task to return when they're already marked as `running` but we didn't address these correctly which caused flakyness in the tests. This didn't cause a broken beahviour, but it did cause beahviour that was hard to reason about - we now address them correctly. It seems that sometimes, especially if the ES queue is overworked, it can take some time for the update to the underlying task to be visible (we don't user `refresh:true` on purpose), so adding a wait for the index to refresh to make sure the task is updated in time for the next stage of the test. --- x-pack/plugins/alerts/server/alerts_client.ts | 17 ++- .../task_manager/server/task_events.ts | 6 +- .../task_manager/server/task_manager.test.ts | 31 ++-- .../task_manager/server/task_manager.ts | 104 +++++++------ .../task_manager/server/task_store.test.ts | 142 +++++++++++++++--- .../plugins/task_manager/server/task_store.ts | 37 ++++- .../task_manager_fixture/server/plugin.ts | 20 ++- .../sample_task_plugin/server/init_routes.ts | 15 ++ .../task_manager/task_manager_integration.js | 34 ++++- 9 files changed, 316 insertions(+), 90 deletions(-) diff --git a/x-pack/plugins/alerts/server/alerts_client.ts b/x-pack/plugins/alerts/server/alerts_client.ts index 256cae24e519f..dd66ccc7a0256 100644 --- a/x-pack/plugins/alerts/server/alerts_client.ts +++ b/x-pack/plugins/alerts/server/alerts_client.ts @@ -387,11 +387,18 @@ export class AlertsClient { updateResult.scheduledTaskId && !isEqual(alertSavedObject.attributes.schedule, updateResult.schedule) ) { - this.taskManager.runNow(updateResult.scheduledTaskId).catch((err: Error) => { - this.logger.error( - `Alert update failed to run its underlying task. TaskManager runNow failed with Error: ${err.message}` - ); - }); + this.taskManager + .runNow(updateResult.scheduledTaskId) + .then(() => { + this.logger.debug( + `Alert update has rescheduled the underlying task: ${updateResult.scheduledTaskId}` + ); + }) + .catch((err: Error) => { + this.logger.error( + `Alert update failed to run its underlying task. TaskManager runNow failed with Error: ${err.message}` + ); + }); } })(), ]); diff --git a/x-pack/plugins/task_manager/server/task_events.ts b/x-pack/plugins/task_manager/server/task_events.ts index b17a3636c1730..e1dd85f868cdd 100644 --- a/x-pack/plugins/task_manager/server/task_events.ts +++ b/x-pack/plugins/task_manager/server/task_events.ts @@ -4,6 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ +import { Option } from 'fp-ts/lib/Option'; + import { ConcreteTaskInstance } from './task'; import { Result, Err } from './lib/result_type'; @@ -22,7 +24,7 @@ export interface TaskEvent { } export type TaskMarkRunning = TaskEvent; export type TaskRun = TaskEvent; -export type TaskClaim = TaskEvent; +export type TaskClaim = TaskEvent>; export type TaskRunRequest = TaskEvent; export function asTaskMarkRunningEvent( @@ -46,7 +48,7 @@ export function asTaskRunEvent(id: string, event: Result + event: Result> ): TaskClaim { return { id, diff --git a/x-pack/plugins/task_manager/server/task_manager.test.ts b/x-pack/plugins/task_manager/server/task_manager.test.ts index 80215ffa7abba..7035971ad6061 100644 --- a/x-pack/plugins/task_manager/server/task_manager.test.ts +++ b/x-pack/plugins/task_manager/server/task_manager.test.ts @@ -7,6 +7,7 @@ import _ from 'lodash'; import sinon from 'sinon'; import { Subject } from 'rxjs'; +import { none } from 'fp-ts/lib/Option'; import { asTaskMarkRunningEvent, @@ -297,7 +298,9 @@ describe('TaskManager', () => { events$.next(asTaskMarkRunningEvent(id, asOk(task))); events$.next(asTaskRunEvent(id, asErr(new Error('some thing gone wrong')))); - return expect(result).rejects.toEqual(new Error('some thing gone wrong')); + return expect(result).rejects.toMatchInlineSnapshot( + `[Error: Failed to run task "01ddff11-e88a-4d13-bc4e-256164e755e2": Error: some thing gone wrong]` + ); }); test('rejects when the task mark as running fails', () => { @@ -311,7 +314,9 @@ describe('TaskManager', () => { events$.next(asTaskClaimEvent(id, asOk(task))); events$.next(asTaskMarkRunningEvent(id, asErr(new Error('some thing gone wrong')))); - return expect(result).rejects.toEqual(new Error('some thing gone wrong')); + return expect(result).rejects.toMatchInlineSnapshot( + `[Error: Failed to run task "01ddff11-e88a-4d13-bc4e-256164e755e2": Error: some thing gone wrong]` + ); }); test('when a task claim fails we ensure the task exists', async () => { @@ -321,7 +326,7 @@ describe('TaskManager', () => { const result = awaitTaskRunResult(id, events$, getLifecycle); - events$.next(asTaskClaimEvent(id, asErr(new Error('failed to claim')))); + events$.next(asTaskClaimEvent(id, asErr(none))); await expect(result).rejects.toEqual( new Error(`Failed to run task "${id}" as it does not exist`) @@ -337,7 +342,7 @@ describe('TaskManager', () => { const result = awaitTaskRunResult(id, events$, getLifecycle); - events$.next(asTaskClaimEvent(id, asErr(new Error('failed to claim')))); + events$.next(asTaskClaimEvent(id, asErr(none))); await expect(result).rejects.toEqual( new Error(`Failed to run task "${id}" as it is currently running`) @@ -353,7 +358,7 @@ describe('TaskManager', () => { const result = awaitTaskRunResult(id, events$, getLifecycle); - events$.next(asTaskClaimEvent(id, asErr(new Error('failed to claim')))); + events$.next(asTaskClaimEvent(id, asErr(none))); await expect(result).rejects.toEqual( new Error(`Failed to run task "${id}" as it is currently running`) @@ -386,9 +391,11 @@ describe('TaskManager', () => { const result = awaitTaskRunResult(id, events$, getLifecycle); - events$.next(asTaskClaimEvent(id, asErr(new Error('failed to claim')))); + events$.next(asTaskClaimEvent(id, asErr(none))); - await expect(result).rejects.toEqual(new Error('failed to claim')); + await expect(result).rejects.toMatchInlineSnapshot( + `[Error: Failed to run task "01ddff11-e88a-4d13-bc4e-256164e755e2" for unknown reason (Current Task Lifecycle is "idle")]` + ); expect(getLifecycle).toHaveBeenCalledWith(id); }); @@ -400,9 +407,11 @@ describe('TaskManager', () => { const result = awaitTaskRunResult(id, events$, getLifecycle); - events$.next(asTaskClaimEvent(id, asErr(new Error('failed to claim')))); + events$.next(asTaskClaimEvent(id, asErr(none))); - await expect(result).rejects.toEqual(new Error('failed to claim')); + await expect(result).rejects.toMatchInlineSnapshot( + `[Error: Failed to run task "01ddff11-e88a-4d13-bc4e-256164e755e2" for unknown reason (Current Task Lifecycle is "failed")]` + ); expect(getLifecycle).toHaveBeenCalledWith(id); }); @@ -424,7 +433,9 @@ describe('TaskManager', () => { events$.next(asTaskRunEvent(id, asErr(new Error('some thing gone wrong')))); - return expect(result).rejects.toEqual(new Error('some thing gone wrong')); + return expect(result).rejects.toMatchInlineSnapshot( + `[Error: Failed to run task "01ddff11-e88a-4d13-bc4e-256164e755e2": Error: some thing gone wrong]` + ); }); }); }); diff --git a/x-pack/plugins/task_manager/server/task_manager.ts b/x-pack/plugins/task_manager/server/task_manager.ts index 35ca439bb9130..7165fd28678c1 100644 --- a/x-pack/plugins/task_manager/server/task_manager.ts +++ b/x-pack/plugins/task_manager/server/task_manager.ts @@ -9,13 +9,14 @@ import { filter } from 'rxjs/operators'; import { performance } from 'perf_hooks'; import { pipe } from 'fp-ts/lib/pipeable'; -import { Option, some, map as mapOptional } from 'fp-ts/lib/Option'; +import { Option, some, map as mapOptional, getOrElse } from 'fp-ts/lib/Option'; + import { SavedObjectsSerializer, ILegacyScopedClusterClient, ISavedObjectsRepository, } from '../../../../src/core/server'; -import { Result, asErr, either, map, mapErr, promiseResult } from './lib/result_type'; +import { Result, asOk, asErr, either, map, mapErr, promiseResult } from './lib/result_type'; import { TaskManagerConfig } from './config'; import { Logger } from './types'; @@ -405,7 +406,9 @@ export async function claimAvailableTasks( if (docs.length !== claimedTasks) { logger.warn( - `[Task Ownership error]: (${claimedTasks}) tasks were claimed by Kibana, but (${docs.length}) tasks were fetched` + `[Task Ownership error]: ${claimedTasks} tasks were claimed by Kibana, but ${ + docs.length + } task(s) were fetched (${docs.map((doc) => doc.id).join(', ')})` ); } return docs; @@ -437,48 +440,65 @@ export async function awaitTaskRunResult( // listen for all events related to the current task .pipe(filter(({ id }: TaskLifecycleEvent) => id === taskId)) .subscribe((taskEvent: TaskLifecycleEvent) => { - either( - taskEvent.event, - (taskInstance: ConcreteTaskInstance) => { - // resolve if the task has run sucessfully - if (isTaskRunEvent(taskEvent)) { - subscription.unsubscribe(); - resolve({ id: taskInstance.id }); - } - }, - async (error: Error) => { + if (isTaskClaimEvent(taskEvent)) { + mapErr(async (error: Option) => { // reject if any error event takes place for the requested task subscription.unsubscribe(); - if (isTaskRunRequestEvent(taskEvent)) { - return reject( - new Error( - `Failed to run task "${taskId}" as Task Manager is at capacity, please try again later` - ) - ); - } else if (isTaskClaimEvent(taskEvent)) { - reject( - map( - // if the error happened in the Claim phase - we try to provide better insight - // into why we failed to claim by getting the task's current lifecycle status - await promiseResult(getLifecycle(taskId)), - (taskLifecycleStatus: TaskLifecycle) => { - if (taskLifecycleStatus === TaskLifecycleResult.NotFound) { - return new Error(`Failed to run task "${taskId}" as it does not exist`); - } else if ( - taskLifecycleStatus === TaskStatus.Running || - taskLifecycleStatus === TaskStatus.Claiming - ) { - return new Error(`Failed to run task "${taskId}" as it is currently running`); - } - return error; - }, - () => error - ) - ); + return reject( + map( + await pipe( + error, + mapOptional(async (taskReturnedBySweep) => asOk(taskReturnedBySweep.status)), + getOrElse(() => + // if the error happened in the Claim phase - we try to provide better insight + // into why we failed to claim by getting the task's current lifecycle status + promiseResult(getLifecycle(taskId)) + ) + ), + (taskLifecycleStatus: TaskLifecycle) => { + if (taskLifecycleStatus === TaskLifecycleResult.NotFound) { + return new Error(`Failed to run task "${taskId}" as it does not exist`); + } else if ( + taskLifecycleStatus === TaskStatus.Running || + taskLifecycleStatus === TaskStatus.Claiming + ) { + return new Error(`Failed to run task "${taskId}" as it is currently running`); + } + return new Error( + `Failed to run task "${taskId}" for unknown reason (Current Task Lifecycle is "${taskLifecycleStatus}")` + ); + }, + (getLifecycleError: Error) => + new Error( + `Failed to run task "${taskId}" and failed to get current Status:${getLifecycleError}` + ) + ) + ); + }, taskEvent.event); + } else { + either>( + taskEvent.event, + (taskInstance: ConcreteTaskInstance) => { + // resolve if the task has run sucessfully + if (isTaskRunEvent(taskEvent)) { + subscription.unsubscribe(); + resolve({ id: taskInstance.id }); + } + }, + async (error: Error | Option) => { + // reject if any error event takes place for the requested task + subscription.unsubscribe(); + if (isTaskRunRequestEvent(taskEvent)) { + return reject( + new Error( + `Failed to run task "${taskId}" as Task Manager is at capacity, please try again later` + ) + ); + } + return reject(new Error(`Failed to run task "${taskId}": ${error}`)); } - return reject(error); - } - ); + ); + } }); }); } diff --git a/x-pack/plugins/task_manager/server/task_store.test.ts b/x-pack/plugins/task_manager/server/task_store.test.ts index 771b4e2d7d9cb..d65c39f4f454d 100644 --- a/x-pack/plugins/task_manager/server/task_store.test.ts +++ b/x-pack/plugins/task_manager/server/task_store.test.ts @@ -8,6 +8,7 @@ import _ from 'lodash'; import sinon from 'sinon'; import uuid from 'uuid'; import { filter } from 'rxjs/operators'; +import { Option, some, none } from 'fp-ts/lib/Option'; import { TaskDictionary, @@ -972,7 +973,7 @@ if (doc['task.runAt'].size()!=0) { const runAt = new Date(); const tasks = [ { - _id: 'aaa', + _id: 'claimed-by-id', _source: { type: 'task', task: { @@ -980,7 +981,7 @@ if (doc['task.runAt'].size()!=0) { taskType: 'foo', schedule: undefined, attempts: 0, - status: 'idle', + status: 'claiming', params: '{ "hello": "world" }', state: '{ "baby": "Henhen" }', user: 'jimbo', @@ -996,7 +997,31 @@ if (doc['task.runAt'].size()!=0) { sort: ['a', 1], }, { - _id: 'bbb', + _id: 'claimed-by-schedule', + _source: { + type: 'task', + task: { + runAt, + taskType: 'bar', + schedule: { interval: '5m' }, + attempts: 2, + status: 'claiming', + params: '{ "shazm": 1 }', + state: '{ "henry": "The 8th" }', + user: 'dabo', + scope: ['reporting', 'ceo'], + ownerId: taskManagerId, + startedAt: null, + retryAt: null, + scheduledAt: new Date(), + }, + }, + _seq_no: 3, + _primary_term: 4, + sort: ['b', 2], + }, + { + _id: 'already-running', _source: { type: 'task', task: { @@ -1045,19 +1070,24 @@ if (doc['task.runAt'].size()!=0) { }); const sub = store.events - .pipe(filter((event: TaskEvent) => event.id === 'aaa')) + .pipe( + filter( + (event: TaskEvent>) => + event.id === 'claimed-by-id' + ) + ) .subscribe({ - next: (event: TaskEvent) => { + next: (event: TaskEvent>) => { expect(event).toMatchObject( asTaskClaimEvent( - 'aaa', + 'claimed-by-id', asOk({ - id: 'aaa', + id: 'claimed-by-id', runAt, taskType: 'foo', schedule: undefined, attempts: 0, - status: 'idle' as TaskStatus, + status: 'claiming' as TaskStatus, params: { hello: 'world' }, state: { baby: 'Henhen' }, user: 'jimbo', @@ -1075,7 +1105,7 @@ if (doc['task.runAt'].size()!=0) { }); await store.claimAvailableTasks({ - claimTasksById: ['aaa'], + claimTasksById: ['claimed-by-id'], claimOwnershipUntil: new Date(), size: 10, }); @@ -1102,19 +1132,24 @@ if (doc['task.runAt'].size()!=0) { }); const sub = store.events - .pipe(filter((event: TaskEvent) => event.id === 'bbb')) + .pipe( + filter( + (event: TaskEvent>) => + event.id === 'claimed-by-schedule' + ) + ) .subscribe({ - next: (event: TaskEvent) => { + next: (event: TaskEvent>) => { expect(event).toMatchObject( asTaskClaimEvent( - 'bbb', + 'claimed-by-schedule', asOk({ - id: 'bbb', + id: 'claimed-by-schedule', runAt, taskType: 'bar', schedule: { interval: '5m' }, attempts: 2, - status: 'running' as TaskStatus, + status: 'claiming' as TaskStatus, params: { shazm: 1 }, state: { henry: 'The 8th' }, user: 'dabo', @@ -1132,14 +1167,14 @@ if (doc['task.runAt'].size()!=0) { }); await store.claimAvailableTasks({ - claimTasksById: ['aaa'], + claimTasksById: ['claimed-by-id'], claimOwnershipUntil: new Date(), size: 10, }); }); test('emits an event when the store fails to claim a required task by id', async (done) => { - const { taskManagerId, tasks } = generateTasks(); + const { taskManagerId, runAt, tasks } = generateTasks(); const callCluster = sinon.spy(async (name: string, params?: unknown) => name === 'updateByQuery' ? { @@ -1159,11 +1194,36 @@ if (doc['task.runAt'].size()!=0) { }); const sub = store.events - .pipe(filter((event: TaskEvent) => event.id === 'ccc')) + .pipe( + filter( + (event: TaskEvent>) => + event.id === 'already-running' + ) + ) .subscribe({ - next: (event: TaskEvent) => { + next: (event: TaskEvent>) => { expect(event).toMatchObject( - asTaskClaimEvent('ccc', asErr(new Error(`failed to claim task 'ccc'`))) + asTaskClaimEvent( + 'already-running', + asErr( + some({ + id: 'already-running', + runAt, + taskType: 'bar', + schedule: { interval: '5m' }, + attempts: 2, + status: 'running' as TaskStatus, + params: { shazm: 1 }, + state: { henry: 'The 8th' }, + user: 'dabo', + scope: ['reporting', 'ceo'], + ownerId: taskManagerId, + startedAt: null, + retryAt: null, + scheduledAt: new Date(), + }) + ) + ) ); sub.unsubscribe(); done(); @@ -1171,7 +1231,49 @@ if (doc['task.runAt'].size()!=0) { }); await store.claimAvailableTasks({ - claimTasksById: ['ccc'], + claimTasksById: ['already-running'], + claimOwnershipUntil: new Date(), + size: 10, + }); + }); + + test('emits an event when the store fails to find a task which was required by id', async (done) => { + const { taskManagerId, tasks } = generateTasks(); + const callCluster = sinon.spy(async (name: string, params?: unknown) => + name === 'updateByQuery' + ? { + total: tasks.length, + updated: tasks.length, + } + : { hits: { hits: tasks } } + ); + const store = new TaskStore({ + callCluster, + maxAttempts: 2, + definitions: taskDefinitions, + serializer, + savedObjectsRepository: savedObjectsClient, + taskManagerId, + index: '', + }); + + const sub = store.events + .pipe( + filter( + (event: TaskEvent>) => + event.id === 'unknown-task' + ) + ) + .subscribe({ + next: (event: TaskEvent>) => { + expect(event).toMatchObject(asTaskClaimEvent('unknown-task', asErr(none))); + sub.unsubscribe(); + done(); + }, + }); + + await store.claimAvailableTasks({ + claimTasksById: ['unknown-task'], claimOwnershipUntil: new Date(), size: 10, }); diff --git a/x-pack/plugins/task_manager/server/task_store.ts b/x-pack/plugins/task_manager/server/task_store.ts index cac37db72202d..a18fb57b35b3d 100644 --- a/x-pack/plugins/task_manager/server/task_store.ts +++ b/x-pack/plugins/task_manager/server/task_store.ts @@ -9,7 +9,9 @@ */ import apm from 'elastic-apm-node'; import { Subject, Observable } from 'rxjs'; -import { omit, difference, defaults } from 'lodash'; +import { omit, difference, partition, map, defaults } from 'lodash'; + +import { some, none } from 'fp-ts/lib/Option'; import { SearchResponse, UpdateDocumentByQueryResponse } from 'elasticsearch'; import { @@ -31,6 +33,7 @@ import { TaskLifecycle, TaskLifecycleResult, SerializedConcreteTaskInstance, + TaskStatus, } from './task'; import { TaskClaim, asTaskClaimEvent } from './task_events'; @@ -221,13 +224,35 @@ export class TaskStore { // emit success/fail events for claimed tasks by id if (claimTasksById && claimTasksById.length) { - this.emitEvents(docs.map((doc) => asTaskClaimEvent(doc.id, asOk(doc)))); + const [documentsReturnedById, documentsClaimedBySchedule] = partition(docs, (doc) => + claimTasksById.includes(doc.id) + ); + + const [documentsClaimedById, documentsRequestedButNotClaimed] = partition( + documentsReturnedById, + // we filter the schduled tasks down by status is 'claiming' in the esearch, + // but we do not apply this limitation on tasks claimed by ID so that we can + // provide more detailed error messages when we fail to claim them + (doc) => doc.status === TaskStatus.Claiming + ); + + const documentsRequestedButNotReturned = difference( + claimTasksById, + map(documentsReturnedById, 'id') + ); + + this.emitEvents( + [...documentsClaimedById, ...documentsClaimedBySchedule].map((doc) => + asTaskClaimEvent(doc.id, asOk(doc)) + ) + ); + + this.emitEvents( + documentsRequestedButNotClaimed.map((doc) => asTaskClaimEvent(doc.id, asErr(some(doc)))) + ); this.emitEvents( - difference( - claimTasksById, - docs.map((doc) => doc.id) - ).map((id) => asTaskClaimEvent(id, asErr(new Error(`failed to claim task '${id}'`)))) + documentsRequestedButNotReturned.map((id) => asTaskClaimEvent(id, asErr(none))) ); } diff --git a/x-pack/test/alerting_api_integration/common/fixtures/plugins/task_manager_fixture/server/plugin.ts b/x-pack/test/alerting_api_integration/common/fixtures/plugins/task_manager_fixture/server/plugin.ts index 18fdd5f9c3ac3..0833dd0425894 100644 --- a/x-pack/test/alerting_api_integration/common/fixtures/plugins/task_manager_fixture/server/plugin.ts +++ b/x-pack/test/alerting_api_integration/common/fixtures/plugins/task_manager_fixture/server/plugin.ts @@ -51,7 +51,8 @@ export class SampleTaskManagerFixturePlugin .toPromise(); public setup(core: CoreSetup) { - core.http.createRouter().get( + const router = core.http.createRouter(); + router.get( { path: '/api/alerting_tasks/{taskId}', validate: { @@ -77,6 +78,23 @@ export class SampleTaskManagerFixturePlugin } } ); + + router.get( + { + path: `/api/ensure_tasks_index_refreshed`, + validate: {}, + }, + async function ( + context: RequestHandlerContext, + req: KibanaRequest, + res: KibanaResponseFactory + ): Promise> { + await core.elasticsearch.legacy.client.callAsInternalUser('indices.refresh', { + index: '.kibana_task_manager', + }); + return res.ok({ body: {} }); + } + ); } public start(core: CoreStart, { taskManager }: SampleTaskManagerFixtureStartDeps) { diff --git a/x-pack/test/plugin_api_integration/plugins/sample_task_plugin/server/init_routes.ts b/x-pack/test/plugin_api_integration/plugins/sample_task_plugin/server/init_routes.ts index f35d6baac8f5a..266e66b5a1a45 100644 --- a/x-pack/test/plugin_api_integration/plugins/sample_task_plugin/server/init_routes.ts +++ b/x-pack/test/plugin_api_integration/plugins/sample_task_plugin/server/init_routes.ts @@ -223,6 +223,21 @@ export function initRoutes( } ); + router.get( + { + path: `/api/ensure_tasks_index_refreshed`, + validate: {}, + }, + async function ( + context: RequestHandlerContext, + req: KibanaRequest, + res: KibanaResponseFactory + ): Promise> { + await ensureIndexIsRefreshed(); + return res.ok({ body: {} }); + } + ); + router.delete( { path: `/api/sample_tasks`, diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/task_manager_integration.js b/x-pack/test/plugin_api_integration/test_suites/task_manager/task_manager_integration.js index 165e79fb311ea..c87a5039360b8 100644 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/task_manager_integration.js +++ b/x-pack/test/plugin_api_integration/test_suites/task_manager/task_manager_integration.js @@ -28,8 +28,7 @@ export default function ({ getService }) { const testHistoryIndex = '.kibana_task_manager_test_result'; const supertest = supertestAsPromised(url.format(config.get('servers.kibana'))); - // FLAKY: https://github.com/elastic/kibana/issues/71390 - describe.skip('scheduling and running tasks', () => { + describe('scheduling and running tasks', () => { beforeEach( async () => await supertest.delete('/api/sample_tasks').set('kbn-xsrf', 'xxx').expect(200) ); @@ -69,6 +68,14 @@ export default function ({ getService }) { .then((response) => response.body); } + function ensureTasksIndexRefreshed() { + return supertest + .get(`/api/ensure_tasks_index_refreshed`) + .send({}) + .expect(200) + .then((response) => response.body); + } + function historyDocs(taskId) { return es .search({ @@ -404,7 +411,7 @@ export default function ({ getService }) { const originalTask = await scheduleTask({ taskType: 'sampleTask', schedule: { interval: `30m` }, - params: { failWith: 'error on run now', failOn: 3 }, + params: { failWith: 'this task was meant to fail!', failOn: 3 }, }); await retry.try(async () => { @@ -415,11 +422,14 @@ export default function ({ getService }) { const task = await currentTask(originalTask.id); expect(task.state.count).to.eql(1); + expect(task.status).to.eql('idle'); // ensure this task shouldnt run for another half hour expectReschedule(Date.parse(originalTask.runAt), task, 30 * 60000); }); + await ensureTasksIndexRefreshed(); + // second run should still be successful const successfulRunNowResult = await runTaskNow({ id: originalTask.id, @@ -429,14 +439,20 @@ export default function ({ getService }) { await retry.try(async () => { const task = await currentTask(originalTask.id); expect(task.state.count).to.eql(2); + expect(task.status).to.eql('idle'); }); + await ensureTasksIndexRefreshed(); + // third run should fail const failedRunNowResult = await runTaskNow({ id: originalTask.id, }); - expect(failedRunNowResult).to.eql({ id: originalTask.id, error: `Error: error on run now` }); + expect(failedRunNowResult).to.eql({ + id: originalTask.id, + error: `Error: Failed to run task \"${originalTask.id}\": Error: this task was meant to fail!`, + }); await retry.try(async () => { expect( @@ -479,8 +495,13 @@ export default function ({ getService }) { expect( docs.filter((taskDoc) => taskDoc._source.taskId === longRunningTask.id).length ).to.eql(1); + + const task = await currentTask(longRunningTask.id); + expect(task.status).to.eql('running'); }); + await ensureTasksIndexRefreshed(); + // first runNow should fail const failedRunNowResult = await runTaskNow({ id: longRunningTask.id, @@ -496,8 +517,13 @@ export default function ({ getService }) { await retry.try(async () => { const tasks = (await currentTasks()).docs; expect(getTaskById(tasks, longRunningTask.id).state.count).to.eql(1); + + const task = await currentTask(longRunningTask.id); + expect(task.status).to.eql('idle'); }); + await ensureTasksIndexRefreshed(); + // second runNow should be successful const successfulRunNowResult = runTaskNow({ id: longRunningTask.id, From 4150a234c8f4517725b79ead280285b49890e17c Mon Sep 17 00:00:00 2001 From: Melissa Alvarez Date: Wed, 5 Aug 2020 12:43:58 -0400 Subject: [PATCH 16/34] update empty prompt in analytics list (#74174) --- .../components/analytics_list/analytics_list.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx index 7b5c714c236b3..90e24f6da5d0a 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import { Direction, - EuiButtonEmpty, + EuiButton, EuiCallOut, EuiEmptyPrompt, EuiFlexGroup, @@ -147,25 +147,29 @@ export const DataFrameAnalyticsList: FC = ({ return ( <> {i18n.translate('xpack.ml.dataFrame.analyticsList.emptyPromptTitle', { - defaultMessage: 'No data frame analytics jobs found', + defaultMessage: 'Create your first data frame analytics job', })} } actions={ !isManagementTable ? [ - setIsSourceIndexModalVisible(true)} isDisabled={disabled} + color="primary" + iconType="plusInCircle" + fill data-test-subj="mlAnalyticsCreateFirstButton" > {i18n.translate('xpack.ml.dataFrame.analyticsList.emptyPromptButtonText', { - defaultMessage: 'Create your first data frame analytics job', + defaultMessage: 'Create job', })} - , + , ] : [] } From 47b9aba3bf0ce6a5a867fa144701ad1841020f7c Mon Sep 17 00:00:00 2001 From: Constance Date: Wed, 5 Aug 2020 10:12:25 -0700 Subject: [PATCH 17/34] [Enterprise Search] Fix/DRY out plugin i18n strings (#74323) * i18n refactor - DRY out plugin details to constants and correctly i18n-ize front-end-facing strings * DRY out new i18n constants - refactor instances of i18n.translate to use new constants * Fix non-i18n'd breadcrumb strings * PR feedback: swap out more plugin ID strings for constants --- .../enterprise_search/common/constants.ts | 34 +++++++++++++++++++ .../components/setup_guide/setup_guide.tsx | 11 +++--- .../generate_breadcrumbs.ts | 18 ++++++++-- .../components/error_state/error_state.tsx | 8 ++--- .../components/setup_guide/setup_guide.tsx | 12 ++++--- .../enterprise_search/public/plugin.ts | 31 ++++++++--------- .../enterprise_search/server/plugin.ts | 15 +++++--- 7 files changed, 90 insertions(+), 39 deletions(-) diff --git a/x-pack/plugins/enterprise_search/common/constants.ts b/x-pack/plugins/enterprise_search/common/constants.ts index fc9a47717871b..c5839df4c603b 100644 --- a/x-pack/plugins/enterprise_search/common/constants.ts +++ b/x-pack/plugins/enterprise_search/common/constants.ts @@ -4,6 +4,40 @@ * you may not use this file except in compliance with the Elastic License. */ +import { i18n } from '@kbn/i18n'; + +export const ENTERPRISE_SEARCH_PLUGIN = { + ID: 'enterpriseSearch', + NAME: i18n.translate('xpack.enterpriseSearch.productName', { + defaultMessage: 'Enterprise Search', + }), + URL: '/app/enterprise_search', +}; + +export const APP_SEARCH_PLUGIN = { + ID: 'appSearch', + NAME: i18n.translate('xpack.enterpriseSearch.appSearch.productName', { + defaultMessage: 'App Search', + }), + DESCRIPTION: i18n.translate('xpack.enterpriseSearch.appSearch.productDescription', { + defaultMessage: + 'Leverage dashboards, analytics, and APIs for advanced application search made simple.', + }), + URL: '/app/enterprise_search/app_search', +}; + +export const WORKPLACE_SEARCH_PLUGIN = { + ID: 'workplaceSearch', + NAME: i18n.translate('xpack.enterpriseSearch.workplaceSearch.productName', { + defaultMessage: 'Workplace Search', + }), + DESCRIPTION: i18n.translate('xpack.enterpriseSearch.workplaceSearch.productDescription', { + defaultMessage: + 'Search all documents, files, and sources available across your virtual workplace.', + }), + URL: '/app/enterprise_search/workplace_search', +}; + export const JSON_HEADER = { 'Content-Type': 'application/json' }; // This needs specific casing or Chrome throws a 415 error export const ENGINES_PAGE_SIZE = 10; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx index df278bf938a69..f899423319afc 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/setup_guide/setup_guide.tsx @@ -9,6 +9,7 @@ import { EuiSpacer, EuiTitle, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; +import { APP_SEARCH_PLUGIN } from '../../../../../common/constants'; import { SetupGuide as SetupGuideLayout } from '../../../shared/setup_guide'; import { SetAppSearchBreadcrumbs as SetBreadcrumbs } from '../../../shared/kibana_breadcrumbs'; import { SendAppSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; @@ -16,14 +17,16 @@ import GettingStarted from '../../assets/getting_started.png'; export const SetupGuide: React.FC = () => ( - + ( breadcrumbs: TBreadcrumbs = [] ) => [ - generateBreadcrumb({ text: 'Enterprise Search' }), + generateBreadcrumb({ text: ENTERPRISE_SEARCH_PLUGIN.NAME }), ...breadcrumbs.map(({ text, path }: IGenerateBreadcrumbProps) => generateBreadcrumb({ text, path, history }) ), ]; export const appSearchBreadcrumbs = (history: History) => (breadcrumbs: TBreadcrumbs = []) => - enterpriseSearchBreadcrumbs(history)([{ text: 'App Search', path: '/' }, ...breadcrumbs]); + enterpriseSearchBreadcrumbs(history)([ + { text: APP_SEARCH_PLUGIN.NAME, path: '/' }, + ...breadcrumbs, + ]); export const workplaceSearchBreadcrumbs = (history: History) => (breadcrumbs: TBreadcrumbs = []) => - enterpriseSearchBreadcrumbs(history)([{ text: 'Workplace Search', path: '/' }, ...breadcrumbs]); + enterpriseSearchBreadcrumbs(history)([ + { text: WORKPLACE_SEARCH_PLUGIN.NAME, path: '/' }, + ...breadcrumbs, + ]); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/error_state/error_state.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/error_state/error_state.tsx index 9fa508d599425..a1bc17e05dc05 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/error_state/error_state.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/error_state/error_state.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { EuiPage, EuiPageBody, EuiPageContent } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; +import { WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants'; import { ErrorStatePrompt } from '../../../shared/error_state'; import { SetWorkplaceSearchBreadcrumbs as SetBreadcrumbs } from '../../../shared/kibana_breadcrumbs'; import { SendWorkplaceSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; @@ -20,11 +20,7 @@ export const ErrorState: React.FC = () => { - + diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/setup_guide/setup_guide.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/setup_guide/setup_guide.tsx index 5b5d067d23eb8..e96d114c67c5d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/setup_guide/setup_guide.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/setup_guide/setup_guide.tsx @@ -9,8 +9,8 @@ import { EuiSpacer, EuiTitle, EuiText, EuiButton } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; +import { WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants'; import { SetupGuide as SetupGuideLayout } from '../../../shared/setup_guide'; - import { SetWorkplaceSearchBreadcrumbs as SetBreadcrumbs } from '../../../shared/kibana_breadcrumbs'; import { SendWorkplaceSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; import GettingStarted from '../../assets/getting_started.png'; @@ -21,14 +21,16 @@ const GETTING_STARTED_LINK_URL = export const SetupGuide: React.FC = () => { return ( - + diff --git a/x-pack/plugins/enterprise_search/public/plugin.ts b/x-pack/plugins/enterprise_search/public/plugin.ts index fc95828a3f4a4..66d2ae82fe3ce 100644 --- a/x-pack/plugins/enterprise_search/public/plugin.ts +++ b/x-pack/plugins/enterprise_search/public/plugin.ts @@ -20,6 +20,7 @@ import { import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/public'; import { LicensingPluginSetup } from '../../licensing/public'; +import { APP_SEARCH_PLUGIN, WORKPLACE_SEARCH_PLUGIN } from '../common/constants'; import { getPublicUrl } from './applications/shared/enterprise_search_url'; import AppSearchLogo from './applications/app_search/assets/logo.svg'; import WorkplaceSearchLogo from './applications/workplace_search/assets/logo.svg'; @@ -44,9 +45,9 @@ export class EnterpriseSearchPlugin implements Plugin { const config = { host: this.config.host }; core.application.register({ - id: 'appSearch', - title: 'App Search', - appRoute: '/app/enterprise_search/app_search', + id: APP_SEARCH_PLUGIN.ID, + title: APP_SEARCH_PLUGIN.NAME, + appRoute: APP_SEARCH_PLUGIN.URL, category: DEFAULT_APP_CATEGORIES.enterpriseSearch, mount: async (params: AppMountParameters) => { const [coreStart] = await core.getStartServices(); @@ -61,9 +62,9 @@ export class EnterpriseSearchPlugin implements Plugin { }); core.application.register({ - id: 'workplaceSearch', - title: 'Workplace Search', - appRoute: '/app/enterprise_search/workplace_search', + id: WORKPLACE_SEARCH_PLUGIN.ID, + title: WORKPLACE_SEARCH_PLUGIN.NAME, + appRoute: WORKPLACE_SEARCH_PLUGIN.URL, category: DEFAULT_APP_CATEGORIES.enterpriseSearch, mount: async (params: AppMountParameters) => { const [coreStart] = await core.getStartServices(); @@ -76,23 +77,21 @@ export class EnterpriseSearchPlugin implements Plugin { }); plugins.home.featureCatalogue.register({ - id: 'appSearch', - title: 'App Search', + id: APP_SEARCH_PLUGIN.ID, + title: APP_SEARCH_PLUGIN.NAME, icon: AppSearchLogo, - description: - 'Leverage dashboards, analytics, and APIs for advanced application search made simple.', - path: '/app/enterprise_search/app_search', + description: APP_SEARCH_PLUGIN.DESCRIPTION, + path: APP_SEARCH_PLUGIN.URL, category: FeatureCatalogueCategory.DATA, showOnHomePage: true, }); plugins.home.featureCatalogue.register({ - id: 'workplaceSearch', - title: 'Workplace Search', + id: WORKPLACE_SEARCH_PLUGIN.ID, + title: WORKPLACE_SEARCH_PLUGIN.NAME, icon: WorkplaceSearchLogo, - description: - 'Search all documents, files, and sources available across your virtual workplace.', - path: '/app/enterprise_search/workplace_search', + description: WORKPLACE_SEARCH_PLUGIN.DESCRIPTION, + path: WORKPLACE_SEARCH_PLUGIN.URL, category: FeatureCatalogueCategory.DATA, showOnHomePage: true, }); diff --git a/x-pack/plugins/enterprise_search/server/plugin.ts b/x-pack/plugins/enterprise_search/server/plugin.ts index a7bd68f92f78b..6de6671337797 100644 --- a/x-pack/plugins/enterprise_search/server/plugin.ts +++ b/x-pack/plugins/enterprise_search/server/plugin.ts @@ -19,6 +19,11 @@ import { UsageCollectionSetup } from 'src/plugins/usage_collection/server'; import { SecurityPluginSetup } from '../../security/server'; import { PluginSetupContract as FeaturesPluginSetup } from '../../features/server'; +import { + ENTERPRISE_SEARCH_PLUGIN, + APP_SEARCH_PLUGIN, + WORKPLACE_SEARCH_PLUGIN, +} from '../common/constants'; import { ConfigType } from './'; import { checkAccess } from './lib/check_access'; import { registerPublicUrlRoute } from './routes/enterprise_search/public_url'; @@ -64,13 +69,13 @@ export class EnterpriseSearchPlugin implements Plugin { * Register space/feature control */ features.registerFeature({ - id: 'enterpriseSearch', - name: 'Enterprise Search', + id: ENTERPRISE_SEARCH_PLUGIN.ID, + name: ENTERPRISE_SEARCH_PLUGIN.NAME, order: 0, icon: 'logoEnterpriseSearch', - navLinkId: 'appSearch', // TODO - remove this once functional tests no longer rely on navLinkId - app: ['kibana', 'appSearch', 'workplaceSearch'], // TODO: 'enterpriseSearch' - catalogue: ['appSearch', 'workplaceSearch'], // TODO: 'enterpriseSearch' + navLinkId: APP_SEARCH_PLUGIN.ID, // TODO - remove this once functional tests no longer rely on navLinkId + app: ['kibana', APP_SEARCH_PLUGIN.ID, WORKPLACE_SEARCH_PLUGIN.ID], + catalogue: [APP_SEARCH_PLUGIN.ID, WORKPLACE_SEARCH_PLUGIN.ID], privileges: null, }); From 41e3128ecd2ec33c4823aa98b9ae0b3a31125564 Mon Sep 17 00:00:00 2001 From: Gidi Meir Morris Date: Wed, 5 Aug 2020 18:48:09 +0100 Subject: [PATCH 18/34] [Alerting] Reload the Alerts List when alerts are deleted (#73715) Reloads the entire Alerts list when alerts are deleted through the UI. --- .../alerts_list/components/alerts_list.tsx | 19 ++++++--------- .../apps/triggers_actions_ui/alerts.ts | 24 +++++++++++++++---- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx index 2b2897a2181b1..3d55c51e45281 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx @@ -152,6 +152,10 @@ export const AlertsList: React.FunctionComponent = () => { data: alertsResponse.data, totalItemCount: alertsResponse.total, }); + + if (!alertsResponse.data?.length && page.index > 0) { + setPage({ ...page, index: 0 }); + } } catch (e) { toastNotifications.addDanger({ title: i18n.translate( @@ -399,18 +403,9 @@ export const AlertsList: React.FunctionComponent = () => { return (
    { - if (selectedIds.length === 0 || selectedIds.length === deleted.length) { - const updatedAlerts = alertsState.data.filter( - (alert) => alert.id && !alertsToDelete.includes(alert.id) - ); - setAlertsState({ - isLoading: false, - data: updatedAlerts, - totalItemCount: alertsState.totalItemCount - deleted.length, - }); - setSelectedIds([]); - } + onDeleted={async (deleted: string[]) => { + loadAlertsData(); + setSelectedIds([]); setAlertsToDelete([]); }} onErrors={async () => { diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts index fa714e8374ec7..56952919e416a 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts @@ -5,6 +5,7 @@ */ import uuid from 'uuid'; +import { times } from 'lodash'; import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; @@ -361,11 +362,22 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); it('should delete all selection', async () => { - const createdAlert = await createAlert(); + const namePrefix = generateUniqueKey(); + let count = 0; + const createdAlertsFirstPage = await Promise.all( + times(10, () => createAlert({ name: `${namePrefix}-0${count++}` })) + ); + + const createdAlertsSecondPage = await Promise.all( + times(2, () => createAlert({ name: `${namePrefix}-1${count++}` })) + ); + await pageObjects.common.navigateToApp('triggersActions'); - await pageObjects.triggersActionsUI.searchAlerts(createdAlert.name); + await pageObjects.triggersActionsUI.searchAlerts(namePrefix); - await testSubjects.click(`checkboxSelectRow-${createdAlert.id}`); + for (const createdAlert of createdAlertsFirstPage) { + await testSubjects.click(`checkboxSelectRow-${createdAlert.id}`); + } await testSubjects.click('bulkAction'); @@ -377,9 +389,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.common.closeToast(); await pageObjects.common.navigateToApp('triggersActions'); - await pageObjects.triggersActionsUI.searchAlerts(createdAlert.name); + await pageObjects.triggersActionsUI.searchAlerts(namePrefix); const searchResultsAfterDelete = await pageObjects.triggersActionsUI.getAlertsList(); - expect(searchResultsAfterDelete.length).to.eql(0); + expect(searchResultsAfterDelete).to.have.length(2); + expect(searchResultsAfterDelete[0].name).to.eql(createdAlertsSecondPage[0].name); + expect(searchResultsAfterDelete[1].name).to.eql(createdAlertsSecondPage[1].name); }); }); }; From c8597ec84bebcd7c51a760bd1a13455aad8d8612 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Wed, 5 Aug 2020 19:52:00 +0200 Subject: [PATCH 19/34] Change experimental message for visualizations (#74354) --- .../components/experimental_vis_info.tsx | 20 +++++++++++++------ .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/plugins/visualize/public/application/components/experimental_vis_info.tsx b/src/plugins/visualize/public/application/components/experimental_vis_info.tsx index 51abb3ca530a4..5f08bea60e538 100644 --- a/src/plugins/visualize/public/application/components/experimental_vis_info.tsx +++ b/src/plugins/visualize/public/application/components/experimental_vis_info.tsx @@ -26,12 +26,20 @@ export const InfoComponent = () => { <> {' '} - - GitHub - - {'.'} + defaultMessage="This visualization is experimental and is not subject to the support SLA of official GA features. + For feedback, please create an issue in {githubLink}." + values={{ + githubLink: ( + + GitHub + + ), + }} + /> ); diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 7e1ce610a1948..8218904f77df9 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -4529,7 +4529,6 @@ "visualize.createVisualization.noVisTypeErrorMessage": "有効なビジュアライゼーションタイプを指定してください", "visualize.editor.createBreadcrumb": "作成", "visualize.error.title": "ビジュアライゼーションエラー", - "visualize.experimentalVisInfoText": "このビジュアライゼーションは実験的なものです。フィードバックがありますか?で問題を報告してください。", "visualize.helpMenu.appName": "可視化", "visualize.linkedToSearch.unlinkSuccessNotificationText": "保存された検索「{searchTitle}」からリンクが解除されました", "visualize.listing.betaTitle": "ベータ", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index e82ba7cc1d60f..21a42362bcdd3 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -4530,7 +4530,6 @@ "visualize.createVisualization.noVisTypeErrorMessage": "必须提供有效的可视化类型", "visualize.editor.createBreadcrumb": "创建", "visualize.error.title": "可视化错误", - "visualize.experimentalVisInfoText": "此可视化标记为“实验性”。想反馈?请在以下位置创建问题:", "visualize.helpMenu.appName": "Visualize", "visualize.linkedToSearch.unlinkSuccessNotificationText": "已取消与已保存搜索“{searchTitle}”的链接", "visualize.listing.betaTitle": "公测版", From c0bb5375e037e5c1b83d354fa3835731cd3e2337 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Wed, 5 Aug 2020 20:01:52 +0200 Subject: [PATCH 20/34] [Ingest Manager] Update package registry for testing to f6b01d (#74341) Many changes went into the registry and the packages recently. This is updating to the most recent version of the registry distribution currently in production. Co-authored-by: Sonja Krause-Harder --- .../ingest_manager_api_integration/apis/epm/list.ts | 2 +- .../0.1.0/dataset/test_logs/fields/fields.yml | 12 ++++++------ .../0.1.0/dataset/test_metrics/fields/fields.yml | 12 ++++++------ .../0.1.0/dataset/test/fields/fields.yml | 12 ++++++------ .../0.2.0/dataset/test/fields/fields.yml | 12 ++++++------ .../0.3.0/dataset/test/fields/fields.yml | 12 ++++++------ .../overrides/0.1.0/dataset/test/fields/fields.yml | 12 ++++++------ .../apis/package_config/create.ts | 4 ++-- x-pack/test/ingest_manager_api_integration/config.ts | 2 +- 9 files changed, 40 insertions(+), 40 deletions(-) diff --git a/x-pack/test/ingest_manager_api_integration/apis/epm/list.ts b/x-pack/test/ingest_manager_api_integration/apis/epm/list.ts index 20414fcb90521..0b6a37d77387e 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/epm/list.ts +++ b/x-pack/test/ingest_manager_api_integration/apis/epm/list.ts @@ -29,7 +29,7 @@ export default function ({ getService }: FtrProviderContext) { return response.body; }; const listResponse = await fetchPackageList(); - expect(listResponse.response.length).to.be(14); + expect(listResponse.response.length).to.be(8); } else { warnAndSkipTest(this, log); } diff --git a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/dataset/test_logs/fields/fields.yml b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/dataset/test_logs/fields/fields.yml index 12a9a03c1337b..6e003ed0ad147 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/dataset/test_logs/fields/fields.yml +++ b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/dataset/test_logs/fields/fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: data_stream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Data stream type. +- name: data_stream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Data stream dataset. +- name: data_stream.namespace type: constant_keyword description: > - Dataset namespace. + Data stream namespace. - name: '@timestamp' type: date description: > diff --git a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/dataset/test_metrics/fields/fields.yml b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/dataset/test_metrics/fields/fields.yml index 12a9a03c1337b..6e003ed0ad147 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/dataset/test_metrics/fields/fields.yml +++ b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/all_assets/0.1.0/dataset/test_metrics/fields/fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: data_stream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Data stream type. +- name: data_stream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Data stream dataset. +- name: data_stream.namespace type: constant_keyword description: > - Dataset namespace. + Data stream namespace. - name: '@timestamp' type: date description: > diff --git a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/dataset/test/fields/fields.yml b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/dataset/test/fields/fields.yml index 12a9a03c1337b..6e003ed0ad147 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/dataset/test/fields/fields.yml +++ b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.1.0/dataset/test/fields/fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: data_stream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Data stream type. +- name: data_stream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Data stream dataset. +- name: data_stream.namespace type: constant_keyword description: > - Dataset namespace. + Data stream namespace. - name: '@timestamp' type: date description: > diff --git a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/dataset/test/fields/fields.yml b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/dataset/test/fields/fields.yml index 12a9a03c1337b..6e003ed0ad147 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/dataset/test/fields/fields.yml +++ b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.2.0/dataset/test/fields/fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: data_stream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Data stream type. +- name: data_stream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Data stream dataset. +- name: data_stream.namespace type: constant_keyword description: > - Dataset namespace. + Data stream namespace. - name: '@timestamp' type: date description: > diff --git a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/dataset/test/fields/fields.yml b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/dataset/test/fields/fields.yml index 12a9a03c1337b..6e003ed0ad147 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/dataset/test/fields/fields.yml +++ b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/multiple_versions/0.3.0/dataset/test/fields/fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: data_stream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Data stream type. +- name: data_stream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Data stream dataset. +- name: data_stream.namespace type: constant_keyword description: > - Dataset namespace. + Data stream namespace. - name: '@timestamp' type: date description: > diff --git a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/overrides/0.1.0/dataset/test/fields/fields.yml b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/overrides/0.1.0/dataset/test/fields/fields.yml index 12a9a03c1337b..6e003ed0ad147 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/overrides/0.1.0/dataset/test/fields/fields.yml +++ b/x-pack/test/ingest_manager_api_integration/apis/fixtures/test_packages/overrides/0.1.0/dataset/test/fields/fields.yml @@ -1,15 +1,15 @@ -- name: dataset.type +- name: data_stream.type type: constant_keyword description: > - Dataset type. -- name: dataset.name + Data stream type. +- name: data_stream.dataset type: constant_keyword description: > - Dataset name. -- name: dataset.namespace + Data stream dataset. +- name: data_stream.namespace type: constant_keyword description: > - Dataset namespace. + Data stream namespace. - name: '@timestamp' type: date description: > diff --git a/x-pack/test/ingest_manager_api_integration/apis/package_config/create.ts b/x-pack/test/ingest_manager_api_integration/apis/package_config/create.ts index cae4ff79bdef6..a2c2b99364d50 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/package_config/create.ts +++ b/x-pack/test/ingest_manager_api_integration/apis/package_config/create.ts @@ -100,7 +100,7 @@ export default function ({ getService }: FtrProviderContext) { package: { name: 'endpoint', title: 'Endpoint', - version: '0.8.0', + version: '0.13.0', }, }) .expect(200); @@ -118,7 +118,7 @@ export default function ({ getService }: FtrProviderContext) { package: { name: 'endpoint', title: 'Endpoint', - version: '0.8.0', + version: '0.13.0', }, }) .expect(500); diff --git a/x-pack/test/ingest_manager_api_integration/config.ts b/x-pack/test/ingest_manager_api_integration/config.ts index 85d1c20c7f155..08d5da148b51e 100644 --- a/x-pack/test/ingest_manager_api_integration/config.ts +++ b/x-pack/test/ingest_manager_api_integration/config.ts @@ -12,7 +12,7 @@ import { defineDockerServersConfig } from '@kbn/test'; // Docker image to use for Ingest Manager API integration tests. // This hash comes from the commit hash here: https://github.com/elastic/package-storage/commit export const dockerImage = - 'docker.elastic.co/package-registry/distribution:80e93ade87f65e18d487b1c407406825915daba8'; + 'docker.elastic.co/package-registry/distribution:f6b01daec8cfe355101e366de9941d35a4c3763e'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts')); From 1c428ffed780495a327c15fcd33dcf3759e6087c Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Wed, 5 Aug 2020 14:11:27 -0400 Subject: [PATCH 21/34] fixing encoding issue with \ for enroll command (#74379) --- .../components/enrollment_instructions/manual/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/enrollment_instructions/manual/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/enrollment_instructions/manual/index.tsx index 8ea236b2dd6c3..9efc95b0a04cf 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/enrollment_instructions/manual/index.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/enrollment_instructions/manual/index.tsx @@ -36,8 +36,8 @@ export const ManualInstructions: React.FunctionComponent = ({ systemctl enable elastic-agent systemctl start elastic-agent`; - const windowsCommand = `.\elastic-agent enroll ${enrollArgs} -./install-service-elastic-agent.ps1`; + const windowsCommand = `.\\elastic-agent enroll ${enrollArgs} +.\\install-service-elastic-agent.ps1`; return ( <> From 0737241decd6bfc30e3c98abd47344befa856ee7 Mon Sep 17 00:00:00 2001 From: Zacqary Adam Xeper Date: Wed, 5 Aug 2020 13:13:22 -0500 Subject: [PATCH 22/34] [Metrics UI] Fix validating Metrics Explorer URL (#74311) --- ...metrics_explorer_options_url_state.test.ts | 70 ++++++++++++++ ...ith_metrics_explorer_options_url_state.tsx | 65 ++----------- .../hooks/use_metrics_explorer_options.ts | 94 +++++++++++++------ 3 files changed, 140 insertions(+), 89 deletions(-) create mode 100644 x-pack/plugins/infra/public/containers/metrics_explorer/with_metrics_explorer_options_url_state.test.ts diff --git a/x-pack/plugins/infra/public/containers/metrics_explorer/with_metrics_explorer_options_url_state.test.ts b/x-pack/plugins/infra/public/containers/metrics_explorer/with_metrics_explorer_options_url_state.test.ts new file mode 100644 index 0000000000000..8be34b4498c3f --- /dev/null +++ b/x-pack/plugins/infra/public/containers/metrics_explorer/with_metrics_explorer_options_url_state.test.ts @@ -0,0 +1,70 @@ +/* + * 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 { omit } from 'lodash'; +import { mapToUrlState } from './with_metrics_explorer_options_url_state'; + +describe('WithMetricsExplorerOptionsUrlState', () => { + describe('mapToUrlState', () => { + it('loads a valid URL state', () => { + expect(mapToUrlState(validState)).toEqual(validState); + }); + it('discards invalid properties and loads valid properties into the URL', () => { + expect(mapToUrlState(invalidState)).toEqual(omit(invalidState, 'options')); + }); + }); +}); + +const validState = { + chartOptions: { + stack: false, + type: 'line', + yAxisMode: 'fromZero', + }, + options: { + aggregation: 'avg', + filterQuery: '', + groupBy: ['host.hostname'], + metrics: [ + { + aggregation: 'avg', + color: 'color0', + field: 'system.cpu.user.pct', + }, + { + aggregation: 'avg', + color: 'color1', + field: 'system.load.1', + }, + ], + source: 'url', + }, + timerange: { + from: 'now-1h', + interval: '>=10s', + to: 'now', + }, +}; + +const invalidState = { + chartOptions: { + stack: false, + type: 'line', + yAxisMode: 'fromZero', + }, + options: { + aggregation: 'avg', + filterQuery: '', + groupBy: ['host.hostname'], + metrics: 'this is the wrong data type', + source: 'url', + }, + timerange: { + from: 'now-1h', + interval: '>=10s', + to: 'now', + }, +}; diff --git a/x-pack/plugins/infra/public/containers/metrics_explorer/with_metrics_explorer_options_url_state.tsx b/x-pack/plugins/infra/public/containers/metrics_explorer/with_metrics_explorer_options_url_state.tsx index 35fb66b2620d6..c263d0f68a45e 100644 --- a/x-pack/plugins/infra/public/containers/metrics_explorer/with_metrics_explorer_options_url_state.tsx +++ b/x-pack/plugins/infra/public/containers/metrics_explorer/with_metrics_explorer_options_url_state.tsx @@ -5,19 +5,17 @@ */ import { set } from '@elastic/safer-lodash-set'; -import { values } from 'lodash'; import React, { useContext, useMemo } from 'react'; -import * as t from 'io-ts'; import { ThrowReporter } from 'io-ts/lib/ThrowReporter'; -import { MetricsExplorerColor } from '../../../common/color_palette'; import { UrlStateContainer } from '../../utils/url_state'; import { MetricsExplorerOptions, MetricsExplorerOptionsContainer, MetricsExplorerTimeOptions, - MetricsExplorerYAxisMode, - MetricsExplorerChartType, MetricsExplorerChartOptions, + metricExplorerOptionsRT, + metricsExplorerChartOptionsRT, + metricsExplorerTimeOptionsRT, } from '../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; interface MetricsExplorerUrlState { @@ -74,36 +72,7 @@ export const WithMetricsExplorerOptionsUrlState = () => { }; function isMetricExplorerOptions(subject: any): subject is MetricsExplorerOptions { - const MetricRequired = t.type({ - aggregation: t.string, - }); - - const MetricOptional = t.partial({ - field: t.string, - rate: t.boolean, - color: t.keyof( - Object.fromEntries(values(MetricsExplorerColor).map((c) => [c, null])) as Record - ), - label: t.string, - }); - - const Metric = t.intersection([MetricRequired, MetricOptional]); - - const OptionsRequired = t.type({ - aggregation: t.string, - metrics: t.array(Metric), - }); - - const OptionsOptional = t.partial({ - limit: t.number, - groupBy: t.string, - filterQuery: t.string, - source: t.string, - }); - - const Options = t.intersection([OptionsRequired, OptionsOptional]); - - const result = Options.decode(subject); + const result = metricExplorerOptionsRT.decode(subject); try { ThrowReporter.report(result); @@ -114,22 +83,7 @@ function isMetricExplorerOptions(subject: any): subject is MetricsExplorerOption } function isMetricExplorerChartOptions(subject: any): subject is MetricsExplorerChartOptions { - const ChartOptions = t.type({ - yAxisMode: t.keyof( - Object.fromEntries(values(MetricsExplorerYAxisMode).map((v) => [v, null])) as Record< - string, - null - > - ), - type: t.keyof( - Object.fromEntries(values(MetricsExplorerChartType).map((v) => [v, null])) as Record< - string, - null - > - ), - stack: t.boolean, - }); - const result = ChartOptions.decode(subject); + const result = metricsExplorerChartOptionsRT.decode(subject); try { ThrowReporter.report(result); @@ -140,12 +94,7 @@ function isMetricExplorerChartOptions(subject: any): subject is MetricsExplorerC } function isMetricExplorerTimeOption(subject: any): subject is MetricsExplorerTimeOptions { - const TimeRange = t.type({ - from: t.string, - to: t.string, - interval: t.string, - }); - const result = TimeRange.decode(subject); + const result = metricsExplorerTimeOptionsRT.decode(subject); try { ThrowReporter.report(result); return true; @@ -154,7 +103,7 @@ function isMetricExplorerTimeOption(subject: any): subject is MetricsExplorerTim } } -const mapToUrlState = (value: any): MetricsExplorerUrlState | undefined => { +export const mapToUrlState = (value: any): MetricsExplorerUrlState | undefined => { const finalState = {}; if (value) { if (value.options && isMetricExplorerOptions(value.options)) { diff --git a/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.ts b/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.ts index fa103ce15e3e8..299231f1821f0 100644 --- a/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.ts +++ b/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.ts @@ -4,19 +4,29 @@ * you may not use this file except in compliance with the Elastic License. */ +import * as t from 'io-ts'; +import { values } from 'lodash'; import createContainer from 'constate'; import { useState, useEffect, useMemo, Dispatch, SetStateAction } from 'react'; import { useAlertPrefillContext } from '../../../../alerting/use_alert_prefill'; import { MetricsExplorerColor } from '../../../../../common/color_palette'; -import { - MetricsExplorerAggregation, - MetricsExplorerMetric, -} from '../../../../../common/http_api/metrics_explorer'; - -export type MetricsExplorerOptionsMetric = MetricsExplorerMetric & { - color?: MetricsExplorerColor; - label?: string; -}; +import { metricsExplorerMetricRT } from '../../../../../common/http_api/metrics_explorer'; + +const metricsExplorerOptionsMetricRT = t.intersection([ + metricsExplorerMetricRT, + t.partial({ + rate: t.boolean, + color: t.keyof( + Object.fromEntries(values(MetricsExplorerColor).map((c) => [c, null])) as Record< + MetricsExplorerColor, + null + > + ), + label: t.string, + }), +]); + +export type MetricsExplorerOptionsMetric = t.TypeOf; export enum MetricsExplorerChartType { line = 'line', @@ -29,28 +39,50 @@ export enum MetricsExplorerYAxisMode { auto = 'auto', } -export interface MetricsExplorerChartOptions { - type: MetricsExplorerChartType; - yAxisMode: MetricsExplorerYAxisMode; - stack: boolean; -} - -export interface MetricsExplorerOptions { - metrics: MetricsExplorerOptionsMetric[]; - limit?: number; - groupBy?: string | string[]; - filterQuery?: string; - aggregation: MetricsExplorerAggregation; - forceInterval?: boolean; - dropLastBucket?: boolean; - source?: string; -} - -export interface MetricsExplorerTimeOptions { - from: string; - to: string; - interval: string; -} +export const metricsExplorerChartOptionsRT = t.type({ + yAxisMode: t.keyof( + Object.fromEntries(values(MetricsExplorerYAxisMode).map((v) => [v, null])) as Record< + MetricsExplorerYAxisMode, + null + > + ), + type: t.keyof( + Object.fromEntries(values(MetricsExplorerChartType).map((v) => [v, null])) as Record< + MetricsExplorerChartType, + null + > + ), + stack: t.boolean, +}); + +export type MetricsExplorerChartOptions = t.TypeOf; + +const metricExplorerOptionsRequiredRT = t.type({ + aggregation: t.string, + metrics: t.array(metricsExplorerOptionsMetricRT), +}); + +const metricExplorerOptionsOptionalRT = t.partial({ + limit: t.number, + groupBy: t.union([t.string, t.array(t.string)]), + filterQuery: t.string, + source: t.string, + forceInterval: t.boolean, + dropLastBucket: t.boolean, +}); +export const metricExplorerOptionsRT = t.intersection([ + metricExplorerOptionsRequiredRT, + metricExplorerOptionsOptionalRT, +]); + +export type MetricsExplorerOptions = t.TypeOf; + +export const metricsExplorerTimeOptionsRT = t.type({ + from: t.string, + to: t.string, + interval: t.string, +}); +export type MetricsExplorerTimeOptions = t.TypeOf; export const DEFAULT_TIMERANGE: MetricsExplorerTimeOptions = { from: 'now-1h', From 057cab725c1e5c09d2a3aa531221fffc826e7090 Mon Sep 17 00:00:00 2001 From: Spencer Date: Wed, 5 Aug 2020 12:05:17 -0700 Subject: [PATCH 23/34] [Jenkins] run CI when plugin readmes change (#74388) Co-authored-by: spalger --- .ci/pipeline-library/src/test/prChanges.groovy | 13 +++++++++++++ vars/prChanges.groovy | 2 ++ 2 files changed, 15 insertions(+) diff --git a/.ci/pipeline-library/src/test/prChanges.groovy b/.ci/pipeline-library/src/test/prChanges.groovy index f149340517ff0..0f354e7687246 100644 --- a/.ci/pipeline-library/src/test/prChanges.groovy +++ b/.ci/pipeline-library/src/test/prChanges.groovy @@ -97,4 +97,17 @@ class PrChangesTest extends KibanaBasePipelineTest { assertFalse(prChanges.areChangesSkippable()) } + + @Test + void 'areChangesSkippable() with plugin readme changes'() { + props([ + githubPrs: [ + getChanges: { [ + [filename: 'src/plugins/foo/README.asciidoc'], + ] }, + ], + ]) + + assertFalse(prChanges.areChangesSkippable()) + } } diff --git a/vars/prChanges.groovy b/vars/prChanges.groovy index adaacf952b5b6..a7fe46e7bf014 100644 --- a/vars/prChanges.groovy +++ b/vars/prChanges.groovy @@ -22,6 +22,8 @@ def getNotSkippablePaths() { return [ // this file is auto-generated and changes to it need to be validated with CI /^docs\/developer\/architecture\/code-exploration.asciidoc$/, + // don't skip CI on prs with changes to plugin readme files (?i) is for case-insensitive matching + /(?i)\/plugins\/[^\/]+\/readme\.(md|asciidoc)$/, ] } From c655f50950693f3d0ec32dcf8167135d0c9781ec Mon Sep 17 00:00:00 2001 From: Jen Huang Date: Wed, 5 Aug 2020 12:51:58 -0700 Subject: [PATCH 24/34] Rename agent configs SO to agent policies (#74397) --- .../ingest_manager/common/constants/agent_config.ts | 2 +- .../test/functional/es_archives/fleet/agents/data.json | 6 +++--- .../functional/es_archives/fleet/agents/mappings.json | 4 ++-- x-pack/test/functional/es_archives/lists/mappings.json | 6 +++--- .../reporting/canvas_disallowed_url/mappings.json | 9 ++++----- .../es_archives/export_rule/mappings.json | 4 ++-- 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/x-pack/plugins/ingest_manager/common/constants/agent_config.ts b/x-pack/plugins/ingest_manager/common/constants/agent_config.ts index 30ca92f5f32f3..aa6399b73f14e 100644 --- a/x-pack/plugins/ingest_manager/common/constants/agent_config.ts +++ b/x-pack/plugins/ingest_manager/common/constants/agent_config.ts @@ -5,7 +5,7 @@ */ import { AgentConfigStatus, DefaultPackages } from '../types'; -export const AGENT_CONFIG_SAVED_OBJECT_TYPE = 'ingest-agent-configs'; +export const AGENT_CONFIG_SAVED_OBJECT_TYPE = 'ingest-agent-policies'; export const DEFAULT_AGENT_CONFIG = { name: 'Default config', diff --git a/x-pack/test/functional/es_archives/fleet/agents/data.json b/x-pack/test/functional/es_archives/fleet/agents/data.json index b3d49199b0d9e..c94b87f6ad1ec 100644 --- a/x-pack/test/functional/es_archives/fleet/agents/data.json +++ b/x-pack/test/functional/es_archives/fleet/agents/data.json @@ -203,11 +203,11 @@ { "type": "doc", "value": { - "id": "ingest-agent-configs:config1", + "id": "ingest-agent-policies:config1", "index": ".kibana", "source": { - "type": "ingest-agent-configs", - "ingest-agent-configs": { + "type": "ingest-agent-policies", + "ingest-agent-policies": { "name": "Test config", "namespace": "default", "description": "Config 1", diff --git a/x-pack/test/functional/es_archives/fleet/agents/mappings.json b/x-pack/test/functional/es_archives/fleet/agents/mappings.json index 1f0aa2f24d6df..acc32c3e2cbb5 100644 --- a/x-pack/test/functional/es_archives/fleet/agents/mappings.json +++ b/x-pack/test/functional/es_archives/fleet/agents/mappings.json @@ -58,7 +58,7 @@ "siem-ui-timeline": "f2d929253ecd06ffbac78b4047f45a86", "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", - "ingest-agent-configs": "f4bdc17427437537ca1754d5d5057ad5", + "ingest-agent-policies": "f4bdc17427437537ca1754d5d5057ad5", "url": "b675c3be8d76ecf029294d51dc7ec65d", "migrationVersion": "4a1746014a75ade3a714e1db5763276f", "index-pattern": "66eccb05066c5a89924f48a9e9736499", @@ -1797,7 +1797,7 @@ } } }, - "ingest-agent-configs": { + "ingest-agent-policies": { "properties": { "package_configs": { "type": "keyword" diff --git a/x-pack/test/functional/es_archives/lists/mappings.json b/x-pack/test/functional/es_archives/lists/mappings.json index c1b277b8183a3..2fc1f1a3111a7 100644 --- a/x-pack/test/functional/es_archives/lists/mappings.json +++ b/x-pack/test/functional/es_archives/lists/mappings.json @@ -61,7 +61,7 @@ "siem-ui-timeline": "94bc38c7a421d15fbfe8ea565370a421", "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", - "ingest-agent-configs": "9326f99c977fd2ef5ab24b6336a0675c", + "ingest-agent-policies": "9326f99c977fd2ef5ab24b6336a0675c", "url": "c7f66a0df8b1b52f17c28c4adb111105", "endpoint:user-artifact-manifest": "67c28185da541c1404e7852d30498cd6", "migrationVersion": "4a1746014a75ade3a714e1db5763276f", @@ -1210,7 +1210,7 @@ } } }, - "ingest-agent-configs": { + "ingest-agent-policies": { "properties": { "description": { "type": "text" @@ -2488,4 +2488,4 @@ } } } -} \ No newline at end of file +} diff --git a/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json b/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json index 1432a53b45461..1fd338fbb0ffb 100644 --- a/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json +++ b/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json @@ -2,8 +2,7 @@ "type": "index", "value": { "aliases": { - ".kibana": { - } + ".kibana": {} }, "index": ".kibana_1", "mappings": { @@ -38,7 +37,7 @@ "fleet-enrollment-api-keys": "28b91e20b105b6f928e2012600085d8f", "graph-workspace": "cd7ba1330e6682e9cc00b78850874be1", "index-pattern": "66eccb05066c5a89924f48a9e9736499", - "ingest-agent-configs": "9326f99c977fd2ef5ab24b6336a0675c", + "ingest-agent-policies": "9326f99c977fd2ef5ab24b6336a0675c", "ingest-outputs": "8aa988c376e65443fefc26f1075e93a3", "ingest-package-configs": "48e8bd97e488008e21c0b5a2367b83ad", "ingest_manager_settings": "012cf278ec84579495110bb827d1ed09", @@ -1149,7 +1148,7 @@ } } }, - "ingest-agent-configs": { + "ingest-agent-policies": { "properties": { "description": { "type": "text" @@ -2213,4 +2212,4 @@ } } } -} \ No newline at end of file +} diff --git a/x-pack/test/security_solution_cypress/es_archives/export_rule/mappings.json b/x-pack/test/security_solution_cypress/es_archives/export_rule/mappings.json index 2cfa0bde4e977..dc92d23a618d3 100644 --- a/x-pack/test/security_solution_cypress/es_archives/export_rule/mappings.json +++ b/x-pack/test/security_solution_cypress/es_archives/export_rule/mappings.json @@ -39,7 +39,7 @@ "graph-workspace": "cd7ba1330e6682e9cc00b78850874be1", "index-pattern": "66eccb05066c5a89924f48a9e9736499", "infrastructure-ui-source": "2b2809653635caf490c93f090502d04c", - "ingest-agent-configs": "9326f99c977fd2ef5ab24b6336a0675c", + "ingest-agent-policies": "9326f99c977fd2ef5ab24b6336a0675c", "ingest-outputs": "8aa988c376e65443fefc26f1075e93a3", "ingest-package-configs": "48e8bd97e488008e21c0b5a2367b83ad", "ingest_manager_settings": "012cf278ec84579495110bb827d1ed09", @@ -1222,7 +1222,7 @@ } } }, - "ingest-agent-configs": { + "ingest-agent-policies": { "properties": { "description": { "type": "text" From af358c94a3e17aeb2c78c0edd50c233a4e3558c0 Mon Sep 17 00:00:00 2001 From: Melissa Alvarez Date: Wed, 5 Aug 2020 17:58:40 -0400 Subject: [PATCH 25/34] [ML] DF Analytics: adds functional tests for edit form (#73885) * add edit analytics functional test * adds edit test service * update edit test wording for clarity * check flyout closes after edit * rename testSubj for consitency --- .../action_edit/edit_button_flyout.tsx | 4 +- .../components/analytics_list/use_columns.tsx | 1 + .../classification_creation.ts | 31 ++++++++ .../outlier_detection_creation.ts | 31 ++++++++ .../regression_creation.ts | 31 ++++++++ .../services/ml/data_frame_analytics_edit.ts | 71 +++++++++++++++++++ .../services/ml/data_frame_analytics_table.ts | 6 ++ x-pack/test/functional/services/ml/index.ts | 3 + 8 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 x-pack/test/functional/services/ml/data_frame_analytics_edit.ts diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_button_flyout.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_button_flyout.tsx index 86b1c879417bb..14b743997f30a 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_button_flyout.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_button_flyout.tsx @@ -133,7 +133,7 @@ export const EditButtonFlyout: FC> = ({ closeFlyout, item } onClose={closeFlyout} hideCloseButton aria-labelledby="analyticsEditFlyoutTitle" - data-test-subj="analyticsEditFlyout" + data-test-subj="mlAnalyticsEditFlyout" > @@ -297,7 +297,7 @@ export const EditButtonFlyout: FC> = ({ closeFlyout, item } { @@ -179,6 +180,36 @@ export default function ({ getService }: FtrProviderContext) { }); }); + it('should open the edit form for the created job in the analytics table', async () => { + await ml.dataFrameAnalyticsTable.openEditFlyout(testData.jobId); + }); + + it('should input the description in the edit form', async () => { + await ml.dataFrameAnalyticsEdit.assertJobDescriptionEditInputExists(); + await ml.dataFrameAnalyticsEdit.setJobDescriptionEdit(editedDescription); + }); + + it('should input the model memory limit in the edit form', async () => { + await ml.dataFrameAnalyticsEdit.assertJobMmlEditInputExists(); + await ml.dataFrameAnalyticsEdit.setJobMmlEdit('21mb'); + }); + + it('should submit the edit job form', async () => { + await ml.dataFrameAnalyticsEdit.updateAnalyticsJob(); + }); + + it('displays details for the edited job in the analytics table', async () => { + await ml.dataFrameAnalyticsTable.assertAnalyticsRowFields(testData.jobId, { + id: testData.jobId, + description: editedDescription, + sourceIndex: testData.source, + destinationIndex: testData.destinationIndex, + type: testData.expected.row.type, + status: testData.expected.row.status, + progress: testData.expected.row.progress, + }); + }); + it('creates the destination index and writes results to it', async () => { await ml.api.assertIndicesExist(testData.destinationIndex); await ml.api.assertIndicesNotEmpty(testData.destinationIndex); diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts index 0320354b99ff0..5b89cec49db3e 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts @@ -10,6 +10,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); + const editedDescription = 'Edited description'; describe('outlier detection creation', function () { before(async () => { @@ -197,6 +198,36 @@ export default function ({ getService }: FtrProviderContext) { }); }); + it('should open the edit form for the created job in the analytics table', async () => { + await ml.dataFrameAnalyticsTable.openEditFlyout(testData.jobId); + }); + + it('should input the description in the edit form', async () => { + await ml.dataFrameAnalyticsEdit.assertJobDescriptionEditInputExists(); + await ml.dataFrameAnalyticsEdit.setJobDescriptionEdit(editedDescription); + }); + + it('should input the model memory limit in the edit form', async () => { + await ml.dataFrameAnalyticsEdit.assertJobMmlEditInputExists(); + await ml.dataFrameAnalyticsEdit.setJobMmlEdit('21mb'); + }); + + it('should submit the edit job form', async () => { + await ml.dataFrameAnalyticsEdit.updateAnalyticsJob(); + }); + + it('displays details for the edited job in the analytics table', async () => { + await ml.dataFrameAnalyticsTable.assertAnalyticsRowFields(testData.jobId, { + id: testData.jobId, + description: editedDescription, + sourceIndex: testData.source, + destinationIndex: testData.destinationIndex, + type: testData.expected.row.type, + status: testData.expected.row.status, + progress: testData.expected.row.progress, + }); + }); + it('creates the destination index and writes results to it', async () => { await ml.api.assertIndicesExist(testData.destinationIndex); await ml.api.assertIndicesNotEmpty(testData.destinationIndex); diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts index 1aa505e26e1e9..a67a348323347 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/regression_creation.ts @@ -10,6 +10,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const ml = getService('ml'); + const editedDescription = 'Edited description'; describe('regression creation', function () { before(async () => { @@ -179,6 +180,36 @@ export default function ({ getService }: FtrProviderContext) { }); }); + it('should open the edit form for the created job in the analytics table', async () => { + await ml.dataFrameAnalyticsTable.openEditFlyout(testData.jobId); + }); + + it('should input the description in the edit form', async () => { + await ml.dataFrameAnalyticsEdit.assertJobDescriptionEditInputExists(); + await ml.dataFrameAnalyticsEdit.setJobDescriptionEdit(editedDescription); + }); + + it('should input the model memory limit in the edit form', async () => { + await ml.dataFrameAnalyticsEdit.assertJobMmlEditInputExists(); + await ml.dataFrameAnalyticsEdit.setJobMmlEdit('21mb'); + }); + + it('should submit the edit job form', async () => { + await ml.dataFrameAnalyticsEdit.updateAnalyticsJob(); + }); + + it('displays details for the edited job in the analytics table', async () => { + await ml.dataFrameAnalyticsTable.assertAnalyticsRowFields(testData.jobId, { + id: testData.jobId, + description: editedDescription, + sourceIndex: testData.source, + destinationIndex: testData.destinationIndex, + type: testData.expected.row.type, + status: testData.expected.row.status, + progress: testData.expected.row.progress, + }); + }); + it('creates the destination index and writes results to it', async () => { await ml.api.assertIndicesExist(testData.destinationIndex); await ml.api.assertIndicesNotEmpty(testData.destinationIndex); diff --git a/x-pack/test/functional/services/ml/data_frame_analytics_edit.ts b/x-pack/test/functional/services/ml/data_frame_analytics_edit.ts new file mode 100644 index 0000000000000..fd06dd24d6f8b --- /dev/null +++ b/x-pack/test/functional/services/ml/data_frame_analytics_edit.ts @@ -0,0 +1,71 @@ +/* + * 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 expect from '@kbn/expect'; + +import { FtrProviderContext } from '../../ftr_provider_context'; +import { MlCommon } from './common'; + +export function MachineLearningDataFrameAnalyticsEditProvider( + { getService }: FtrProviderContext, + mlCommon: MlCommon +) { + const testSubjects = getService('testSubjects'); + const retry = getService('retry'); + + return { + async assertJobDescriptionEditInputExists() { + await testSubjects.existOrFail('mlAnalyticsEditFlyoutDescriptionInput'); + }, + async assertJobDescriptionEditValue(expectedValue: string) { + const actualJobDescription = await testSubjects.getAttribute( + 'mlAnalyticsEditFlyoutDescriptionInput', + 'value' + ); + expect(actualJobDescription).to.eql( + expectedValue, + `Job description edit should be '${expectedValue}' (got '${actualJobDescription}')` + ); + }, + async assertJobMmlEditInputExists() { + await testSubjects.existOrFail('mlAnalyticsEditFlyoutmodelMemoryLimitInput'); + }, + async assertJobMmlEditValue(expectedValue: string) { + const actualMml = await testSubjects.getAttribute( + 'mlAnalyticsEditFlyoutmodelMemoryLimitInput', + 'value' + ); + expect(actualMml).to.eql( + expectedValue, + `Job model memory limit edit should be '${expectedValue}' (got '${actualMml}')` + ); + }, + async setJobDescriptionEdit(jobDescription: string) { + await mlCommon.setValueWithChecks('mlAnalyticsEditFlyoutDescriptionInput', jobDescription, { + clearWithKeyboard: true, + }); + await this.assertJobDescriptionEditValue(jobDescription); + }, + + async setJobMmlEdit(mml: string) { + await mlCommon.setValueWithChecks('mlAnalyticsEditFlyoutmodelMemoryLimitInput', mml, { + clearWithKeyboard: true, + }); + await this.assertJobMmlEditValue(mml); + }, + + async assertAnalyticsEditFlyoutMissing() { + await testSubjects.missingOrFail('mlAnalyticsEditFlyout'); + }, + + async updateAnalyticsJob() { + await testSubjects.existOrFail('mlAnalyticsEditFlyoutUpdateButton'); + await testSubjects.click('mlAnalyticsEditFlyoutUpdateButton'); + await retry.tryForTime(5000, async () => { + await this.assertAnalyticsEditFlyoutMissing(); + }); + }, + }; +} diff --git a/x-pack/test/functional/services/ml/data_frame_analytics_table.ts b/x-pack/test/functional/services/ml/data_frame_analytics_table.ts index d315f9eb77210..608a1f2bee3e1 100644 --- a/x-pack/test/functional/services/ml/data_frame_analytics_table.ts +++ b/x-pack/test/functional/services/ml/data_frame_analytics_table.ts @@ -88,6 +88,12 @@ export function MachineLearningDataFrameAnalyticsTableProvider({ getService }: F await testSubjects.existOrFail('mlAnalyticsJobViewButton'); } + public async openEditFlyout(analyticsId: string) { + await this.openRowActions(analyticsId); + await testSubjects.click('mlAnalyticsJobEditButton'); + await testSubjects.existOrFail('mlAnalyticsEditFlyout', { timeout: 5000 }); + } + async assertAnalyticsSearchInputValue(expectedSearchValue: string) { const searchBarInput = await this.getAnalyticsSearchInput(); const actualSearchValue = await searchBarInput.getAttribute('value'); diff --git a/x-pack/test/functional/services/ml/index.ts b/x-pack/test/functional/services/ml/index.ts index fbf31e40a242a..fd36bb0f47f95 100644 --- a/x-pack/test/functional/services/ml/index.ts +++ b/x-pack/test/functional/services/ml/index.ts @@ -13,6 +13,7 @@ import { MachineLearningCommonProvider } from './common'; import { MachineLearningCustomUrlsProvider } from './custom_urls'; import { MachineLearningDataFrameAnalyticsProvider } from './data_frame_analytics'; import { MachineLearningDataFrameAnalyticsCreationProvider } from './data_frame_analytics_creation'; +import { MachineLearningDataFrameAnalyticsEditProvider } from './data_frame_analytics_edit'; import { MachineLearningDataFrameAnalyticsTableProvider } from './data_frame_analytics_table'; import { MachineLearningDataVisualizerProvider } from './data_visualizer'; import { MachineLearningDataVisualizerFileBasedProvider } from './data_visualizer_file_based'; @@ -47,6 +48,7 @@ export function MachineLearningProvider(context: FtrProviderContext) { common, api ); + const dataFrameAnalyticsEdit = MachineLearningDataFrameAnalyticsEditProvider(context, common); const dataFrameAnalyticsTable = MachineLearningDataFrameAnalyticsTableProvider(context); const dataVisualizer = MachineLearningDataVisualizerProvider(context); const dataVisualizerFileBased = MachineLearningDataVisualizerFileBasedProvider(context, common); @@ -76,6 +78,7 @@ export function MachineLearningProvider(context: FtrProviderContext) { customUrls, dataFrameAnalytics, dataFrameAnalyticsCreation, + dataFrameAnalyticsEdit, dataFrameAnalyticsTable, dataVisualizer, dataVisualizerFileBased, From b001301f5ad44757fa83bffc7f4dac1f007c18b6 Mon Sep 17 00:00:00 2001 From: spalger Date: Thu, 16 Jul 2020 08:47:23 -0700 Subject: [PATCH 26/34] skip flaky suite (#71390) (cherry picked from commit d0afbd887dc547ebbc564f77edf2ef04750fc653) --- .../test_suites/task_manager/task_manager_integration.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/task_manager_integration.js b/x-pack/test/plugin_api_integration/test_suites/task_manager/task_manager_integration.js index c87a5039360b8..ea95eb42dd6ff 100644 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/task_manager_integration.js +++ b/x-pack/test/plugin_api_integration/test_suites/task_manager/task_manager_integration.js @@ -28,7 +28,8 @@ export default function ({ getService }) { const testHistoryIndex = '.kibana_task_manager_test_result'; const supertest = supertestAsPromised(url.format(config.get('servers.kibana'))); - describe('scheduling and running tasks', () => { + // FLAKY: https://github.com/elastic/kibana/issues/71390 + describe.skip('scheduling and running tasks', () => { beforeEach( async () => await supertest.delete('/api/sample_tasks').set('kbn-xsrf', 'xxx').expect(200) ); From 4b3326d6fbafb09bb6eb8552c0a17505af50aabe Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Wed, 5 Aug 2020 15:08:38 -0700 Subject: [PATCH 27/34] [DOCS] Add Kibana alerts to Stack Monitoring (#73762) Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> --- .../images/monitoring-kibana-alerts.png | Bin 0 -> 113426 bytes docs/user/monitoring/index.asciidoc | 1 + docs/user/monitoring/kibana-alerts.asciidoc | 36 ++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 docs/user/monitoring/images/monitoring-kibana-alerts.png create mode 100644 docs/user/monitoring/kibana-alerts.asciidoc diff --git a/docs/user/monitoring/images/monitoring-kibana-alerts.png b/docs/user/monitoring/images/monitoring-kibana-alerts.png new file mode 100644 index 0000000000000000000000000000000000000000..43edcb45041400ea128a9b6ee397df9188dff82f GIT binary patch literal 113426 zcmZs@byQnj(+658MT-=7C{l`3w0Q9X#hu{p?pjKV7PkV$ic4^ZAjKVu6C8pB2^u8G z<@xS?@A|&?=^t6^th3MAXZD`iW51b1sw&H2W0GS&d-e=l{-d<|vu7yZpFKnBMn`?R zgH=M?`gDWLR!U0MUP?~N*}>UO!^PCxQqI!J(#_UfT~6}Zv-dGET81{1T7+V4?$-1S z;~EaU-#kjhu^F+Gw0ZODTZ30t_?=Sa`IqSSEa1oEKZeHN^R(UPsmQ1Xyn|*E_I5UX zrhR*f3l^*AOu=ManxTCwR(~C;x))t^kS@%VZrfV3YIz)Ro(0SHKW?#xz1V9h(@jkv zL?X_pWGCU?bPtb<5M_=38lFpnnx~^i#cEjk37KC7%ew)vCiUCjcyV^+AqUtbOGQNM zN@G^HQ-T!{hjdb`HR6Tjcbh;X4%MfIo9#8d`_Rkj*Sujq-{US86k}_(&9*rm@j^?( zE+P#tZnW=O_9fz7^_+38lHEbs9^{uNN*pzQc{QV|=oL)bpaP6m){#>HY>0XtwELC+ zoNbdmVnSedSfhKPyez5jXSY{x6QBOsnJ`LMW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ku$@puV$bzFW`mOqChrUP%Wf7-6KxO9FWVFECgVBjTV~GB0!w z2T&s-?FcDFxr6bT6xC%GGx9P1GDR&SxiF-ZBL%}~@o{nW*J$3e2g<|w+1(CbXlp0b z7h+Xyb7KvX12o?7@YH)zjfz)4=WkYj;2`)D1``08nI&5V{oExCwn-S4MFolzZ zJBk#Lt@gh)0spr4`K=J3W39)%ib6-~e%ZwnI94T>m!k4ySMf?OgH+h@3j6j!TRm+X z2#H8kjJKkJ+-g*$-U^bEm8{DH1MDx(Oeq=@J5nD+y}Z6?%cc;=Y==jFs=$S&J#|u2&qGkvt)V>n#E8K0@Me8oK0_6H8D*R< zsjU~XYvxx%2g?96+})9c+KcIwUgj)LNc&`C%f`o9b{>8l>8U&jXXL zCG?J!vLM&xOt6Rb|M7OAtQRJ%y`P-noRb8;b&1>N|778b@v5bJ*oqd}JTikVOOmp1wqpsh*$L$3EP{QY~pF2uyt zBA@lwFeB3b2=6!4AjlD$sZdXfG!)JKqpA_l{WWa;phtveWsWQ>4r86=5=m*+RmCn_W z!pI2QqRTKg<<1@P({zf%&eONwb?cP^R@3;4;d7QpozQ|?m0SDUAl~ccO^~bqj+|&f z5Ew(buu-XrmyX_Q{O1IIsGjVWb7bmk&6W3mE7pJGCZx#fXIxJ3|F2v4NQL{Iuo!Ot mnzjD-2ABQh(f^l++=ukk^nL2|EP9THxYPCS?@c#nx8$}5K literal 0 HcmV?d00001 diff --git a/docs/user/monitoring/index.asciidoc b/docs/user/monitoring/index.asciidoc index ab773657073ba..514988792d214 100644 --- a/docs/user/monitoring/index.asciidoc +++ b/docs/user/monitoring/index.asciidoc @@ -2,6 +2,7 @@ include::xpack-monitoring.asciidoc[] include::beats-details.asciidoc[leveloffset=+1] include::cluster-alerts.asciidoc[leveloffset=+1] include::elasticsearch-details.asciidoc[leveloffset=+1] +include::kibana-alerts.asciidoc[leveloffset=+1] include::kibana-details.asciidoc[leveloffset=+1] include::logstash-details.asciidoc[leveloffset=+1] include::monitoring-troubleshooting.asciidoc[leveloffset=+1] diff --git a/docs/user/monitoring/kibana-alerts.asciidoc b/docs/user/monitoring/kibana-alerts.asciidoc new file mode 100644 index 0000000000000..1ac5c385f8ed5 --- /dev/null +++ b/docs/user/monitoring/kibana-alerts.asciidoc @@ -0,0 +1,36 @@ +[role="xpack"] +[[kibana-alerts]] += {kib} Alerts + +The {stack} {monitor-features} provide +<> out-of-the box to notify you of +potential issues in the {stack}. These alerts are preconfigured based on the +best practices recommended by Elastic. However, you can tailor them to meet your +specific needs. + +When you open *{stack-monitor-app}*, the preconfigured {kib} alerts are +created automatically. If you collect monitoring data from multiple clusters, +these alerts can search, detect, and notify on various conditions across the +clusters. The alerts are visible alongside your existing {watcher} cluster +alerts. You can view details about the alerts that are active and view health +and performance data for {es}, {ls}, and Beats in real time, as well as +analyze past performance. You can also modify active alerts. + +[role="screenshot"] +image::user/monitoring/images/monitoring-kibana-alerts.png["Kibana alerts in the Stack Monitoring app"] + +To review and modify all the available alerts, use +<> in *{stack-manage-app}*. + +[discrete] +[[kibana-alerts-cpu-threshold]] +== CPU threshold + +This alert is triggered when a node runs a consistently high CPU load. By +default, the trigger condition is set at 85% or more averaged over the last 5 +minutes. The alert is grouped across all the nodes of the cluster by running +checks on a schedule time of 1 minute with a re-notify internal of 1 day. + +NOTE: Some action types are subscription features, while others are free. +For a comparison of the Elastic subscription levels, see the alerting section of +the {subscriptions}[Subscriptions page]. From 9ef04e7fb21306456e182c4feb422bf09a7113a0 Mon Sep 17 00:00:00 2001 From: Jen Huang Date: Wed, 5 Aug 2020 15:28:03 -0700 Subject: [PATCH 28/34] Rename package configs SO to package policies (#74422) --- .../plugins/ingest_manager/common/constants/package_config.ts | 2 +- .../services/artifacts/manifest_manager/manifest_manager.ts | 2 +- x-pack/test/functional/es_archives/fleet/agents/mappings.json | 4 ++-- x-pack/test/functional/es_archives/lists/mappings.json | 4 ++-- .../es_archives/reporting/canvas_disallowed_url/mappings.json | 4 ++-- .../es_archives/export_rule/mappings.json | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/ingest_manager/common/constants/package_config.ts b/x-pack/plugins/ingest_manager/common/constants/package_config.ts index e7d5ef67f7253..48fee967a3d3d 100644 --- a/x-pack/plugins/ingest_manager/common/constants/package_config.ts +++ b/x-pack/plugins/ingest_manager/common/constants/package_config.ts @@ -4,4 +4,4 @@ * you may not use this file except in compliance with the Elastic License. */ -export const PACKAGE_CONFIG_SAVED_OBJECT_TYPE = 'ingest-package-configs'; +export const PACKAGE_CONFIG_SAVED_OBJECT_TYPE = 'ingest-package-policies'; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts index c20aaed10f3f8..9d15b4464c191 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts @@ -237,7 +237,7 @@ export class ManifestManager { const { items, total } = await this.packageConfigService.list(this.savedObjectsClient, { page, perPage: 20, - kuery: 'ingest-package-configs.package.name:endpoint', + kuery: 'ingest-package-policies.package.name:endpoint', }); for (const packageConfig of items) { diff --git a/x-pack/test/functional/es_archives/fleet/agents/mappings.json b/x-pack/test/functional/es_archives/fleet/agents/mappings.json index acc32c3e2cbb5..23b404a53703f 100644 --- a/x-pack/test/functional/es_archives/fleet/agents/mappings.json +++ b/x-pack/test/functional/es_archives/fleet/agents/mappings.json @@ -28,7 +28,7 @@ "application_usage_transactional": "965839e75f809fefe04f92dc4d99722a", "action_task_params": "a9d49f184ee89641044be0ca2950fa3a", "fleet-agent-events": "3231653fafe4ef3196fe3b32ab774bf2", - "ingest-package-configs": "2346514df03316001d56ed4c8d46fa94", + "ingest-package-policies": "2346514df03316001d56ed4c8d46fa94", "apm-indices": "9bb9b2bf1fa636ed8619cbab5ce6a1dd", "inventory-view": "5299b67717e96502c77babf1c16fd4d3", "upgrade-assistant-reindex-operation": "296a89039fc4260292be36b1b005d8f2", @@ -1834,7 +1834,7 @@ } } }, - "ingest-package-configs": { + "ingest-package-policies": { "properties": { "config_id": { "type": "keyword" diff --git a/x-pack/test/functional/es_archives/lists/mappings.json b/x-pack/test/functional/es_archives/lists/mappings.json index 2fc1f1a3111a7..3b4d915cc1ca5 100644 --- a/x-pack/test/functional/es_archives/lists/mappings.json +++ b/x-pack/test/functional/es_archives/lists/mappings.json @@ -70,7 +70,7 @@ "maps-telemetry": "5ef305b18111b77789afefbd36b66171", "namespace": "2f4316de49999235636386fe51dc06c1", "cases-user-actions": "32277330ec6b721abe3b846cfd939a71", - "ingest-package-configs": "48e8bd97e488008e21c0b5a2367b83ad", + "ingest-package-policies": "48e8bd97e488008e21c0b5a2367b83ad", "timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf", "siem-ui-timeline-pinned-event": "20638091112f0e14f0e443d512301c29", "config": "c63748b75f39d0c54de12d12c1ccbc20", @@ -1274,7 +1274,7 @@ } } }, - "ingest-package-configs": { + "ingest-package-policies": { "properties": { "config_id": { "type": "keyword" diff --git a/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json b/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json index 1fd338fbb0ffb..3519103d06814 100644 --- a/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json +++ b/x-pack/test/functional/es_archives/reporting/canvas_disallowed_url/mappings.json @@ -39,7 +39,7 @@ "index-pattern": "66eccb05066c5a89924f48a9e9736499", "ingest-agent-policies": "9326f99c977fd2ef5ab24b6336a0675c", "ingest-outputs": "8aa988c376e65443fefc26f1075e93a3", - "ingest-package-configs": "48e8bd97e488008e21c0b5a2367b83ad", + "ingest-package-policies": "48e8bd97e488008e21c0b5a2367b83ad", "ingest_manager_settings": "012cf278ec84579495110bb827d1ed09", "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", "lens": "d33c68a69ff1e78c9888dedd2164ac22", @@ -1212,7 +1212,7 @@ } } }, - "ingest-package-configs": { + "ingest-package-policies": { "properties": { "config_id": { "type": "keyword" diff --git a/x-pack/test/security_solution_cypress/es_archives/export_rule/mappings.json b/x-pack/test/security_solution_cypress/es_archives/export_rule/mappings.json index dc92d23a618d3..bb63d29503663 100644 --- a/x-pack/test/security_solution_cypress/es_archives/export_rule/mappings.json +++ b/x-pack/test/security_solution_cypress/es_archives/export_rule/mappings.json @@ -41,7 +41,7 @@ "infrastructure-ui-source": "2b2809653635caf490c93f090502d04c", "ingest-agent-policies": "9326f99c977fd2ef5ab24b6336a0675c", "ingest-outputs": "8aa988c376e65443fefc26f1075e93a3", - "ingest-package-configs": "48e8bd97e488008e21c0b5a2367b83ad", + "ingest-package-policies": "48e8bd97e488008e21c0b5a2367b83ad", "ingest_manager_settings": "012cf278ec84579495110bb827d1ed09", "inventory-view": "88fc7e12fd1b45b6f0787323ce4f18d2", "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", @@ -1286,7 +1286,7 @@ } } }, - "ingest-package-configs": { + "ingest-package-policies": { "properties": { "config_id": { "type": "keyword" From 4ae6746c0bd5ffd34d70720b641506088d768840 Mon Sep 17 00:00:00 2001 From: Kevin Logan <56395104+kevinlog@users.noreply.github.com> Date: Wed, 5 Aug 2020 18:32:22 -0400 Subject: [PATCH 29/34] [SECURITY_SOLUTION] add z-index to get over nav bar (#74427) --- .../management/pages/endpoint_hosts/view/details/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx index b22ff406a1605..69dabeeb616a0 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/index.tsx @@ -70,7 +70,12 @@ export const HostDetailsFlyout = memo(() => { }, [error, toasts]); return ( - +

    From dfad75ff1a9e9849c413dfe665229c7f7405d5c6 Mon Sep 17 00:00:00 2001 From: Brent Kimmel Date: Wed, 5 Aug 2020 18:46:56 -0400 Subject: [PATCH 30/34] [Security Solution][Test] Enzyme test for related events button (#74411) Co-authored-by: Elastic Machine --- .../mocks/one_ancestor_two_children.ts | 46 +++++++++----- .../resolver/store/mocks/related_event.ts | 36 +++++++++++ .../resolver/store/mocks/resolver_tree.ts | 53 ++++++++++++++++ .../test_utilities/simulator/index.tsx | 22 +++++++ .../resolver/view/clickthrough.test.tsx | 62 +++++++++++++++++-- .../public/resolver/view/submenu.tsx | 1 + 6 files changed, 198 insertions(+), 22 deletions(-) create mode 100644 x-pack/plugins/security_solution/public/resolver/store/mocks/related_event.ts diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/one_ancestor_two_children.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/one_ancestor_two_children.ts index be0bc1b812a0b..94c176d343d17 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/one_ancestor_two_children.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/one_ancestor_two_children.ts @@ -10,7 +10,10 @@ import { ResolverEntityIndex, } from '../../../../common/endpoint/types'; import { mockEndpointEvent } from '../../store/mocks/endpoint_event'; -import { mockTreeWithNoAncestorsAnd2Children } from '../../store/mocks/resolver_tree'; +import { + mockTreeWithNoAncestorsAnd2Children, + withRelatedEventsOnOrigin, +} from '../../store/mocks/resolver_tree'; import { DataAccessLayer } from '../../types'; interface Metadata { @@ -40,11 +43,24 @@ interface Metadata { /** * A simple mock dataAccessLayer possible that returns a tree with 0 ancestors and 2 direct children. 1 related event is returned. The parameter to `entities` is ignored. */ -export function oneAncestorTwoChildren(): { dataAccessLayer: DataAccessLayer; metadata: Metadata } { +export function oneAncestorTwoChildren( + { withRelatedEvents }: { withRelatedEvents: Iterable<[string, string]> | null } = { + withRelatedEvents: null, + } +): { dataAccessLayer: DataAccessLayer; metadata: Metadata } { const metadata: Metadata = { databaseDocumentID: '_id', entityIDs: { origin: 'origin', firstChild: 'firstChild', secondChild: 'secondChild' }, }; + const baseTree = mockTreeWithNoAncestorsAnd2Children({ + originID: metadata.entityIDs.origin, + firstChildID: metadata.entityIDs.firstChild, + secondChildID: metadata.entityIDs.secondChild, + }); + const composedTree = withRelatedEvents + ? withRelatedEventsOnOrigin(baseTree, withRelatedEvents) + : baseTree; + return { metadata, dataAccessLayer: { @@ -54,13 +70,17 @@ export function oneAncestorTwoChildren(): { dataAccessLayer: DataAccessLayer; me relatedEvents(entityID: string): Promise { return Promise.resolve({ entityID, - events: [ - mockEndpointEvent({ - entityID, - name: 'event', - timestamp: 0, - }), - ], + events: + /* Respond with the mocked related events when the origin's related events are fetched*/ withRelatedEvents && + entityID === metadata.entityIDs.origin + ? composedTree.relatedEvents.events + : [ + mockEndpointEvent({ + entityID, + name: 'event', + timestamp: 0, + }), + ], nextEvent: null, }); }, @@ -69,13 +89,7 @@ export function oneAncestorTwoChildren(): { dataAccessLayer: DataAccessLayer; me * Fetch a ResolverTree for a entityID */ resolverTree(): Promise { - return Promise.resolve( - mockTreeWithNoAncestorsAnd2Children({ - originID: metadata.entityIDs.origin, - firstChildID: metadata.entityIDs.firstChild, - secondChildID: metadata.entityIDs.secondChild, - }) - ); + return Promise.resolve(composedTree); }, /** diff --git a/x-pack/plugins/security_solution/public/resolver/store/mocks/related_event.ts b/x-pack/plugins/security_solution/public/resolver/store/mocks/related_event.ts new file mode 100644 index 0000000000000..1e0c460a3a711 --- /dev/null +++ b/x-pack/plugins/security_solution/public/resolver/store/mocks/related_event.ts @@ -0,0 +1,36 @@ +/* + * 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 { EndpointEvent } from '../../../../common/endpoint/types'; + +/** + * Simple mock related event. + */ +export function mockRelatedEvent({ + entityID, + timestamp, + category, + type, + id, +}: { + entityID: string; + timestamp: number; + category: string; + type: string; + id?: string; +}): EndpointEvent { + return { + '@timestamp': timestamp, + event: { + kind: 'event', + type, + category, + id: id ?? 'xyz', + }, + process: { + entity_id: entityID, + }, + } as EndpointEvent; +} diff --git a/x-pack/plugins/security_solution/public/resolver/store/mocks/resolver_tree.ts b/x-pack/plugins/security_solution/public/resolver/store/mocks/resolver_tree.ts index 6a8ab61ccf9b6..21d0309501aa8 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/mocks/resolver_tree.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/mocks/resolver_tree.ts @@ -5,6 +5,7 @@ */ import { mockEndpointEvent } from './endpoint_event'; +import { mockRelatedEvent } from './related_event'; import { ResolverTree, ResolverEvent } from '../../../../common/endpoint/types'; export function mockTreeWith2AncestorsAndNoChildren({ @@ -109,6 +110,58 @@ export function mockTreeWithAllProcessesTerminated({ } as unknown) as ResolverTree; } +/** + * A valid category for a related event. E.g. "registry", "network", "file" + */ +type RelatedEventCategory = string; +/** + * A valid type for a related event. E.g. "start", "end", "access" + */ +type RelatedEventType = string; + +/** + * Add/replace related event info (on origin node) for any mock ResolverTree + * + * @param treeToAddRelatedEventsTo the ResolverTree to modify + * @param relatedEventsToAddByCategoryAndType Iterable of `[category, type]` pairs describing related events. e.g. [['dns','info'],['registry','access']] + */ +export function withRelatedEventsOnOrigin( + treeToAddRelatedEventsTo: ResolverTree, + relatedEventsToAddByCategoryAndType: Iterable<[RelatedEventCategory, RelatedEventType]> +): ResolverTree { + const events = []; + const byCategory: Record = {}; + const stats = { + totalAlerts: 0, + events: { + total: 0, + byCategory, + }, + }; + for (const [category, type] of relatedEventsToAddByCategoryAndType) { + events.push( + mockRelatedEvent({ + entityID: treeToAddRelatedEventsTo.entityID, + timestamp: 1, + category, + type, + }) + ); + stats.events.total++; + stats.events.byCategory[category] = stats.events.byCategory[category] + ? stats.events.byCategory[category] + 1 + : 1; + } + return { + ...treeToAddRelatedEventsTo, + stats, + relatedEvents: { + events, + nextEvent: null, + }, + }; +} + export function mockTreeWithNoAncestorsAnd2Children({ originID, firstChildID, diff --git a/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/index.tsx b/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/index.tsx index 2a2354921a3d4..ed30643ed871e 100644 --- a/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/index.tsx +++ b/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/index.tsx @@ -220,6 +220,28 @@ export class Simulator { ); } + /** + * Dump all contents of the outer ReactWrapper (to be `console.log`ged as appropriate) + * This will include both DOM (div, span, etc.) and React/JSX (MyComponent, MyGrid, etc.) + */ + public debugWrapper() { + return this.wrapper.debug(); + } + + /** + * Return an Enzyme ReactWrapper that includes the Related Events host button for a given process node + * + * @param entityID The entity ID of the proocess node to select in + */ + public processNodeRelatedEventButton(entityID: string): ReactWrapper { + return this.processNodeElements({ entityID }).findWhere( + (wrapper) => + // Filter out React components + typeof wrapper.type() === 'string' && + wrapper.prop('data-test-subj') === 'resolver:submenu:button' + ); + } + /** * Return the selected node query string values. */ diff --git a/x-pack/plugins/security_solution/public/resolver/view/clickthrough.test.tsx b/x-pack/plugins/security_solution/public/resolver/view/clickthrough.test.tsx index f339d128944cc..c819491dd28f0 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/clickthrough.test.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/clickthrough.test.tsx @@ -9,14 +9,14 @@ import { Simulator } from '../test_utilities/simulator'; // Extend jest with a custom matcher import '../test_utilities/extend_jest'; -describe('Resolver, when analyzing a tree that has 1 ancestor and 2 children', () => { - let simulator: Simulator; - let databaseDocumentID: string; - let entityIDs: { origin: string; firstChild: string; secondChild: string }; +let simulator: Simulator; +let databaseDocumentID: string; +let entityIDs: { origin: string; firstChild: string; secondChild: string }; - // the resolver component instance ID, used by the react code to distinguish piece of global state from those used by other resolver instances - const resolverComponentInstanceID = 'resolverComponentInstanceID'; +// the resolver component instance ID, used by the react code to distinguish piece of global state from those used by other resolver instances +const resolverComponentInstanceID = 'resolverComponentInstanceID'; +describe('Resolver, when analyzing a tree that has 1 ancestor and 2 children', () => { beforeEach(async () => { // create a mock data access layer const { metadata: dataAccessLayerMetadata, dataAccessLayer } = oneAncestorTwoChildren(); @@ -79,6 +79,7 @@ describe('Resolver, when analyzing a tree that has 1 ancestor and 2 children', ( simulator .processNodeElements({ entityID: entityIDs.secondChild }) .find('button') + .first() .simulate('click'); }); it('should render the second child node as selected, and the first child not as not selected, and the query string should indicate that the second child is selected', async () => { @@ -107,3 +108,52 @@ describe('Resolver, when analyzing a tree that has 1 ancestor and 2 children', ( }); }); }); + +describe('Resolver, when analyzing a tree that has some related events', () => { + beforeEach(async () => { + // create a mock data access layer with related events + const { metadata: dataAccessLayerMetadata, dataAccessLayer } = oneAncestorTwoChildren({ + withRelatedEvents: [ + ['registry', 'access'], + ['registry', 'access'], + ], + }); + + // save a reference to the entity IDs exposed by the mock data layer + entityIDs = dataAccessLayerMetadata.entityIDs; + + // save a reference to the `_id` supported by the mock data layer + databaseDocumentID = dataAccessLayerMetadata.databaseDocumentID; + + // create a resolver simulator, using the data access layer and an arbitrary component instance ID + simulator = new Simulator({ databaseDocumentID, dataAccessLayer, resolverComponentInstanceID }); + }); + + describe('when it has loaded', () => { + beforeEach(async () => { + await expect( + simulator.mapStateTransitions(() => ({ + graphElements: simulator.graphElement().length, + graphLoadingElements: simulator.graphLoadingElement().length, + graphErrorElements: simulator.graphErrorElement().length, + originNode: simulator.processNodeElements({ entityID: entityIDs.origin }).length, + })) + ).toYieldEqualTo({ + graphElements: 1, + graphLoadingElements: 0, + graphErrorElements: 0, + originNode: 1, + }); + }); + + it('should render a related events button', async () => { + await expect( + simulator.mapStateTransitions(() => ({ + relatedEventButtons: simulator.processNodeRelatedEventButton(entityIDs.origin).length, + })) + ).toYieldEqualTo({ + relatedEventButtons: 1, + }); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx b/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx index 6a9ab184e9bab..7f0ba244146fd 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx @@ -233,6 +233,7 @@ const NodeSubMenuComponents = React.memo( iconType={menuIsOpen ? 'arrowUp' : 'arrowDown'} iconSide="right" tabIndex={-1} + data-test-subj="resolver:submenu:button" > {count ? : ''} {menuTitle} From f5c9aa8860f813b88d910370e735a22ab988e688 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Wed, 5 Aug 2020 18:55:23 -0500 Subject: [PATCH 31/34] Filter out non-security jobs when collecting Detections telemetry (#74456) Our jobs summary call returns all installed jobs regardless of group; passing groups as jobIds does not perform group filtering. This adds a helper predicate function on which to filter these results, and updates tests accordingly. --- .../security_solution/common/constants.ts | 7 +++++ .../machine_learning/is_security_job.test.ts | 30 +++++++++++++++++++ .../machine_learning/is_security_job.ts | 11 +++++++ .../usage/detections/detections.mocks.ts | 15 +++++++++- .../usage/detections/detections_helpers.ts | 7 ++--- 5 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 x-pack/plugins/security_solution/common/machine_learning/is_security_job.test.ts create mode 100644 x-pack/plugins/security_solution/common/machine_learning/is_security_job.ts diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index c74cf888a2db6..0fc42895050a5 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -140,6 +140,13 @@ export const UNAUTHENTICATED_USER = 'Unauthenticated'; */ export const MINIMUM_ML_LICENSE = 'platinum'; +/* + Machine Learning constants + */ +export const ML_GROUP_ID = 'security'; +export const LEGACY_ML_GROUP_ID = 'siem'; +export const ML_GROUP_IDS = [ML_GROUP_ID, LEGACY_ML_GROUP_ID]; + /* Rule notifications options */ diff --git a/x-pack/plugins/security_solution/common/machine_learning/is_security_job.test.ts b/x-pack/plugins/security_solution/common/machine_learning/is_security_job.test.ts new file mode 100644 index 0000000000000..abb0c790584af --- /dev/null +++ b/x-pack/plugins/security_solution/common/machine_learning/is_security_job.test.ts @@ -0,0 +1,30 @@ +/* + * 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 { MlSummaryJob } from '../../../ml/common/types/anomaly_detection_jobs'; +import { isSecurityJob } from './is_security_job'; + +describe('isSecurityJob', () => { + it('counts a job with a group of "siem"', () => { + const job = { groups: ['siem', 'other'] } as MlSummaryJob; + expect(isSecurityJob(job)).toEqual(true); + }); + + it('counts a job with a group of "security"', () => { + const job = { groups: ['security', 'other'] } as MlSummaryJob; + expect(isSecurityJob(job)).toEqual(true); + }); + + it('counts a job in both "security" and "siem"', () => { + const job = { groups: ['siem', 'security'] } as MlSummaryJob; + expect(isSecurityJob(job)).toEqual(true); + }); + + it('does not count a job in a related group', () => { + const job = { groups: ['auditbeat', 'process'] } as MlSummaryJob; + expect(isSecurityJob(job)).toEqual(false); + }); +}); diff --git a/x-pack/plugins/security_solution/common/machine_learning/is_security_job.ts b/x-pack/plugins/security_solution/common/machine_learning/is_security_job.ts new file mode 100644 index 0000000000000..43cfa4ad59964 --- /dev/null +++ b/x-pack/plugins/security_solution/common/machine_learning/is_security_job.ts @@ -0,0 +1,11 @@ +/* + * 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 { MlSummaryJob } from '../../../ml/common/types/anomaly_detection_jobs'; +import { ML_GROUP_IDS } from '../constants'; + +export const isSecurityJob = (job: MlSummaryJob): boolean => + job.groups.some((group) => ML_GROUP_IDS.includes(group)); diff --git a/x-pack/plugins/security_solution/server/usage/detections/detections.mocks.ts b/x-pack/plugins/security_solution/server/usage/detections/detections.mocks.ts index e59b1092978da..7afc185ae07fd 100644 --- a/x-pack/plugins/security_solution/server/usage/detections/detections.mocks.ts +++ b/x-pack/plugins/security_solution/server/usage/detections/detections.mocks.ts @@ -41,7 +41,7 @@ export const getMockJobSummaryResponse = () => [ { id: 'other_job', description: 'a job that is custom', - groups: ['auditbeat', 'process'], + groups: ['auditbeat', 'process', 'security'], processed_record_count: 0, memory_status: 'ok', jobState: 'closed', @@ -54,6 +54,19 @@ export const getMockJobSummaryResponse = () => [ { id: 'another_job', description: 'another job that is custom', + groups: ['auditbeat', 'process', 'security'], + processed_record_count: 0, + memory_status: 'ok', + jobState: 'opened', + hasDatafeed: true, + datafeedId: 'datafeed-another', + datafeedIndices: ['auditbeat-*'], + datafeedState: 'started', + isSingleMetricViewerJob: true, + }, + { + id: 'irrelevant_job', + description: 'a non-security job', groups: ['auditbeat', 'process'], processed_record_count: 0, memory_status: 'ok', diff --git a/x-pack/plugins/security_solution/server/usage/detections/detections_helpers.ts b/x-pack/plugins/security_solution/server/usage/detections/detections_helpers.ts index 80a9dba26df8e..a6d4dc7a38e14 100644 --- a/x-pack/plugins/security_solution/server/usage/detections/detections_helpers.ts +++ b/x-pack/plugins/security_solution/server/usage/detections/detections_helpers.ts @@ -15,6 +15,7 @@ import { MlPluginSetup } from '../../../../ml/server'; import { SIGNALS_ID, INTERNAL_IMMUTABLE_KEY } from '../../../common/constants'; import { DetectionRulesUsage, MlJobsUsage } from './index'; import { isJobStarted } from '../../../common/machine_learning/helpers'; +import { isSecurityJob } from '../../../common/machine_learning/is_security_job'; interface DetectionsMetric { isElastic: boolean; @@ -182,11 +183,9 @@ export const getMlJobsUsage = async (ml: MlPluginSetup | undefined): Promise module.jobs); - const jobs = await ml - .jobServiceProvider(internalMlClient, fakeRequest) - .jobsSummary(['siem', 'security']); + const jobs = await ml.jobServiceProvider(internalMlClient, fakeRequest).jobsSummary(); - jobsUsage = jobs.reduce((usage, job) => { + jobsUsage = jobs.filter(isSecurityJob).reduce((usage, job) => { const isElastic = moduleJobs.some((moduleJob) => moduleJob.id === job.id); const isEnabled = isJobStarted(job.jobState, job.datafeedState); From aa75f80afd853960ace1cf2b2e526395635828dd Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Thu, 6 Aug 2020 08:07:19 +0200 Subject: [PATCH 32/34] Skip "space with index pattern management disabled" functional test for cloud env (#74073) * Skipped due to occasional flakiness in cloud env, cause by ingest management tests --- .../apps/discover/feature_controls/discover_spaces.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts b/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts index 767dad74c23d7..f8dc2f3b0aeb8 100644 --- a/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts +++ b/x-pack/test/functional/apps/discover/feature_controls/discover_spaces.ts @@ -137,7 +137,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); }); - describe('space with index pattern management disabled', () => { + describe('space with index pattern management disabled', function () { + // unskipped because of flakiness in cloud, caused be ingest management tests + // should be unskipped when https://github.com/elastic/kibana/issues/74353 was resolved + this.tags(['skipCloud']); before(async () => { await spacesService.create({ id: 'custom_space_no_index_patterns', From 626fbc294857a565afdd19dbd7262b7452e3ca7f Mon Sep 17 00:00:00 2001 From: Marta Bondyra Date: Thu, 6 Aug 2020 10:10:09 +0200 Subject: [PATCH 33/34] [Lens] Clean and inline disabling of react-hooks/exhaustive-deps eslint rule (#70010) --- .eslintrc.js | 6 - x-pack/plugins/lens/public/app_plugin/app.tsx | 114 +++++----- .../datatable_visualization/expression.tsx | 5 +- .../debounced_component.tsx | 8 +- .../config_panel/config_panel.tsx | 12 +- .../editor_frame/data_panel_wrapper.tsx | 7 +- .../editor_frame/editor_frame.tsx | 210 ++++++++++-------- .../editor_frame/suggestion_panel.tsx | 4 +- .../workspace_panel/chart_switch.tsx | 1 + .../workspace_panel/workspace_panel.tsx | 96 ++++---- .../indexpattern_datasource/datapanel.tsx | 11 +- .../dimension_panel/field_select.tsx | 4 +- x-pack/plugins/lens/public/loader.tsx | 44 ++-- .../xy_visualization/xy_config_panel.tsx | 2 +- .../public/xy_visualization/xy_expression.tsx | 2 +- 15 files changed, 285 insertions(+), 241 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b3d29c9866411..5a03552ba3a51 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -132,12 +132,6 @@ module.exports = { 'react-hooks/rules-of-hooks': 'off', }, }, - { - files: ['x-pack/plugins/lens/**/*.{js,mjs,ts,tsx}'], - rules: { - 'react-hooks/exhaustive-deps': 'off', - }, - }, { files: ['x-pack/plugins/ml/**/*.{js,mjs,ts,tsx}'], rules: { diff --git a/x-pack/plugins/lens/public/app_plugin/app.tsx b/x-pack/plugins/lens/public/app_plugin/app.tsx index ab4c4820315ac..4a8694862642b 100644 --- a/x-pack/plugins/lens/public/app_plugin/app.tsx +++ b/x-pack/plugins/lens/public/app_plugin/app.tsx @@ -163,7 +163,13 @@ export function App({ filterSubscription.unsubscribe(); timeSubscription.unsubscribe(); }; - }, [data.query.filterManager, data.query.timefilter.timefilter]); + }, [ + data.query.filterManager, + data.query.timefilter.timefilter, + core.uiSettings, + data.query, + history, + ]); useEffect(() => { onAppLeave((actions) => { @@ -210,57 +216,61 @@ export function App({ ]); }, [core.application, core.chrome, core.http.basePath, state.persistedDoc]); - useEffect(() => { - if (docId && (!state.persistedDoc || state.persistedDoc.id !== docId)) { - setState((s) => ({ ...s, isLoading: true })); - docStorage - .load(docId) - .then((doc) => { - getAllIndexPatterns( - doc.state.datasourceMetaData.filterableIndexPatterns, - data.indexPatterns, - core.notifications - ) - .then((indexPatterns) => { - // Don't overwrite any pinned filters - data.query.filterManager.setAppFilters(doc.state.filters); - setState((s) => ({ - ...s, - isLoading: false, - persistedDoc: doc, - lastKnownDoc: doc, - query: doc.state.query, - indexPatternsForTopNav: indexPatterns, - })); - }) - .catch(() => { - setState((s) => ({ ...s, isLoading: false })); - - redirectTo(); - }); - }) - .catch(() => { - setState((s) => ({ ...s, isLoading: false })); - - core.notifications.toasts.addDanger( - i18n.translate('xpack.lens.app.docLoadingError', { - defaultMessage: 'Error loading saved document', - }) - ); - - redirectTo(); - }); - } - }, [ - core.notifications, - data.indexPatterns, - data.query.filterManager, - docId, - // TODO: These dependencies are changing too often - // docStorage, - // redirectTo, - // state.persistedDoc, - ]); + useEffect( + () => { + if (docId && (!state.persistedDoc || state.persistedDoc.id !== docId)) { + setState((s) => ({ ...s, isLoading: true })); + docStorage + .load(docId) + .then((doc) => { + getAllIndexPatterns( + doc.state.datasourceMetaData.filterableIndexPatterns, + data.indexPatterns, + core.notifications + ) + .then((indexPatterns) => { + // Don't overwrite any pinned filters + data.query.filterManager.setAppFilters(doc.state.filters); + setState((s) => ({ + ...s, + isLoading: false, + persistedDoc: doc, + lastKnownDoc: doc, + query: doc.state.query, + indexPatternsForTopNav: indexPatterns, + })); + }) + .catch(() => { + setState((s) => ({ ...s, isLoading: false })); + + redirectTo(); + }); + }) + .catch(() => { + setState((s) => ({ ...s, isLoading: false })); + + core.notifications.toasts.addDanger( + i18n.translate('xpack.lens.app.docLoadingError', { + defaultMessage: 'Error loading saved document', + }) + ); + + redirectTo(); + }); + } + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [ + core.notifications, + data.indexPatterns, + data.query.filterManager, + docId, + // TODO: These dependencies are changing too often + // docStorage, + // redirectTo, + // state.persistedDoc, + ] + ); const runSave = async ( saveProps: Omit & { diff --git a/x-pack/plugins/lens/public/datatable_visualization/expression.tsx b/x-pack/plugins/lens/public/datatable_visualization/expression.tsx index 143bec227ebee..02186ecf09b4b 100644 --- a/x-pack/plugins/lens/public/datatable_visualization/expression.tsx +++ b/x-pack/plugins/lens/public/datatable_visualization/expression.tsx @@ -160,6 +160,7 @@ export function DatatableComponent(props: DatatableRenderProps) { formatters[column.id] = props.formatFactory(column.formatHint); }); + const { onClickValue } = props; const handleFilterClick = useMemo( () => (field: string, value: unknown, colIndex: number, negate: boolean = false) => { const col = firstTable.columns[colIndex]; @@ -180,9 +181,9 @@ export function DatatableComponent(props: DatatableRenderProps) { ], timeFieldName, }; - props.onClickValue(desanitizeFilterContext(data)); + onClickValue(desanitizeFilterContext(data)); }, - [firstTable] + [firstTable, onClickValue] ); const bucketColumns = firstTable.columns diff --git a/x-pack/plugins/lens/public/debounced_component/debounced_component.tsx b/x-pack/plugins/lens/public/debounced_component/debounced_component.tsx index 08f55850b119e..0e148798cdf75 100644 --- a/x-pack/plugins/lens/public/debounced_component/debounced_component.tsx +++ b/x-pack/plugins/lens/public/debounced_component/debounced_component.tsx @@ -17,13 +17,11 @@ export function debouncedComponent(component: FunctionComponent, return (props: TProps) => { const [cachedProps, setCachedProps] = useState(props); - const debouncePropsChange = debounce(setCachedProps, delay); - const delayRender = useMemo(() => debouncePropsChange, []); + const debouncePropsChange = useMemo(() => debounce(setCachedProps, delay), [setCachedProps]); // cancel debounced prop change if component has been unmounted in the meantime - useEffect(() => () => debouncePropsChange.cancel(), []); - - delayRender(props); + useEffect(() => () => debouncePropsChange.cancel(), [debouncePropsChange]); + debouncePropsChange(props); return React.createElement(MemoizedComponent, cachedProps); }; diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.tsx index 73126b814f256..5f041a8d8562f 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.tsx @@ -39,29 +39,29 @@ function LayerPanels( } = props; const setVisualizationState = useMemo( () => (newState: unknown) => { - props.dispatch({ + dispatch({ type: 'UPDATE_VISUALIZATION_STATE', visualizationId: activeVisualization.id, newState, clearStagedPreview: false, }); }, - [props.dispatch, activeVisualization] + [dispatch, activeVisualization] ); const updateDatasource = useMemo( () => (datasourceId: string, newState: unknown) => { - props.dispatch({ + dispatch({ type: 'UPDATE_DATASOURCE_STATE', updater: () => newState, datasourceId, clearStagedPreview: false, }); }, - [props.dispatch] + [dispatch] ); const updateAll = useMemo( () => (datasourceId: string, newDatasourceState: unknown, newVisualizationState: unknown) => { - props.dispatch({ + dispatch({ type: 'UPDATE_STATE', subType: 'UPDATE_ALL_STATES', updater: (prevState) => { @@ -83,7 +83,7 @@ function LayerPanels( }, }); }, - [props.dispatch] + [dispatch] ); const layerIds = activeVisualization.getLayerIds(visualizationState); diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/data_panel_wrapper.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/data_panel_wrapper.tsx index 0f74abe97c418..5a92f7b5ed524 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/data_panel_wrapper.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/data_panel_wrapper.tsx @@ -27,16 +27,17 @@ interface DataPanelWrapperProps { } export const DataPanelWrapper = memo((props: DataPanelWrapperProps) => { + const { dispatch, activeDatasource } = props; const setDatasourceState: StateSetter = useMemo( () => (updater) => { - props.dispatch({ + dispatch({ type: 'UPDATE_DATASOURCE_STATE', updater, - datasourceId: props.activeDatasource!, + datasourceId: activeDatasource!, clearStagedPreview: true, }); }, - [props.dispatch, props.activeDatasource] + [dispatch, activeDatasource] ); const datasourceProps: DatasourceDataPanelProps = { diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx index bcceb1222ce03..48a3511a8f359 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.tsx @@ -62,34 +62,38 @@ export function EditorFrame(props: EditorFrameProps) { ); // Initialize current datasource and all active datasources - useEffect(() => { - // prevents executing dispatch on unmounted component - let isUnmounted = false; - if (!allLoaded) { - Object.entries(props.datasourceMap).forEach(([datasourceId, datasource]) => { - if ( - state.datasourceStates[datasourceId] && - state.datasourceStates[datasourceId].isLoading - ) { - datasource - .initialize(state.datasourceStates[datasourceId].state || undefined) - .then((datasourceState) => { - if (!isUnmounted) { - dispatch({ - type: 'UPDATE_DATASOURCE_STATE', - updater: datasourceState, - datasourceId, - }); - } - }) - .catch(onError); - } - }); - } - return () => { - isUnmounted = true; - }; - }, [allLoaded]); + useEffect( + () => { + // prevents executing dispatch on unmounted component + let isUnmounted = false; + if (!allLoaded) { + Object.entries(props.datasourceMap).forEach(([datasourceId, datasource]) => { + if ( + state.datasourceStates[datasourceId] && + state.datasourceStates[datasourceId].isLoading + ) { + datasource + .initialize(state.datasourceStates[datasourceId].state || undefined) + .then((datasourceState) => { + if (!isUnmounted) { + dispatch({ + type: 'UPDATE_DATASOURCE_STATE', + updater: datasourceState, + datasourceId, + }); + } + }) + .catch(onError); + } + }); + } + return () => { + isUnmounted = true; + }; + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [allLoaded, onError] + ); const datasourceLayers: Record = {}; Object.keys(props.datasourceMap) @@ -156,83 +160,95 @@ export function EditorFrame(props: EditorFrameProps) { }, }; - useEffect(() => { - if (props.doc) { - dispatch({ - type: 'VISUALIZATION_LOADED', - doc: props.doc, - }); - } else { - dispatch({ - type: 'RESET', - state: getInitialState(props), - }); - } - }, [props.doc]); + useEffect( + () => { + if (props.doc) { + dispatch({ + type: 'VISUALIZATION_LOADED', + doc: props.doc, + }); + } else { + dispatch({ + type: 'RESET', + state: getInitialState(props), + }); + } + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [props.doc] + ); // Initialize visualization as soon as all datasources are ready - useEffect(() => { - if (allLoaded && state.visualization.state === null && activeVisualization) { - const initialVisualizationState = activeVisualization.initialize(framePublicAPI); - dispatch({ - type: 'UPDATE_VISUALIZATION_STATE', - visualizationId: activeVisualization.id, - newState: initialVisualizationState, - }); - } - }, [allLoaded, activeVisualization, state.visualization.state]); + useEffect( + () => { + if (allLoaded && state.visualization.state === null && activeVisualization) { + const initialVisualizationState = activeVisualization.initialize(framePublicAPI); + dispatch({ + type: 'UPDATE_VISUALIZATION_STATE', + visualizationId: activeVisualization.id, + newState: initialVisualizationState, + }); + } + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [allLoaded, activeVisualization, state.visualization.state] + ); // The frame needs to call onChange every time its internal state changes - useEffect(() => { - const activeDatasource = - state.activeDatasourceId && !state.datasourceStates[state.activeDatasourceId].isLoading - ? props.datasourceMap[state.activeDatasourceId] - : undefined; + useEffect( + () => { + const activeDatasource = + state.activeDatasourceId && !state.datasourceStates[state.activeDatasourceId].isLoading + ? props.datasourceMap[state.activeDatasourceId] + : undefined; - if (!activeDatasource || !activeVisualization) { - return; - } + if (!activeDatasource || !activeVisualization) { + return; + } - const indexPatterns: DatasourceMetaData['filterableIndexPatterns'] = []; - Object.entries(props.datasourceMap) - .filter(([id, datasource]) => { - const stateWrapper = state.datasourceStates[id]; - return ( - stateWrapper && - !stateWrapper.isLoading && - datasource.getLayers(stateWrapper.state).length > 0 - ); - }) - .forEach(([id, datasource]) => { - indexPatterns.push( - ...datasource.getMetaData(state.datasourceStates[id].state).filterableIndexPatterns - ); - }); + const indexPatterns: DatasourceMetaData['filterableIndexPatterns'] = []; + Object.entries(props.datasourceMap) + .filter(([id, datasource]) => { + const stateWrapper = state.datasourceStates[id]; + return ( + stateWrapper && + !stateWrapper.isLoading && + datasource.getLayers(stateWrapper.state).length > 0 + ); + }) + .forEach(([id, datasource]) => { + indexPatterns.push( + ...datasource.getMetaData(state.datasourceStates[id].state).filterableIndexPatterns + ); + }); - const doc = getSavedObjectFormat({ - activeDatasources: Object.keys(state.datasourceStates).reduce( - (datasourceMap, datasourceId) => ({ - ...datasourceMap, - [datasourceId]: props.datasourceMap[datasourceId], - }), - {} - ), - visualization: activeVisualization, - state, - framePublicAPI, - }); + const doc = getSavedObjectFormat({ + activeDatasources: Object.keys(state.datasourceStates).reduce( + (datasourceMap, datasourceId) => ({ + ...datasourceMap, + [datasourceId]: props.datasourceMap[datasourceId], + }), + {} + ), + visualization: activeVisualization, + state, + framePublicAPI, + }); - props.onChange({ filterableIndexPatterns: indexPatterns, doc }); - }, [ - activeVisualization, - state.datasourceStates, - state.visualization, - props.query, - props.dateRange, - props.filters, - props.savedQuery, - state.title, - ]); + props.onChange({ filterableIndexPatterns: indexPatterns, doc }); + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [ + activeVisualization, + state.datasourceStates, + state.visualization, + props.query, + props.dateRange, + props.filters, + props.savedQuery, + state.title, + ] + ); return ( diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx index 7efaecb125c8e..aba8b70945129 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx @@ -205,6 +205,7 @@ export function SuggestionPanel({ return { suggestions: newSuggestions, currentStateExpression: newStateExpression }; }, [ + frame, currentDatasourceStates, currentVisualizationState, currentVisualizationId, @@ -217,7 +218,7 @@ export function SuggestionPanel({ return (props: ReactExpressionRendererProps) => ( ); - }, [plugins.data.query.timefilter.timefilter.getAutoRefreshFetch$, ExpressionRendererComponent]); + }, [plugins.data.query.timefilter.timefilter]); const [lastSelectedSuggestion, setLastSelectedSuggestion] = useState(-1); @@ -228,6 +229,7 @@ export function SuggestionPanel({ if (!stagedPreview && lastSelectedSuggestion !== -1) { setLastSelectedSuggestion(-1); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [stagedPreview]); if (!activeDatasourceId) { diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.tsx index a0d803d05d98b..88b791a7875ef 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.tsx @@ -188,6 +188,7 @@ export function ChartSwitch(props: Props) { ...visualizationType, selection: getSelection(visualizationType.visualizationId, visualizationType.id), })), + // eslint-disable-next-line react-hooks/exhaustive-deps [ flyoutOpen, props.visualizationMap, diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx index 9f5b6665b31d3..b3a12271f377b 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx @@ -85,29 +85,33 @@ export function InnerWorkspacePanel({ const dragDropContext = useContext(DragContext); - const suggestionForDraggedField = useMemo(() => { - if (!dragDropContext.dragging || !activeDatasourceId) { - return; - } + const suggestionForDraggedField = useMemo( + () => { + if (!dragDropContext.dragging || !activeDatasourceId) { + return; + } - const hasData = Object.values(framePublicAPI.datasourceLayers).some( - (datasource) => datasource.getTableSpec().length > 0 - ); + const hasData = Object.values(framePublicAPI.datasourceLayers).some( + (datasource) => datasource.getTableSpec().length > 0 + ); - const suggestions = getSuggestions({ - datasourceMap: { [activeDatasourceId]: datasourceMap[activeDatasourceId] }, - datasourceStates, - visualizationMap: - hasData && activeVisualizationId - ? { [activeVisualizationId]: visualizationMap[activeVisualizationId] } - : visualizationMap, - activeVisualizationId, - visualizationState, - field: dragDropContext.dragging, - }); + const suggestions = getSuggestions({ + datasourceMap: { [activeDatasourceId]: datasourceMap[activeDatasourceId] }, + datasourceStates, + visualizationMap: + hasData && activeVisualizationId + ? { [activeVisualizationId]: visualizationMap[activeVisualizationId] } + : visualizationMap, + activeVisualizationId, + visualizationState, + field: dragDropContext.dragging, + }); - return suggestions.find((s) => s.visualizationId === activeVisualizationId) || suggestions[0]; - }, [dragDropContext.dragging]); + return suggestions.find((s) => s.visualizationId === activeVisualizationId) || suggestions[0]; + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [dragDropContext.dragging] + ); const [localState, setLocalState] = useState({ expressionBuildError: undefined as string | undefined, @@ -117,28 +121,32 @@ export function InnerWorkspacePanel({ const activeVisualization = activeVisualizationId ? visualizationMap[activeVisualizationId] : null; - const expression = useMemo(() => { - try { - return buildExpression({ - visualization: activeVisualization, - visualizationState, - datasourceMap, - datasourceStates, - framePublicAPI, - }); - } catch (e) { - // Most likely an error in the expression provided by a datasource or visualization - setLocalState((s) => ({ ...s, expressionBuildError: e.toString() })); - } - }, [ - activeVisualization, - visualizationState, - datasourceMap, - datasourceStates, - framePublicAPI.dateRange, - framePublicAPI.query, - framePublicAPI.filters, - ]); + const expression = useMemo( + () => { + try { + return buildExpression({ + visualization: activeVisualization, + visualizationState, + datasourceMap, + datasourceStates, + framePublicAPI, + }); + } catch (e) { + // Most likely an error in the expression provided by a datasource or visualization + setLocalState((s) => ({ ...s, expressionBuildError: e.toString() })); + } + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [ + activeVisualization, + visualizationState, + datasourceMap, + datasourceStates, + framePublicAPI.dateRange, + framePublicAPI.query, + framePublicAPI.filters, + ] + ); const onEvent = useCallback( (event: ExpressionRendererEvent) => { @@ -162,7 +170,7 @@ export function InnerWorkspacePanel({ const autoRefreshFetch$ = useMemo( () => plugins.data.query.timefilter.timefilter.getAutoRefreshFetch$(), - [plugins.data.query.timefilter.timefilter.getAutoRefreshFetch$] + [plugins.data.query.timefilter.timefilter] ); useEffect(() => { @@ -173,7 +181,7 @@ export function InnerWorkspacePanel({ expressionBuildError: undefined, })); } - }, [expression]); + }, [expression, localState.expressionBuildError]); function onDrop() { if (suggestionForDraggedField) { diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx index bb564214e4fab..bdcce52314634 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx @@ -409,7 +409,16 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({ filters, chartsThemeService: charts.theme, }), - [core, data, currentIndexPattern, dateRange, query, filters, localState.nameFilter] + [ + core, + data, + currentIndexPattern, + dateRange, + query, + filters, + localState.nameFilter, + charts.theme, + ] ); return ( diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.tsx index b8f868a8694dd..4c85a55ad6011 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/field_select.tsx @@ -139,10 +139,10 @@ export function FieldSelect({ }, [ incompatibleSelectedOperationType, selectedColumnOperationType, - selectedColumnSourceField, - operationFieldSupportMatrix, currentIndexPattern, fieldMap, + operationByField, + existingFields, ]); return ( diff --git a/x-pack/plugins/lens/public/loader.tsx b/x-pack/plugins/lens/public/loader.tsx index ebbb006d837b0..f6e179e9a6aa6 100644 --- a/x-pack/plugins/lens/public/loader.tsx +++ b/x-pack/plugins/lens/public/loader.tsx @@ -16,28 +16,32 @@ export function Loader(props: { load: () => Promise; loadDeps: unknown[ const prevRequest = useRef | undefined>(undefined); const nextRequest = useRef<(() => void) | undefined>(undefined); - useEffect(function performLoad() { - if (prevRequest.current) { - nextRequest.current = performLoad; - return; - } + useEffect( + function performLoad() { + if (prevRequest.current) { + nextRequest.current = performLoad; + return; + } - setIsProcessing(true); - prevRequest.current = props - .load() - .catch(() => {}) - .then(() => { - const reload = nextRequest.current; - prevRequest.current = undefined; - nextRequest.current = undefined; + setIsProcessing(true); + prevRequest.current = props + .load() + .catch(() => {}) + .then(() => { + const reload = nextRequest.current; + prevRequest.current = undefined; + nextRequest.current = undefined; - if (reload) { - reload(); - } else { - setIsProcessing(false); - } - }); - }, props.loadDeps); + if (reload) { + reload(); + } else { + setIsProcessing(false); + } + }); + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + props.loadDeps + ); if (!isProcessing) { return null; diff --git a/x-pack/plugins/lens/public/xy_visualization/xy_config_panel.tsx b/x-pack/plugins/lens/public/xy_visualization/xy_config_panel.tsx index 59c4b393df467..6d5bc7808a678 100644 --- a/x-pack/plugins/lens/public/xy_visualization/xy_config_panel.tsx +++ b/x-pack/plugins/lens/public/xy_visualization/xy_config_panel.tsx @@ -379,7 +379,7 @@ const ColorPicker = ({ } setState(updateLayer(state, { ...layer, yConfig: newYConfigs }, index)); }, 256), - [state, layer, accessor, index] + [state, setState, layer, accessor, index] ); const colorPicker = ( diff --git a/x-pack/plugins/lens/public/xy_visualization/xy_expression.tsx b/x-pack/plugins/lens/public/xy_visualization/xy_expression.tsx index 871b626d62560..a3468e109e75b 100644 --- a/x-pack/plugins/lens/public/xy_visualization/xy_expression.tsx +++ b/x-pack/plugins/lens/public/xy_visualization/xy_expression.tsx @@ -180,7 +180,7 @@ export function XYChartReportable(props: XYChartRenderProps) { // reporting from printing a blank chart placeholder. useEffect(() => { setState({ isReady: true }); - }, []); + }, [setState]); return ( From 13fd9e39ea92a53169f2664c0bbfc2e98ebbcc6c Mon Sep 17 00:00:00 2001 From: Oliver Gupte Date: Thu, 6 Aug 2020 01:12:48 -0700 Subject: [PATCH 34/34] Observability Overview fix extra basepath prepend for alerting fetch (#74465) --- .../public/services/get_observability_alerts.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/x-pack/plugins/observability/public/services/get_observability_alerts.ts b/x-pack/plugins/observability/public/services/get_observability_alerts.ts index 602e4cf2bdd13..cff6726e47df9 100644 --- a/x-pack/plugins/observability/public/services/get_observability_alerts.ts +++ b/x-pack/plugins/observability/public/services/get_observability_alerts.ts @@ -11,15 +11,12 @@ const allowedConsumers = ['apm', 'uptime', 'logs', 'metrics', 'alerts']; export async function getObservabilityAlerts({ core }: { core: AppMountContext['core'] }) { try { - const { data = [] }: { data: Alert[] } = await core.http.get( - core.http.basePath.prepend('/api/alerts/_find'), - { - query: { - page: 1, - per_page: 20, - }, - } - ); + const { data = [] }: { data: Alert[] } = await core.http.get('/api/alerts/_find', { + query: { + page: 1, + per_page: 20, + }, + }); return data.filter(({ consumer }) => allowedConsumers.includes(consumer)); } catch (e) {