Skip to content

Commit

Permalink
Move files from legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed May 10, 2020
1 parent 04127ae commit 2b0e90b
Show file tree
Hide file tree
Showing 101 changed files with 151 additions and 165 deletions.
5 changes: 0 additions & 5 deletions x-pack/legacy/plugins/beats_management/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* 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 { CONFIG_PREFIX } from './common/constants/plugin';
import { initServerWithKibana } from './server/kibana.index';
Expand All @@ -29,10 +28,6 @@ export function beats(kibana: any) {
return new kibana.Plugin({
id: PLUGIN.ID,
require: ['kibana', 'elasticsearch', 'xpack_main'],
publicDir: resolve(__dirname, 'public'),
uiExports: {
managementSections: ['plugins/beats_management'],
},
config: () => config,
configPrefix: CONFIG_PREFIX,
init(server: KibanaLegacyServer) {
Expand Down

This file was deleted.

3 changes: 2 additions & 1 deletion x-pack/legacy/plugins/beats_management/scripts/fake_env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import request from 'request';
import uuidv4 from 'uuid/v4';
import { configBlockSchemas } from '../common/config_schemas';
import { BeatTag } from '../common/domain_types';
import { compose } from '../public/lib/compose/scripts';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { compose } from '../../../../plugins/beats_management/public/lib/compose/scripts';
const args = process.argv.slice(2);
const chance = new Chance();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { BeatEvent } from '../../../../common/domain_types';
import { FrameworkUser } from '../../../../public/lib/adapters/framework/adapter_types';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { FrameworkUser } from '../../../../../../../plugins/beats_management/public/lib/adapters/framework/adapter_types';

export interface BeatEventsAdapter {
bulkInsert(user: FrameworkUser, beatId: string, events: BeatEvent[]): Promise<void>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
*/

import { BeatEvent } from '../../../../common/domain_types';
import { FrameworkUser } from '../../../../public/lib/adapters/framework/adapter_types';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { FrameworkUser } from '../../../../../../../plugins/beats_management/public/lib/adapters/framework/adapter_types';
import { DatabaseAdapter } from '../database/adapter_types';
import { BeatEventsAdapter } from './adapter_types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import Joi from 'joi';
import { REQUIRED_LICENSES } from '../../../common/constants/security';
import { ReturnTypeBulkAction } from '../../../common/return_types';
import { BeatsTagAssignment } from '../../../public/lib/adapters/beats/adapter_types';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { BeatsTagAssignment } from '../../../../../../plugins/beats_management/public/lib/adapters/beats/adapter_types';
import { FrameworkRequest } from '../../lib/adapters/framework/adapter_types';
import { CMServerLibs } from '../../lib/types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { TagsContainer } from './containers/tags';
import { FrontendLibs } from './lib/types';
import { AppRouter } from './router';
import { services } from './kbn_services';
import { ManagementAppMountParams } from '../../../../../src/plugins/management/public';
import { ManagementAppMountParams } from '../../../../src/plugins/management/public';

export const renderApp = (
{ basePath, element, setBreadcrumbs }: ManagementAppMountParams,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
*/

import { i18n } from '@kbn/i18n';
import { BASE_PATH } from '../common/constants';
import { BASE_PATH } from '../../../legacy/plugins/beats_management/common/constants';
import { FrontendLibs } from './lib/types';
import { compose } from './lib/compose/kibana';

import { setServices } from './kbn_services';
import { ManagementSetup } from '../../../../../src/plugins/management/public';
import { SecurityPluginSetup } from '../../../../plugins/security/public';
import { CoreSetup } from '../../../../../src/core/public';
import { DataPublicPluginStart } from '../../../../../src/plugins/data/public';
import { LicensingPluginSetup } from '../../../../plugins/licensing/public';
import { BeatsManagementConfigType } from '../../../../plugins/beats_management/common';
import { ManagementSetup } from '../../../../src/plugins/management/public';
import { SecurityPluginSetup } from '../../security/public';
import { CoreSetup } from '../../../../src/core/public';
import { DataPublicPluginStart } from '../../../../src/plugins/data/public';
import { LicensingPluginSetup } from '../../licensing/public';
import { BeatsManagementConfigType } from '../common';

async function startApp(libs: FrontendLibs, core: CoreSetup<StartDeps>) {
await libs.framework.waitUntilFrameworkReady();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import React from 'react';
import styled from 'styled-components';

import { QuerySuggestion } from '../../../../../../../src/plugins/data/public';
import { QuerySuggestion } from '../../../../../../src/plugins/data/public';

import { composeStateUpdaters } from '../../utils/typed_react';
import { SuggestionItem } from './suggestion_item';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { tint } from 'polished';
import React from 'react';
import styled from 'styled-components';

import { QuerySuggestion } from '../../../../../../../src/plugins/data/public';
import { QuerySuggestion } from '../../../../../../src/plugins/data/public';

interface SuggestionItemProps {
isSelected?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import { EuiBasicTable, EuiLink } from '@elastic/eui';
import { InjectedIntl, injectI18n } from '@kbn/i18n/react';
import React from 'react';
import { configBlockSchemas } from '../../common/config_schemas';
import { translateConfigSchema } from '../../common/config_schemas_translations_map';
import { ConfigurationBlock } from '../../common/domain_types';
import { configBlockSchemas } from '../../../../legacy/plugins/beats_management/common/config_schemas';
import { translateConfigSchema } from '../../../../legacy/plugins/beats_management/common/config_schemas_translations_map';
import { ConfigurationBlock } from '../../../../legacy/plugins/beats_management/common/domain_types';

interface ComponentProps {
configs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import { FormattedMessage } from '@kbn/i18n/react';
import { capitalize } from 'lodash';
import React from 'react';
import { CMBeat } from '../../common/domain_types';
import { CMBeat } from '../../../../legacy/plugins/beats_management/common/domain_types';

interface ComponentProps {
/** Such as kibanas basePath, for use to generate command */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import React, { Component } from 'react';
import { RouteProps } from 'react-router-dom';
import { BASE_PATH } from '../../../../common/constants';
import { BASE_PATH } from '../../../../../../legacy/plugins/beats_management/common/constants';
import { BreadcrumbConsumer } from './consumer';
import { Breadcrumb as BreadcrumbData, BreadcrumbContext } from './types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
EuiPopover,
} from '@elastic/eui';
import React from 'react';
import { TABLE_CONFIG } from '../../../../common/constants/table';
import { TABLE_CONFIG } from '../../../../../../legacy/plugins/beats_management/common/constants/table';
import { TagBadge } from '../../tag/tag_badge';
import { AssignmentActionType } from '../index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { EuiBasicTable, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eu
import { i18n } from '@kbn/i18n';
import React from 'react';
import styled from 'styled-components';
import { QuerySuggestion } from '../../../../../../../src/plugins/data/public';
import { TABLE_CONFIG } from '../../../common/constants';
import { QuerySuggestion } from '../../../../../../src/plugins/data/public';
import { TABLE_CONFIG } from '../../../../../legacy/plugins/beats_management/common/constants';
import { AutocompleteField } from '../autocomplete_field/index';
import { ControlSchema } from './action_schema';
import { OptionControl } from './controls/option_control';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import { i18n } from '@kbn/i18n';
import { sortBy, uniq } from 'lodash';
import moment from 'moment';
import React from 'react';
import { BeatTag, CMBeat } from '../../../common/domain_types';
import {
BeatTag,
CMBeat,
} from '../../../../../legacy/plugins/beats_management/common/domain_types';
import { ConnectedLink } from '../navigation/connected_link';
import { TagBadge } from '../tag';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import { i18n } from '@kbn/i18n';
import Formsy from 'formsy-react';
import { get } from 'lodash';
import React from 'react';
import { ConfigBlockSchema, ConfigurationBlock } from '../../../../common/domain_types';
import {
ConfigBlockSchema,
ConfigurationBlock,
} from '../../../../../../legacy/plugins/beats_management/common/domain_types';
import {
FormsyEuiCodeEditor,
FormsyEuiFieldText,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import {
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import { configBlockSchemas } from '../../../../common/config_schemas';
import { translateConfigSchema } from '../../../../common/config_schemas_translations_map';
import { ConfigurationBlock } from '../../../../common/domain_types';
import { configBlockSchemas } from '../../../../../../legacy/plugins/beats_management/common/config_schemas';
import { translateConfigSchema } from '../../../../../../legacy/plugins/beats_management/common/config_schemas_translations_map';
import { ConfigurationBlock } from '../../../../../../legacy/plugins/beats_management/common/domain_types';
import { ConfigForm } from './config_form';

interface ComponentProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { EuiBadge, EuiBadgeProps } from '@elastic/eui';
import React from 'react';
import { TABLE_CONFIG } from '../../../common/constants';
import { TABLE_CONFIG } from '../../../../../legacy/plugins/beats_management/common/constants';

type TagBadgeProps = EuiBadgeProps & {
maxIdRenderSize?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ import { FormattedMessage } from '@kbn/i18n/react';
import 'brace/mode/yaml';
import 'brace/theme/github';
import React from 'react';
import { BeatTag, CMBeat, ConfigurationBlock } from '../../../common/domain_types';
import {
BeatTag,
CMBeat,
ConfigurationBlock,
} from '../../../../../legacy/plugins/beats_management/common/domain_types';
import { ConfigList } from '../config_list';
import { AssignmentActionType, BeatsTableType, Table, tagConfigActions } from '../table';
import { ConfigView } from './config_view';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Container } from 'unstated';
import { CMBeat } from './../../common/domain_types';
import { BeatsTagAssignment } from './../../server/lib/adapters/beats/adapter_types';
import { CMBeat } from '../../../../legacy/plugins/beats_management/common/domain_types';
import { BeatsTagAssignment } from '../../../../legacy/plugins/beats_management/server/lib/adapters/beats/adapter_types';
import { FrontendLibs } from './../lib/types';

interface ContainerState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { Container } from 'unstated';
import { BeatTag } from '../../common/domain_types';
import { BeatTag } from '../../../../legacy/plugins/beats_management/common/domain_types';
import { FrontendLibs } from '../lib/types';

interface ContainerState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import React from 'react';

import { QuerySuggestion } from '../../../../../../src/plugins/data/public';
import { QuerySuggestion } from '../../../../../src/plugins/data/public';

import { FrontendLibs } from '../lib/types';
import { RendererFunction } from '../utils/typed_react';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/beats_management/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { SecurityPluginSetup } from '../../security/public';
import { DataPublicPluginStart } from '../../../../src/plugins/data/public';
import { LicensingPluginSetup } from '../../licensing/public';

import { bootstrap } from '../../../legacy/plugins/beats_management/public';
import { bootstrap } from './bootstrap';
import { BeatsManagementConfigType } from '../common';

interface SetupDeps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { CoreStart } from '../../../../../src/core/public';
import { DataPublicPluginStart } from '../../../../../src/plugins/data/public';
import { ManagementAppMountParams } from '../../../../../src/plugins/management/public';
import { CoreStart } from '../../../../src/core/public';
import { DataPublicPluginStart } from '../../../../src/plugins/data/public';
import { ManagementAppMountParams } from '../../../../src/plugins/management/public';

export const services = {
I18nContext: (null as any) as CoreStart['i18n']['Context'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { configBlockSchemas } from '../../../common/config_schemas';
import { translateConfigSchema } from '../../../common/config_schemas_translations_map';
import { configBlockSchemas } from '../../../../../legacy/plugins/beats_management/common/config_schemas';
import { translateConfigSchema } from '../../../../../legacy/plugins/beats_management/common/config_schemas_translations_map';
import { ConfigBlocksLib } from '../configuration_blocks';
import { MemoryConfigBlocksAdapter } from './../adapters/configuration_blocks/memory_config_blocks_adapter';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { CMBeat } from '../../../../common/domain_types';
import { ReturnTypeBulkAction } from '../../../../common/return_types';
import { CMBeat } from '../../../../../../legacy/plugins/beats_management/common/domain_types';
import { ReturnTypeBulkAction } from '../../../../../../legacy/plugins/beats_management/common/return_types';

export interface CMBeatsAdapter {
get(id: string): Promise<CMBeat | null>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

import { omit } from 'lodash';
import { CMBeat } from '../../../../common/domain_types';
import { ReturnTypeBulkAction } from '../../../../common/return_types';
import { CMBeat } from '../../../../../../legacy/plugins/beats_management/common/domain_types';
import { ReturnTypeBulkAction } from '../../../../../../legacy/plugins/beats_management/common/return_types';
import { BeatsTagAssignment, CMBeatsAdapter } from './adapter_types';

export class MemoryBeatsAdapter implements CMBeatsAdapter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { CMBeat } from '../../../../common/domain_types';
import { CMBeat } from '../../../../../../legacy/plugins/beats_management/common/domain_types';
import {
ReturnTypeBulkAction,
ReturnTypeGet,
ReturnTypeList,
ReturnTypeUpdate,
} from '../../../../common/return_types';
} from '../../../../../../legacy/plugins/beats_management/common/return_types';
import { RestAPIAdapter } from '../rest_api/adapter_types';
import { BeatsTagAssignment, CMBeatsAdapter } from './adapter_types';
export class RestBeatsAdapter implements CMBeatsAdapter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 { ConfigurationBlock } from '../../../../common/domain_types';
import { ReturnTypeBulkUpsert, ReturnTypeList } from '../../../../common/return_types';
import { ConfigurationBlock } from '../../../../../../legacy/plugins/beats_management/common/domain_types';
import {
ReturnTypeBulkUpsert,
ReturnTypeList,
} from '../../../../../../legacy/plugins/beats_management/common/return_types';

export interface FrontendConfigBlocksAdapter {
upsert(blocks: ConfigurationBlock[]): Promise<ReturnTypeBulkUpsert>;
Expand Down
Loading

0 comments on commit 2b0e90b

Please sign in to comment.