Skip to content

Commit e1bbbb5

Browse files
committed
Remove dead code
1 parent fbcf50c commit e1bbbb5

1 file changed

Lines changed: 0 additions & 74 deletions

File tree

x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.ts

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -65,77 +65,3 @@ export const storedDatasourcesToAgentInputs = (
6565

6666
return fullInputs;
6767
};
68-
69-
// export const storedDatasourcesToAgentInputs = (datasource: Datasource): FullAgentConfigInput => {
70-
// const { id, name, namespace, enabled, package: pkg, inputs } = datasource;
71-
72-
// const fullStreams: FullAgentConfigInputStream[] = [];
73-
74-
// inputs.forEach((input) => {
75-
// if (!input.enabled || !input.streams || !input.streams.length) {
76-
// return;
77-
// }
78-
// const streams: FullAgentConfigInputStream[] = input.streams
79-
// .filter((stream) => stream.enabled)
80-
// .map((stream) => {
81-
// const fullStream: FullAgentConfigInputStream = {
82-
// id: stream.id,
83-
// processors: stream.processors,
84-
// 'dataset.type': stream.dataset,
85-
// ...stream.agent_stream,
86-
// ...Object.entries(stream.config || {}).reduce((acc, [key, { value }]) => {
87-
// acc[key] = value;
88-
// return acc;
89-
// }, {} as { [k: string]: any }),
90-
// };
91-
// return fullStream;
92-
// });
93-
// fullStreams.concat(streams);
94-
// });
95-
96-
// const fullInput: FullAgentConfigInput = {
97-
// id: id || name,
98-
// name,
99-
// 'dataset.namespace': namespace,
100-
// use_output: DEFAULT_OUTPUT.name, // TODO: hardcoded to default output for now
101-
// streams: inputs
102-
// .filter((input) => input.enabled)
103-
// .map((input) => {
104-
// const fullInput = {
105-
// ...input,
106-
// ...Object.entries(input.config || {}).reduce((acc, [key, { value }]) => {
107-
// acc[key] = value;
108-
// return acc;
109-
// }, {} as { [k: string]: any }),
110-
// streams: input.streams
111-
// .filter((stream) => stream.enabled)
112-
// .map((stream) => {
113-
// const fullStream = {
114-
// ...stream,
115-
// ...stream.agent_stream,
116-
// ...Object.entries(stream.config || {}).reduce((acc, [key, { value }]) => {
117-
// acc[key] = value;
118-
// return acc;
119-
// }, {} as { [k: string]: any }),
120-
// };
121-
// delete fullStream.agent_stream;
122-
// delete fullStream.vars;
123-
// delete fullStream.config;
124-
// return fullStream;
125-
// }),
126-
// };
127-
// delete fullInput.vars;
128-
// delete fullInput.config;
129-
// return fullInput;
130-
// }),
131-
// };
132-
133-
// if (pkg) {
134-
// fullInput.package = {
135-
// name: pkg.name,
136-
// version: pkg.version,
137-
// };
138-
// }
139-
140-
// return fullInput;
141-
// };

0 commit comments

Comments
 (0)