mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
[Monitoring] Stop using constructor.name for logstash pipelines (#87386)
* Use typeString instead * Used wrong type string Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
89e7cd6808
commit
ff8d30bc6c
1 changed files with 5 additions and 6 deletions
|
@ -9,15 +9,14 @@ import { IfStatement } from './if_statement';
|
|||
import { Queue } from './queue';
|
||||
|
||||
export function makeStatement(pipelineGraphVertex, pipelineStage) {
|
||||
const klass = pipelineGraphVertex.constructor.name;
|
||||
switch (klass) {
|
||||
case 'PluginVertex':
|
||||
switch (pipelineGraphVertex.typeString) {
|
||||
case 'plugin':
|
||||
return PluginStatement.fromPipelineGraphVertex(pipelineGraphVertex, pipelineStage);
|
||||
case 'IfVertex':
|
||||
case 'if':
|
||||
return IfStatement.fromPipelineGraphVertex(pipelineGraphVertex, pipelineStage);
|
||||
case 'QueueVertex':
|
||||
case 'queue':
|
||||
return Queue.fromPipelineGraphVertex(pipelineGraphVertex, pipelineStage);
|
||||
default:
|
||||
throw new Error(`Unknown vertex class: ${klass}`);
|
||||
throw new Error(`Unknown vertex class: ${pipelineGraphVertex.typeString}`);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue