Skip to content

Commit

Permalink
update doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
parkiino committed Jun 2, 2020
1 parent 9ee8750 commit 4f4e14c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export interface DatasourceInput extends Omit<NewDatasourceInput, 'streams'> {
streams: DatasourceInputStream[];
}

/**
* Type of `datasource` prop in CustomConfigureDatasourceContent
*/
export interface NewDatasource {
name: string;
description?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export interface CustomConfigureDatasourceProps {
datasource: NewDatasource | (NewDatasource & { id: string });
}

/**
* Allows external plugins to create custom content for the Ingest
* Datasource configuration.
*/
export type CustomConfigureDatasourceContent = React.FC<CustomConfigureDatasourceProps>;

const ConfigureDatasourceMapping: { [key: string]: CustomConfigureDatasourceContent } = {
Expand Down
7 changes: 0 additions & 7 deletions x-pack/plugins/ingest_manager/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ export const plugin = (initializerContext: PluginInitializerContext) => {
return new IngestManagerPlugin(initializerContext);
};

/**
* Allows external plugins to create custom content for the Ingest
* Datasource configuration.
*/
export { CustomConfigureDatasourceContent } from './applications/ingest_manager/sections/agent_config/create_datasource_page/components/custom_configure_datasource';

/**
* Type of `datasource` prop in CustomConfigureDatasourceContent
*/
export { NewDatasource } from './applications/ingest_manager/types';
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import { getManagementUrl } from '../../../..';

type DatasourceWithId = NewDatasource & { id: string };

/**
* Exports Endpoint-specific datasource configuration instructions
* for use in the Ingest app create / edit datasource config
*/
export const ConfigureEndpointDatasource = memo<CustomConfigureDatasourceContent>(
({ from, datasource }: { from: string; datasource: NewDatasource | DatasourceWithId }) => {
const { services } = useKibana();
Expand Down

0 comments on commit 4f4e14c

Please sign in to comment.