mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 19:06:12 +02:00
Add configure action to configure parse/format section
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
parent
421cbdd1af
commit
6ef0380b3e
@ -10,11 +10,21 @@ module SettingConcern
|
||||
|
||||
def show
|
||||
@setting = target_class.new(initial_params)
|
||||
@parser = @setting.create_parser
|
||||
@formatter = @setting.create_formatter
|
||||
@_used_param = {}
|
||||
@_used_section = {}
|
||||
render "shared/settings/show"
|
||||
end
|
||||
|
||||
def configure
|
||||
owned_keys = %i(parse_type format_type)
|
||||
@setting = target_class.new(initial_params.merge(params.permit(*owned_keys).slice(*owned_keys)))
|
||||
@parser = @setting.create_parser
|
||||
@formatter = @setting.create_formatter
|
||||
render "shared/settings/show"
|
||||
end
|
||||
|
||||
def finish
|
||||
@setting = target_class.new(setting_params)
|
||||
@_used_param = {}
|
||||
|
||||
@ -20,12 +20,14 @@ Rails.application.routes.draw do
|
||||
|
||||
resource :in_tail, only: [:show], module: :settings, controller: :in_tail do
|
||||
post "after_file_choose"
|
||||
# get "configure"
|
||||
post "after_format"
|
||||
post "confirm"
|
||||
post "finish"
|
||||
end
|
||||
|
||||
resource :in_syslog, only: [:show], module: :settings, controller: :in_syslog do
|
||||
get "configure"
|
||||
post "finish"
|
||||
end
|
||||
|
||||
@ -34,6 +36,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
|
||||
resource :in_http, only: [:show], module: :settings, controller: :in_http do
|
||||
get "configure"
|
||||
post "finish"
|
||||
end
|
||||
|
||||
@ -42,6 +45,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
|
||||
resource :out_stdout, only: [:show], module: :settings, controller: :out_stdout do
|
||||
get "configure"
|
||||
post "finish"
|
||||
end
|
||||
|
||||
@ -54,6 +58,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
|
||||
resource :out_s3, only: [:show], module: :settings, controller: :out_s3 do
|
||||
get "configure"
|
||||
post "finish"
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user