From e1bbbb5e0d009636bc7d30ff1c4c8d5eed481343 Mon Sep 17 00:00:00 2001 From: Jen Huang Date: Mon, 15 Jun 2020 18:16:15 -0700 Subject: [PATCH] Remove dead code --- .../services/datasources_to_agent_inputs.ts | 74 ------------------- 1 file changed, 74 deletions(-) diff --git a/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.ts b/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.ts index 15298607e32a10..27959de716dfeb 100644 --- a/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.ts +++ b/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.ts @@ -65,77 +65,3 @@ export const storedDatasourcesToAgentInputs = ( return fullInputs; }; - -// export const storedDatasourcesToAgentInputs = (datasource: Datasource): FullAgentConfigInput => { -// const { id, name, namespace, enabled, package: pkg, inputs } = datasource; - -// const fullStreams: FullAgentConfigInputStream[] = []; - -// inputs.forEach((input) => { -// if (!input.enabled || !input.streams || !input.streams.length) { -// return; -// } -// const streams: FullAgentConfigInputStream[] = input.streams -// .filter((stream) => stream.enabled) -// .map((stream) => { -// const fullStream: FullAgentConfigInputStream = { -// id: stream.id, -// processors: stream.processors, -// 'dataset.type': stream.dataset, -// ...stream.agent_stream, -// ...Object.entries(stream.config || {}).reduce((acc, [key, { value }]) => { -// acc[key] = value; -// return acc; -// }, {} as { [k: string]: any }), -// }; -// return fullStream; -// }); -// fullStreams.concat(streams); -// }); - -// const fullInput: FullAgentConfigInput = { -// id: id || name, -// name, -// 'dataset.namespace': namespace, -// use_output: DEFAULT_OUTPUT.name, // TODO: hardcoded to default output for now -// streams: inputs -// .filter((input) => input.enabled) -// .map((input) => { -// const fullInput = { -// ...input, -// ...Object.entries(input.config || {}).reduce((acc, [key, { value }]) => { -// acc[key] = value; -// return acc; -// }, {} as { [k: string]: any }), -// streams: input.streams -// .filter((stream) => stream.enabled) -// .map((stream) => { -// const fullStream = { -// ...stream, -// ...stream.agent_stream, -// ...Object.entries(stream.config || {}).reduce((acc, [key, { value }]) => { -// acc[key] = value; -// return acc; -// }, {} as { [k: string]: any }), -// }; -// delete fullStream.agent_stream; -// delete fullStream.vars; -// delete fullStream.config; -// return fullStream; -// }), -// }; -// delete fullInput.vars; -// delete fullInput.config; -// return fullInput; -// }), -// }; - -// if (pkg) { -// fullInput.package = { -// name: pkg.name, -// version: pkg.version, -// }; -// } - -// return fullInput; -// };