mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 10:56:11 +02:00
Set target element properly
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
6940103108
commit
d86ff4364b
@ -42,11 +42,12 @@ class Api::SettingsController < ApplicationController
|
||||
|
||||
def set_target_element
|
||||
id = params[:id]
|
||||
plugin_type = params[:pluginType]
|
||||
label_name = params[:label]
|
||||
return unless id
|
||||
label_name = id.slice(/\A(sources|filters|matches):.+/)[1]
|
||||
elements = @config.group_by_label.dig(label_name, element_type)
|
||||
@section = elements.find do |elm|
|
||||
element_id(elm) == id
|
||||
elements = @config.group_by_label.dig(label_name, element_type(plugin_type))
|
||||
@target_element = elements.find do |elm|
|
||||
element_id(label_name, elm) == id
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user