From f219863e094a5b89fe9b874b6d89edf7e8d8ffbf Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Tue, 17 Jul 2018 14:58:32 -0400 Subject: [PATCH] [Beats Management] [WIP] Create public resources for management plugin (#20864) * Init plugin public resources. * rename beats to beats_management * rendering react now --- x-pack/index.js | 2 +- x-pack/package.json | 2 + .../common/constants/configuration_blocks.ts | 0 .../common/constants/index.ts | 1 + .../common/constants/index_names.ts | 0 .../common/constants/plugin.ts | 2 +- .../common/domain_types.ts | 0 .../{beats => beats_management}/index.ts | 10 +- .../plugins/beats_management/public/index.tsx | 22 +++ .../framework/kibana_framework_adapter.ts | 149 ++++++++++++++++++ .../public/lib/compose/kibana.ts | 29 ++++ .../beats_management/public/lib/lib.ts | 62 ++++++++ .../beats_management/public/pages/404.tsx | 13 ++ .../beats_management/public/pages/home.tsx | 13 ++ .../beats_management/public/routes.tsx | 22 +++ .../{beats => beats_management}/readme.md | 0 .../server/kibana.index.ts | 0 .../lib/adapters/beats/adapter_types.ts | 0 .../beats/elasticsearch_beats_adapter.ts | 0 .../adapters/beats/memory_beats_adapter.ts | 0 .../database/__tests__/kibana.test.ts | 0 .../database/__tests__/test_contract.ts | 0 .../lib/adapters/database/adapter_types.ts | 0 .../database/kibana_database_adapter.ts | 0 .../framework/__tests__/kibana.test.ts | 2 +- .../framework/__tests__/test_contract.ts | 0 .../lib/adapters/framework/adapter_types.ts | 0 .../framework/kibana_framework_adapter.ts | 0 .../framework/testing_framework_adapter.ts | 0 .../server/lib/adapters/tags/adapter_types.ts | 0 .../tags/elasticsearch_tags_adapter.ts | 2 +- .../lib/adapters/tags/memory_tags_adapter.ts | 0 .../lib/adapters/tokens/adapter_types.ts | 0 .../tokens/elasticsearch_tokens_adapter.ts | 0 .../adapters/tokens/memory_tokens_adapter.ts | 0 .../server/lib/compose/kibana.ts | 0 .../__tests__/beats/assign_tags.test.ts | 0 .../domains/__tests__/beats/enroll.test.ts | 0 .../lib/domains/__tests__/tokens.test.ts | 0 .../server/lib/domains/beats.ts | 2 +- .../server/lib/domains/tags.ts | 2 +- .../server/lib/domains/tokens.ts | 2 +- .../server/lib/lib.ts | 0 .../server/management_server.ts | 0 .../server/rest_api/beats/configuration.ts | 0 .../server/rest_api/beats/enroll.ts | 2 +- .../server/rest_api/beats/list.ts | 0 .../server/rest_api/beats/tag_assignment.ts | 0 .../server/rest_api/beats/tag_removal.ts | 0 .../server/rest_api/beats/update.ts | 0 .../server/rest_api/tags/set.ts | 0 .../server/rest_api/tokens/create.ts | 0 .../server/utils/README.md | 0 .../server/utils/error_wrappers/index.ts | 0 .../error_wrappers/wrap_es_error.test.ts | 0 .../utils/error_wrappers/wrap_es_error.ts | 0 .../server/utils/find_non_existent_items.ts | 0 .../utils/index_templates/beats_template.json | 0 .../server/utils/index_templates/index.ts | 0 .../server/utils/polyfills.ts | 0 .../server/utils/wrap_request.ts | 0 .../{beats => beats_management}/tsconfig.json | 0 .../types/json.t.ts | 0 .../{beats => beats_management}/wallaby.js | 0 x-pack/plugins/index_management/index.js | 8 +- x-pack/yarn.lock | 29 ++++ 66 files changed, 361 insertions(+), 15 deletions(-) rename x-pack/plugins/{beats => beats_management}/common/constants/configuration_blocks.ts (100%) rename x-pack/plugins/{beats => beats_management}/common/constants/index.ts (87%) rename x-pack/plugins/{beats => beats_management}/common/constants/index_names.ts (100%) rename x-pack/plugins/{beats => beats_management}/common/constants/plugin.ts (91%) rename x-pack/plugins/{beats => beats_management}/common/domain_types.ts (100%) rename x-pack/plugins/{beats => beats_management}/index.ts (86%) create mode 100644 x-pack/plugins/beats_management/public/index.tsx create mode 100644 x-pack/plugins/beats_management/public/lib/adapters/framework/kibana_framework_adapter.ts create mode 100644 x-pack/plugins/beats_management/public/lib/compose/kibana.ts create mode 100644 x-pack/plugins/beats_management/public/lib/lib.ts create mode 100644 x-pack/plugins/beats_management/public/pages/404.tsx create mode 100644 x-pack/plugins/beats_management/public/pages/home.tsx create mode 100644 x-pack/plugins/beats_management/public/routes.tsx rename x-pack/plugins/{beats => beats_management}/readme.md (100%) rename x-pack/plugins/{beats => beats_management}/server/kibana.index.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/beats/adapter_types.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/beats/elasticsearch_beats_adapter.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/beats/memory_beats_adapter.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/database/__tests__/kibana.test.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/database/__tests__/test_contract.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/database/adapter_types.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/database/kibana_database_adapter.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/framework/__tests__/kibana.test.ts (98%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/framework/__tests__/test_contract.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/framework/adapter_types.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/framework/kibana_framework_adapter.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/framework/testing_framework_adapter.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/tags/adapter_types.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/tags/elasticsearch_tags_adapter.ts (96%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/tags/memory_tags_adapter.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/tokens/adapter_types.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/tokens/elasticsearch_tokens_adapter.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/adapters/tokens/memory_tokens_adapter.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/compose/kibana.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/domains/__tests__/beats/assign_tags.test.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/domains/__tests__/beats/enroll.test.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/domains/__tests__/tokens.test.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/lib/domains/beats.ts (98%) rename x-pack/plugins/{beats => beats_management}/server/lib/domains/tags.ts (98%) rename x-pack/plugins/{beats => beats_management}/server/lib/domains/tokens.ts (98%) rename x-pack/plugins/{beats => beats_management}/server/lib/lib.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/management_server.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/rest_api/beats/configuration.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/rest_api/beats/enroll.ts (97%) rename x-pack/plugins/{beats => beats_management}/server/rest_api/beats/list.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/rest_api/beats/tag_assignment.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/rest_api/beats/tag_removal.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/rest_api/beats/update.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/rest_api/tags/set.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/rest_api/tokens/create.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/utils/README.md (100%) rename x-pack/plugins/{beats => beats_management}/server/utils/error_wrappers/index.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/utils/error_wrappers/wrap_es_error.test.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/utils/error_wrappers/wrap_es_error.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/utils/find_non_existent_items.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/utils/index_templates/beats_template.json (100%) rename x-pack/plugins/{beats => beats_management}/server/utils/index_templates/index.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/utils/polyfills.ts (100%) rename x-pack/plugins/{beats => beats_management}/server/utils/wrap_request.ts (100%) rename x-pack/plugins/{beats => beats_management}/tsconfig.json (100%) rename x-pack/plugins/{beats => beats_management}/types/json.t.ts (100%) rename x-pack/plugins/{beats => beats_management}/wallaby.js (100%) diff --git a/x-pack/index.js b/x-pack/index.js index 749deb8fef237..5fdc5c2279d67 100644 --- a/x-pack/index.js +++ b/x-pack/index.js @@ -16,7 +16,7 @@ import { watcher } from './plugins/watcher'; import { grokdebugger } from './plugins/grokdebugger'; import { dashboardMode } from './plugins/dashboard_mode'; import { logstash } from './plugins/logstash'; -import { beats } from './plugins/beats'; +import { beats } from './plugins/beats_management'; import { apm } from './plugins/apm'; import { licenseManagement } from './plugins/license_management'; import { cloud } from './plugins/cloud'; diff --git a/x-pack/package.json b/x-pack/package.json index dbc75ab266ca6..dd3ec6de5ce2d 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -29,10 +29,12 @@ "@kbn/test": "link:../packages/kbn-test", "@types/boom": "^4.3.8", "@types/chance": "^1.0.1", + "@types/history": "^4.6.2", "@types/jest": "^22.2.3", "@types/joi": "^10.4.0", "@types/lodash": "^3.10.0", "@types/pngjs": "^3.3.0", + "@types/react-router-dom": "^4.2.7", "@types/sinon": "^5.0.1", "abab": "^1.0.4", "ansicolors": "0.3.2", diff --git a/x-pack/plugins/beats/common/constants/configuration_blocks.ts b/x-pack/plugins/beats_management/common/constants/configuration_blocks.ts similarity index 100% rename from x-pack/plugins/beats/common/constants/configuration_blocks.ts rename to x-pack/plugins/beats_management/common/constants/configuration_blocks.ts diff --git a/x-pack/plugins/beats/common/constants/index.ts b/x-pack/plugins/beats_management/common/constants/index.ts similarity index 87% rename from x-pack/plugins/beats/common/constants/index.ts rename to x-pack/plugins/beats_management/common/constants/index.ts index 756ffcf07e3ea..b4e919607c604 100644 --- a/x-pack/plugins/beats/common/constants/index.ts +++ b/x-pack/plugins/beats_management/common/constants/index.ts @@ -7,3 +7,4 @@ export { PLUGIN } from './plugin'; export { INDEX_NAMES } from './index_names'; export { UNIQUENESS_ENFORCING_TYPES, ConfigurationBlockTypes } from './configuration_blocks'; +export const BASE_PATH = '/management/beats_management/'; diff --git a/x-pack/plugins/beats/common/constants/index_names.ts b/x-pack/plugins/beats_management/common/constants/index_names.ts similarity index 100% rename from x-pack/plugins/beats/common/constants/index_names.ts rename to x-pack/plugins/beats_management/common/constants/index_names.ts diff --git a/x-pack/plugins/beats/common/constants/plugin.ts b/x-pack/plugins/beats_management/common/constants/plugin.ts similarity index 91% rename from x-pack/plugins/beats/common/constants/plugin.ts rename to x-pack/plugins/beats_management/common/constants/plugin.ts index ba12300075bf2..dc7cd85300341 100644 --- a/x-pack/plugins/beats/common/constants/plugin.ts +++ b/x-pack/plugins/beats_management/common/constants/plugin.ts @@ -5,5 +5,5 @@ */ export const PLUGIN = { - ID: 'beats', + ID: 'beats_management', }; diff --git a/x-pack/plugins/beats/common/domain_types.ts b/x-pack/plugins/beats_management/common/domain_types.ts similarity index 100% rename from x-pack/plugins/beats/common/domain_types.ts rename to x-pack/plugins/beats_management/common/domain_types.ts diff --git a/x-pack/plugins/beats/index.ts b/x-pack/plugins/beats_management/index.ts similarity index 86% rename from x-pack/plugins/beats/index.ts rename to x-pack/plugins/beats_management/index.ts index c62d1a6805225..e6677d6bbcd57 100644 --- a/x-pack/plugins/beats/index.ts +++ b/x-pack/plugins/beats_management/index.ts @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ import Joi from 'joi'; +import { resolve } from 'path'; import { PLUGIN } from './common/constants'; import { initServerWithKibana } from './server/kibana.index'; @@ -21,10 +22,15 @@ export const configPrefix = 'xpack.beats'; export function beats(kibana: any) { return new kibana.Plugin({ - config: () => config, - configPrefix, id: PLUGIN.ID, require: ['kibana', 'elasticsearch', 'xpack_main'], + publicDir: resolve(__dirname, 'public'), + uiExports: { + managementSections: ['plugins/beats_management'], + }, + config: () => config, + configPrefix, + init(server: any) { initServerWithKibana(server); }, diff --git a/x-pack/plugins/beats_management/public/index.tsx b/x-pack/plugins/beats_management/public/index.tsx new file mode 100644 index 0000000000000..1334deb1524e6 --- /dev/null +++ b/x-pack/plugins/beats_management/public/index.tsx @@ -0,0 +1,22 @@ +/* + * 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 { BASE_PATH } from '../common/constants'; +import { compose } from './lib/compose/kibana'; +// import * as euiVars from '@elastic/eui/dist/eui_theme_k6_light.json'; +// import { ThemeProvider } from 'styled-components'; +import { PageRouter } from './routes'; + +// TODO use theme provided from parentApp when kibana supports it +import '@elastic/eui/dist/eui_theme_light.css'; + +function startApp(libs: any) { + libs.framework.registerManagementSection('beats', 'Beats Management', BASE_PATH); + libs.framework.render(); +} + +startApp(compose()); diff --git a/x-pack/plugins/beats_management/public/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/plugins/beats_management/public/lib/adapters/framework/kibana_framework_adapter.ts new file mode 100644 index 0000000000000..042ebd71f9862 --- /dev/null +++ b/x-pack/plugins/beats_management/public/lib/adapters/framework/kibana_framework_adapter.ts @@ -0,0 +1,149 @@ +/* + * 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 { IModule, IScope } from 'angular'; +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; + +import { + BufferedKibanaServiceCall, + FrameworkAdapter, + KibanaAdapterServiceRefs, + KibanaUIConfig, +} from '../../lib'; + +export class KibanaFrameworkAdapter implements FrameworkAdapter { + public appState: object; + public kbnVersion?: string; + + private management: any; + private adapterService: KibanaAdapterServiceProvider; + private rootComponent: React.ReactElement | null = null; + private uiModule: IModule; + private routes: any; + + constructor(uiModule: IModule, management: any, routes: any) { + this.adapterService = new KibanaAdapterServiceProvider(); + this.management = management; + this.uiModule = uiModule; + this.routes = routes; + this.appState = {}; + } + + public setUISettings = (key: string, value: any) => { + this.adapterService.callOrBuffer(({ config }) => { + config.set(key, value); + }); + }; + + public render = (component: React.ReactElement) => { + this.rootComponent = component; + }; + + public registerManagementSection(pluginId: string, displayName: string, basePath: string) { + const registerSection = () => + this.management.register(pluginId, { + display: displayName, + order: 30, + }); + const getSection = () => this.management.getSection(pluginId); + + const section = this.management.hasItem(pluginId) ? getSection() : registerSection(); + + section.register(pluginId, { + visible: true, + display: displayName, + order: 30, + url: `#${basePath}`, + }); + + this.register(this.uiModule); + } + + private manageAngularLifecycle($scope: any, $route: any, elem: any) { + const lastRoute = $route.current; + const deregister = $scope.$on('$locationChangeSuccess', () => { + const currentRoute = $route.current; + // if templates are the same we are on the same route + if (lastRoute.$$route.template === currentRoute.$$route.template) { + // this prevents angular from destroying scope + $route.current = lastRoute; + } + }); + $scope.$on('$destroy', () => { + if (deregister) { + deregister(); + } + // manually unmount component when scope is destroyed + if (elem) { + ReactDOM.unmountComponentAtNode(elem); + } + }); + } + + private register = (adapterModule: IModule) => { + const adapter = this; + this.routes.when(`/management/beats_management/?`, { + template: '
', + controllerAs: 'beatsManagement', + // tslint:disable-next-line: max-classes-per-file + controller: class BeatsManagementController { + constructor($scope: any, $route: any) { + $scope.$$postDigest(() => { + const elem = document.getElementById('beatsReactRoot'); + ReactDOM.render(adapter.rootComponent as React.ReactElement, elem); + adapter.manageAngularLifecycle($scope, $route, elem); + }); + $scope.$onInit = () => { + $scope.topNavMenu = []; + }; + } + }, + }); + }; +} + +// tslint:disable-next-line: max-classes-per-file +class KibanaAdapterServiceProvider { + public serviceRefs: KibanaAdapterServiceRefs | null = null; + public bufferedCalls: Array> = []; + + public $get($rootScope: IScope, config: KibanaUIConfig) { + this.serviceRefs = { + config, + rootScope: $rootScope, + }; + + this.applyBufferedCalls(this.bufferedCalls); + + return this; + } + + public callOrBuffer(serviceCall: (serviceRefs: KibanaAdapterServiceRefs) => void) { + if (this.serviceRefs !== null) { + this.applyBufferedCalls([serviceCall]); + } else { + this.bufferedCalls.push(serviceCall); + } + } + + public applyBufferedCalls( + bufferedCalls: Array> + ) { + if (!this.serviceRefs) { + return; + } + + this.serviceRefs.rootScope.$apply(() => { + bufferedCalls.forEach(serviceCall => { + if (!this.serviceRefs) { + return; + } + return serviceCall(this.serviceRefs); + }); + }); + } +} diff --git a/x-pack/plugins/beats_management/public/lib/compose/kibana.ts b/x-pack/plugins/beats_management/public/lib/compose/kibana.ts new file mode 100644 index 0000000000000..7a98e62c18459 --- /dev/null +++ b/x-pack/plugins/beats_management/public/lib/compose/kibana.ts @@ -0,0 +1,29 @@ +/* + * 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 'ui/autoload/all'; +// @ts-ignore: path dynamic for kibana +import { management } from 'ui/management'; +// @ts-ignore: path dynamic for kibana +import { uiModules } from 'ui/modules'; +// @ts-ignore: path dynamic for kibana +import routes from 'ui/routes'; +// @ts-ignore: path dynamic for kibana +import { KibanaFrameworkAdapter } from '../adapters/framework/kibana_framework_adapter'; +import { FrontendLibs } from '../lib'; + +export function compose(): FrontendLibs { + // const kbnVersion = (window as any).__KBN__.version; + + const pluginUIModule = uiModules.get('app/beats_management'); + + const framework = new KibanaFrameworkAdapter(pluginUIModule, management, routes); + + const libs: FrontendLibs = { + framework, + }; + return libs; +} diff --git a/x-pack/plugins/beats_management/public/lib/lib.ts b/x-pack/plugins/beats_management/public/lib/lib.ts new file mode 100644 index 0000000000000..085efc3e53201 --- /dev/null +++ b/x-pack/plugins/beats_management/public/lib/lib.ts @@ -0,0 +1,62 @@ +/* + * 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 { IModule, IScope } from 'angular'; +import { AxiosRequestConfig } from 'axios'; +import React from 'react'; + +export interface FrontendLibs { + framework: FrameworkAdapter; + // api: ApiAdapter; +} + +export interface FrameworkAdapter { + // Insstance vars + appState?: object; + kbnVersion?: string; + registerManagementSection(pluginId: string, displayName: string, basePath: string): void; + + // Methods + setUISettings(key: string, value: any): void; + render(component: React.ReactElement): void; +} + +export interface FramworkAdapterConstructable { + new (uiModule: IModule): FrameworkAdapter; +} + +// TODO: replace AxiosRequestConfig with something more defined +export type RequestConfig = AxiosRequestConfig; + +export interface ApiAdapter { + kbnVersion: string; + + get(url: string, config?: RequestConfig | undefined): Promise; + post(url: string, data?: any, config?: AxiosRequestConfig | undefined): Promise; + delete(url: string, config?: RequestConfig | undefined): Promise; + put(url: string, data?: any, config?: RequestConfig | undefined): Promise; +} + +export interface UiKibanaAdapterScope extends IScope { + breadcrumbs: any[]; + topNavMenu: any[]; +} + +export interface KibanaUIConfig { + get(key: string): any; + set(key: string, value: any): Promise; +} + +export interface KibanaAdapterServiceRefs { + config: KibanaUIConfig; + rootScope: IScope; +} + +export type BufferedKibanaServiceCall = (serviceRefs: ServiceRefs) => void; + +export interface Chrome { + setRootTemplate(template: string): void; +} diff --git a/x-pack/plugins/beats_management/public/pages/404.tsx b/x-pack/plugins/beats_management/public/pages/404.tsx new file mode 100644 index 0000000000000..956bf90e84927 --- /dev/null +++ b/x-pack/plugins/beats_management/public/pages/404.tsx @@ -0,0 +1,13 @@ +/* + * 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'; + +export class NotFoundPage extends React.PureComponent { + public render() { + return
No content found
; + } +} diff --git a/x-pack/plugins/beats_management/public/pages/home.tsx b/x-pack/plugins/beats_management/public/pages/home.tsx new file mode 100644 index 0000000000000..505015f18af16 --- /dev/null +++ b/x-pack/plugins/beats_management/public/pages/home.tsx @@ -0,0 +1,13 @@ +/* + * 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'; + +export class HomePage extends React.PureComponent { + public render() { + return
Home
; + } +} diff --git a/x-pack/plugins/beats_management/public/routes.tsx b/x-pack/plugins/beats_management/public/routes.tsx new file mode 100644 index 0000000000000..f5863b28aaafa --- /dev/null +++ b/x-pack/plugins/beats_management/public/routes.tsx @@ -0,0 +1,22 @@ +/* + * 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 { HashRouter, Route, Switch } from 'react-router-dom'; + +import { NotFoundPage } from './pages/404'; +import { HomePage } from './pages/home'; + +export const PageRouter: React.SFC<{}> = () => { + return ( + + + + + + + ); +}; diff --git a/x-pack/plugins/beats/readme.md b/x-pack/plugins/beats_management/readme.md similarity index 100% rename from x-pack/plugins/beats/readme.md rename to x-pack/plugins/beats_management/readme.md diff --git a/x-pack/plugins/beats/server/kibana.index.ts b/x-pack/plugins/beats_management/server/kibana.index.ts similarity index 100% rename from x-pack/plugins/beats/server/kibana.index.ts rename to x-pack/plugins/beats_management/server/kibana.index.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/beats/adapter_types.ts b/x-pack/plugins/beats_management/server/lib/adapters/beats/adapter_types.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/beats/adapter_types.ts rename to x-pack/plugins/beats_management/server/lib/adapters/beats/adapter_types.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/beats/elasticsearch_beats_adapter.ts b/x-pack/plugins/beats_management/server/lib/adapters/beats/elasticsearch_beats_adapter.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/beats/elasticsearch_beats_adapter.ts rename to x-pack/plugins/beats_management/server/lib/adapters/beats/elasticsearch_beats_adapter.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/beats/memory_beats_adapter.ts b/x-pack/plugins/beats_management/server/lib/adapters/beats/memory_beats_adapter.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/beats/memory_beats_adapter.ts rename to x-pack/plugins/beats_management/server/lib/adapters/beats/memory_beats_adapter.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/database/__tests__/kibana.test.ts b/x-pack/plugins/beats_management/server/lib/adapters/database/__tests__/kibana.test.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/database/__tests__/kibana.test.ts rename to x-pack/plugins/beats_management/server/lib/adapters/database/__tests__/kibana.test.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/database/__tests__/test_contract.ts b/x-pack/plugins/beats_management/server/lib/adapters/database/__tests__/test_contract.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/database/__tests__/test_contract.ts rename to x-pack/plugins/beats_management/server/lib/adapters/database/__tests__/test_contract.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/database/adapter_types.ts b/x-pack/plugins/beats_management/server/lib/adapters/database/adapter_types.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/database/adapter_types.ts rename to x-pack/plugins/beats_management/server/lib/adapters/database/adapter_types.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/database/kibana_database_adapter.ts b/x-pack/plugins/beats_management/server/lib/adapters/database/kibana_database_adapter.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/database/kibana_database_adapter.ts rename to x-pack/plugins/beats_management/server/lib/adapters/database/kibana_database_adapter.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/framework/__tests__/kibana.test.ts b/x-pack/plugins/beats_management/server/lib/adapters/framework/__tests__/kibana.test.ts similarity index 98% rename from x-pack/plugins/beats/server/lib/adapters/framework/__tests__/kibana.test.ts rename to x-pack/plugins/beats_management/server/lib/adapters/framework/__tests__/kibana.test.ts index 74063e6316ceb..5a539ebe6e5e7 100644 --- a/x-pack/plugins/beats/server/lib/adapters/framework/__tests__/kibana.test.ts +++ b/x-pack/plugins/beats_management/server/lib/adapters/framework/__tests__/kibana.test.ts @@ -7,9 +7,9 @@ // @ts-ignore import { createEsTestCluster } from '@kbn/test'; +import { config as beatsPluginConfig, configPrefix } from '../../../../..'; // @ts-ignore import * as kbnTestServer from '../../../../../../../../src/test_utils/kbn_server'; -import { config as beatsPluginConfig, configPrefix } from '../../../../../index'; import { KibanaBackendFrameworkAdapter } from '../kibana_framework_adapter'; import { contractTests } from './test_contract'; diff --git a/x-pack/plugins/beats/server/lib/adapters/framework/__tests__/test_contract.ts b/x-pack/plugins/beats_management/server/lib/adapters/framework/__tests__/test_contract.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/framework/__tests__/test_contract.ts rename to x-pack/plugins/beats_management/server/lib/adapters/framework/__tests__/test_contract.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/framework/adapter_types.ts b/x-pack/plugins/beats_management/server/lib/adapters/framework/adapter_types.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/framework/adapter_types.ts rename to x-pack/plugins/beats_management/server/lib/adapters/framework/adapter_types.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/plugins/beats_management/server/lib/adapters/framework/kibana_framework_adapter.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/framework/kibana_framework_adapter.ts rename to x-pack/plugins/beats_management/server/lib/adapters/framework/kibana_framework_adapter.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/framework/testing_framework_adapter.ts b/x-pack/plugins/beats_management/server/lib/adapters/framework/testing_framework_adapter.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/framework/testing_framework_adapter.ts rename to x-pack/plugins/beats_management/server/lib/adapters/framework/testing_framework_adapter.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/tags/adapter_types.ts b/x-pack/plugins/beats_management/server/lib/adapters/tags/adapter_types.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/tags/adapter_types.ts rename to x-pack/plugins/beats_management/server/lib/adapters/tags/adapter_types.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/tags/elasticsearch_tags_adapter.ts b/x-pack/plugins/beats_management/server/lib/adapters/tags/elasticsearch_tags_adapter.ts similarity index 96% rename from x-pack/plugins/beats/server/lib/adapters/tags/elasticsearch_tags_adapter.ts rename to x-pack/plugins/beats_management/server/lib/adapters/tags/elasticsearch_tags_adapter.ts index 3f982f5edbb09..2c2c988189283 100644 --- a/x-pack/plugins/beats/server/lib/adapters/tags/elasticsearch_tags_adapter.ts +++ b/x-pack/plugins/beats_management/server/lib/adapters/tags/elasticsearch_tags_adapter.ts @@ -6,7 +6,7 @@ import { get } from 'lodash'; import { INDEX_NAMES } from '../../../../common/constants'; -import { FrameworkUser } from './../framework/adapter_types'; +import { FrameworkUser } from '../framework/adapter_types'; import { BeatTag } from '../../../../common/domain_types'; import { DatabaseAdapter } from '../database/adapter_types'; diff --git a/x-pack/plugins/beats/server/lib/adapters/tags/memory_tags_adapter.ts b/x-pack/plugins/beats_management/server/lib/adapters/tags/memory_tags_adapter.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/tags/memory_tags_adapter.ts rename to x-pack/plugins/beats_management/server/lib/adapters/tags/memory_tags_adapter.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/tokens/adapter_types.ts b/x-pack/plugins/beats_management/server/lib/adapters/tokens/adapter_types.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/tokens/adapter_types.ts rename to x-pack/plugins/beats_management/server/lib/adapters/tokens/adapter_types.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/tokens/elasticsearch_tokens_adapter.ts b/x-pack/plugins/beats_management/server/lib/adapters/tokens/elasticsearch_tokens_adapter.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/tokens/elasticsearch_tokens_adapter.ts rename to x-pack/plugins/beats_management/server/lib/adapters/tokens/elasticsearch_tokens_adapter.ts diff --git a/x-pack/plugins/beats/server/lib/adapters/tokens/memory_tokens_adapter.ts b/x-pack/plugins/beats_management/server/lib/adapters/tokens/memory_tokens_adapter.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/adapters/tokens/memory_tokens_adapter.ts rename to x-pack/plugins/beats_management/server/lib/adapters/tokens/memory_tokens_adapter.ts diff --git a/x-pack/plugins/beats/server/lib/compose/kibana.ts b/x-pack/plugins/beats_management/server/lib/compose/kibana.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/compose/kibana.ts rename to x-pack/plugins/beats_management/server/lib/compose/kibana.ts diff --git a/x-pack/plugins/beats/server/lib/domains/__tests__/beats/assign_tags.test.ts b/x-pack/plugins/beats_management/server/lib/domains/__tests__/beats/assign_tags.test.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/domains/__tests__/beats/assign_tags.test.ts rename to x-pack/plugins/beats_management/server/lib/domains/__tests__/beats/assign_tags.test.ts diff --git a/x-pack/plugins/beats/server/lib/domains/__tests__/beats/enroll.test.ts b/x-pack/plugins/beats_management/server/lib/domains/__tests__/beats/enroll.test.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/domains/__tests__/beats/enroll.test.ts rename to x-pack/plugins/beats_management/server/lib/domains/__tests__/beats/enroll.test.ts diff --git a/x-pack/plugins/beats/server/lib/domains/__tests__/tokens.test.ts b/x-pack/plugins/beats_management/server/lib/domains/__tests__/tokens.test.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/domains/__tests__/tokens.test.ts rename to x-pack/plugins/beats_management/server/lib/domains/__tests__/tokens.test.ts diff --git a/x-pack/plugins/beats/server/lib/domains/beats.ts b/x-pack/plugins/beats_management/server/lib/domains/beats.ts similarity index 98% rename from x-pack/plugins/beats/server/lib/domains/beats.ts rename to x-pack/plugins/beats_management/server/lib/domains/beats.ts index 07a084e54b53d..618de8ab0b446 100644 --- a/x-pack/plugins/beats/server/lib/domains/beats.ts +++ b/x-pack/plugins/beats_management/server/lib/domains/beats.ts @@ -13,8 +13,8 @@ import { BeatsTagAssignment, CMBeatsAdapter } from '../adapters/beats/adapter_ty import { FrameworkUser } from '../adapters/framework/adapter_types'; import { CMAssignmentReturn } from '../adapters/beats/adapter_types'; +import { BeatsRemovalReturn } from '../adapters/beats/adapter_types'; import { BeatEnrollmentStatus, CMDomainLibs } from '../lib'; -import { BeatsRemovalReturn } from './../adapters/beats/adapter_types'; export class CMBeatsDomain { private adapter: CMBeatsAdapter; diff --git a/x-pack/plugins/beats/server/lib/domains/tags.ts b/x-pack/plugins/beats_management/server/lib/domains/tags.ts similarity index 98% rename from x-pack/plugins/beats/server/lib/domains/tags.ts rename to x-pack/plugins/beats_management/server/lib/domains/tags.ts index b6ce9f7e14821..36cf9a5e6d7f0 100644 --- a/x-pack/plugins/beats/server/lib/domains/tags.ts +++ b/x-pack/plugins/beats_management/server/lib/domains/tags.ts @@ -9,8 +9,8 @@ import { UNIQUENESS_ENFORCING_TYPES } from '../../../common/constants'; import { ConfigurationBlock } from '../../../common/domain_types'; import { FrameworkUser } from '../adapters/framework/adapter_types'; +import { entries } from '../../utils/polyfills'; import { CMTagsAdapter } from '../adapters/tags/adapter_types'; -import { entries } from './../../utils/polyfills'; export class CMTagsDomain { private adapter: CMTagsAdapter; diff --git a/x-pack/plugins/beats/server/lib/domains/tokens.ts b/x-pack/plugins/beats_management/server/lib/domains/tokens.ts similarity index 98% rename from x-pack/plugins/beats/server/lib/domains/tokens.ts rename to x-pack/plugins/beats_management/server/lib/domains/tokens.ts index dc7ffa9a63356..529a526bea75d 100644 --- a/x-pack/plugins/beats/server/lib/domains/tokens.ts +++ b/x-pack/plugins/beats_management/server/lib/domains/tokens.ts @@ -8,8 +8,8 @@ import { sign as signToken, verify as verifyToken } from 'jsonwebtoken'; import moment from 'moment'; import uuid from 'uuid'; import { BackendFrameworkAdapter } from '../adapters/framework/adapter_types'; +import { FrameworkUser } from '../adapters/framework/adapter_types'; import { CMTokensAdapter } from '../adapters/tokens/adapter_types'; -import { FrameworkUser } from './../adapters/framework/adapter_types'; const RANDOM_TOKEN_1 = 'b48c4bda384a40cb91c6eb9b8849e77f'; const RANDOM_TOKEN_2 = '80a3819e3cd64f4399f1d4886be7a08b'; diff --git a/x-pack/plugins/beats/server/lib/lib.ts b/x-pack/plugins/beats_management/server/lib/lib.ts similarity index 100% rename from x-pack/plugins/beats/server/lib/lib.ts rename to x-pack/plugins/beats_management/server/lib/lib.ts diff --git a/x-pack/plugins/beats/server/management_server.ts b/x-pack/plugins/beats_management/server/management_server.ts similarity index 100% rename from x-pack/plugins/beats/server/management_server.ts rename to x-pack/plugins/beats_management/server/management_server.ts diff --git a/x-pack/plugins/beats/server/rest_api/beats/configuration.ts b/x-pack/plugins/beats_management/server/rest_api/beats/configuration.ts similarity index 100% rename from x-pack/plugins/beats/server/rest_api/beats/configuration.ts rename to x-pack/plugins/beats_management/server/rest_api/beats/configuration.ts diff --git a/x-pack/plugins/beats/server/rest_api/beats/enroll.ts b/x-pack/plugins/beats_management/server/rest_api/beats/enroll.ts similarity index 97% rename from x-pack/plugins/beats/server/rest_api/beats/enroll.ts rename to x-pack/plugins/beats_management/server/rest_api/beats/enroll.ts index c5b01fdbd4cc3..c0f0185fbde25 100644 --- a/x-pack/plugins/beats/server/rest_api/beats/enroll.ts +++ b/x-pack/plugins/beats_management/server/rest_api/beats/enroll.ts @@ -7,8 +7,8 @@ import Joi from 'joi'; import { omit } from 'lodash'; import { FrameworkRequest } from '../../lib/adapters/framework/adapter_types'; import { CMServerLibs } from '../../lib/lib'; +import { BeatEnrollmentStatus } from '../../lib/lib'; import { wrapEsError } from '../../utils/error_wrappers'; -import { BeatEnrollmentStatus } from './../../lib/lib'; // TODO: add license check pre-hook // TODO: write to Kibana audit log file diff --git a/x-pack/plugins/beats/server/rest_api/beats/list.ts b/x-pack/plugins/beats_management/server/rest_api/beats/list.ts similarity index 100% rename from x-pack/plugins/beats/server/rest_api/beats/list.ts rename to x-pack/plugins/beats_management/server/rest_api/beats/list.ts diff --git a/x-pack/plugins/beats/server/rest_api/beats/tag_assignment.ts b/x-pack/plugins/beats_management/server/rest_api/beats/tag_assignment.ts similarity index 100% rename from x-pack/plugins/beats/server/rest_api/beats/tag_assignment.ts rename to x-pack/plugins/beats_management/server/rest_api/beats/tag_assignment.ts diff --git a/x-pack/plugins/beats/server/rest_api/beats/tag_removal.ts b/x-pack/plugins/beats_management/server/rest_api/beats/tag_removal.ts similarity index 100% rename from x-pack/plugins/beats/server/rest_api/beats/tag_removal.ts rename to x-pack/plugins/beats_management/server/rest_api/beats/tag_removal.ts diff --git a/x-pack/plugins/beats/server/rest_api/beats/update.ts b/x-pack/plugins/beats_management/server/rest_api/beats/update.ts similarity index 100% rename from x-pack/plugins/beats/server/rest_api/beats/update.ts rename to x-pack/plugins/beats_management/server/rest_api/beats/update.ts diff --git a/x-pack/plugins/beats/server/rest_api/tags/set.ts b/x-pack/plugins/beats_management/server/rest_api/tags/set.ts similarity index 100% rename from x-pack/plugins/beats/server/rest_api/tags/set.ts rename to x-pack/plugins/beats_management/server/rest_api/tags/set.ts diff --git a/x-pack/plugins/beats/server/rest_api/tokens/create.ts b/x-pack/plugins/beats_management/server/rest_api/tokens/create.ts similarity index 100% rename from x-pack/plugins/beats/server/rest_api/tokens/create.ts rename to x-pack/plugins/beats_management/server/rest_api/tokens/create.ts diff --git a/x-pack/plugins/beats/server/utils/README.md b/x-pack/plugins/beats_management/server/utils/README.md similarity index 100% rename from x-pack/plugins/beats/server/utils/README.md rename to x-pack/plugins/beats_management/server/utils/README.md diff --git a/x-pack/plugins/beats/server/utils/error_wrappers/index.ts b/x-pack/plugins/beats_management/server/utils/error_wrappers/index.ts similarity index 100% rename from x-pack/plugins/beats/server/utils/error_wrappers/index.ts rename to x-pack/plugins/beats_management/server/utils/error_wrappers/index.ts diff --git a/x-pack/plugins/beats/server/utils/error_wrappers/wrap_es_error.test.ts b/x-pack/plugins/beats_management/server/utils/error_wrappers/wrap_es_error.test.ts similarity index 100% rename from x-pack/plugins/beats/server/utils/error_wrappers/wrap_es_error.test.ts rename to x-pack/plugins/beats_management/server/utils/error_wrappers/wrap_es_error.test.ts diff --git a/x-pack/plugins/beats/server/utils/error_wrappers/wrap_es_error.ts b/x-pack/plugins/beats_management/server/utils/error_wrappers/wrap_es_error.ts similarity index 100% rename from x-pack/plugins/beats/server/utils/error_wrappers/wrap_es_error.ts rename to x-pack/plugins/beats_management/server/utils/error_wrappers/wrap_es_error.ts diff --git a/x-pack/plugins/beats/server/utils/find_non_existent_items.ts b/x-pack/plugins/beats_management/server/utils/find_non_existent_items.ts similarity index 100% rename from x-pack/plugins/beats/server/utils/find_non_existent_items.ts rename to x-pack/plugins/beats_management/server/utils/find_non_existent_items.ts diff --git a/x-pack/plugins/beats/server/utils/index_templates/beats_template.json b/x-pack/plugins/beats_management/server/utils/index_templates/beats_template.json similarity index 100% rename from x-pack/plugins/beats/server/utils/index_templates/beats_template.json rename to x-pack/plugins/beats_management/server/utils/index_templates/beats_template.json diff --git a/x-pack/plugins/beats/server/utils/index_templates/index.ts b/x-pack/plugins/beats_management/server/utils/index_templates/index.ts similarity index 100% rename from x-pack/plugins/beats/server/utils/index_templates/index.ts rename to x-pack/plugins/beats_management/server/utils/index_templates/index.ts diff --git a/x-pack/plugins/beats/server/utils/polyfills.ts b/x-pack/plugins/beats_management/server/utils/polyfills.ts similarity index 100% rename from x-pack/plugins/beats/server/utils/polyfills.ts rename to x-pack/plugins/beats_management/server/utils/polyfills.ts diff --git a/x-pack/plugins/beats/server/utils/wrap_request.ts b/x-pack/plugins/beats_management/server/utils/wrap_request.ts similarity index 100% rename from x-pack/plugins/beats/server/utils/wrap_request.ts rename to x-pack/plugins/beats_management/server/utils/wrap_request.ts diff --git a/x-pack/plugins/beats/tsconfig.json b/x-pack/plugins/beats_management/tsconfig.json similarity index 100% rename from x-pack/plugins/beats/tsconfig.json rename to x-pack/plugins/beats_management/tsconfig.json diff --git a/x-pack/plugins/beats/types/json.t.ts b/x-pack/plugins/beats_management/types/json.t.ts similarity index 100% rename from x-pack/plugins/beats/types/json.t.ts rename to x-pack/plugins/beats_management/types/json.t.ts diff --git a/x-pack/plugins/beats/wallaby.js b/x-pack/plugins/beats_management/wallaby.js similarity index 100% rename from x-pack/plugins/beats/wallaby.js rename to x-pack/plugins/beats_management/wallaby.js diff --git a/x-pack/plugins/index_management/index.js b/x-pack/plugins/index_management/index.js index c3d3e8fe1caf5..9a78cfef48c13 100644 --- a/x-pack/plugins/index_management/index.js +++ b/x-pack/plugins/index_management/index.js @@ -12,15 +12,13 @@ import { registerStatsRoute } from './server/routes/api/stats'; import { registerLicenseChecker } from './server/lib/register_license_checker'; import { PLUGIN } from './common/constants'; -export function indexManagement(kibana) { +export function indexManagement(kibana) { return new kibana.Plugin({ id: PLUGIN.ID, publicDir: resolve(__dirname, 'public'), require: ['kibana', 'elasticsearch', 'xpack_main'], uiExports: { - managementSections: [ - 'plugins/index_management', - ] + managementSections: ['plugins/index_management'], }, init: function (server) { registerLicenseChecker(server); @@ -28,6 +26,6 @@ export function indexManagement(kibana) { registerSettingsRoutes(server); registerStatsRoute(server); registerMappingRoute(server); - } + }, }); } diff --git a/x-pack/yarn.lock b/x-pack/yarn.lock index ceca670423188..cb9d6c3637e4c 100644 --- a/x-pack/yarn.lock +++ b/x-pack/yarn.lock @@ -152,6 +152,10 @@ dependencies: "@types/node" "*" +"@types/history@*", "@types/history@^4.6.2": + version "4.6.2" + resolved "https://registry.yarnpkg.com/@types/history/-/history-4.6.2.tgz#12cfaba693ba20f114ed5765467ff25fdf67ddb0" + "@types/is-stream@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@types/is-stream/-/is-stream-1.1.0.tgz#b84d7bb207a210f2af9bed431dc0fbe9c4143be1" @@ -208,6 +212,27 @@ dependencies: "@types/node" "*" +"@types/react-router-dom@^4.2.7": + version "4.2.7" + resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-4.2.7.tgz#9d36bfe175f916dd8d7b6b0237feed6cce376b4c" + dependencies: + "@types/history" "*" + "@types/react" "*" + "@types/react-router" "*" + +"@types/react-router@*": + version "4.0.29" + resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.0.29.tgz#1a906dd99abf21297a5b7cf003d1fd36e7a92069" + dependencies: + "@types/history" "*" + "@types/react" "*" + +"@types/react@*": + version "16.4.6" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.4.6.tgz#5024957c6bcef4f02823accf5974faba2e54fada" + dependencies: + csstype "^2.2.0" + "@types/retry@*", "@types/retry@^0.10.2": version "0.10.2" resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.10.2.tgz#bd1740c4ad51966609b058803ee6874577848b37" @@ -1844,6 +1869,10 @@ cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": dependencies: cssom "0.3.x" +csstype@^2.2.0: + version "2.5.5" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.5.tgz#4125484a3d42189a863943f23b9e4b80fedfa106" + currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"