Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-huang committed Jun 16, 2020
1 parent fbcf50c commit e1bbbb5
Showing 1 changed file with 0 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
// };

0 comments on commit e1bbbb5

Please sign in to comment.