File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
logstash-core/lib/logstash/api Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ def all(selected_fields=[])
1717 payload
1818 end
1919
20- def pipelines
20+ def pipelines ( options = { } )
2121 pipeline_ids = service . get_shallow ( :stats , :pipelines ) . keys
2222 pipeline_ids . each_with_object ( { } ) do |pipeline_id , result |
23- result [ pipeline_id ] = pipeline ( pipeline_id )
23+ result [ pipeline_id ] = pipeline ( pipeline_id , options )
2424 end
2525 end
2626
Original file line number Diff line number Diff line change @@ -34,6 +34,13 @@ def node
3434 respond_with ( :pipelines => { pipeline_id => payload } )
3535 end
3636
37+ get "/pipelines" do
38+ opts = { :graph => as_boolean ( params . fetch ( "graph" , false ) ) }
39+ payload = node . pipelines ( opts )
40+ halt ( 404 ) if payload . empty?
41+ respond_with ( :pipelines => payload )
42+ end
43+
3744 get "/?:filter?" do
3845 selected_fields = extract_fields ( params [ "filter" ] . to_s . strip )
3946 values = node . all ( selected_fields )
You can’t perform that action at this time.
0 commit comments