Module: SettingConcern
- Extended by:
- ActiveSupport::Concern
- Included in:
- Fluentd::Settings::InForwardController, Fluentd::Settings::InHttpController, Fluentd::Settings::InMonitorAgentController, Fluentd::Settings::InSyslogController, Fluentd::Settings::OutElasticsearchController, Fluentd::Settings::OutForwardController, Fluentd::Settings::OutMongoController, Fluentd::Settings::OutS3Controller, Fluentd::Settings::OutStdoutController, Fluentd::Settings::OutTdController
- Defined in:
- app/controllers/concerns/setting_concern.rb
Instance Method Summary collapse
Instance Method Details
#finish ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/concerns/setting_concern.rb', line 16 def finish @setting = target_class.new(setting_params) unless @setting.valid? return render "shared/settings/show" end @fluentd.agent.config_append @setting.to_config if @fluentd.agent.running? unless @fluentd.agent.restart @setting.errors.add(:base, @fluentd.agent.log.tail(1).first) return render "shared/settings/show" end end redirect_to daemon_setting_path(@fluentd) end |
#show ⇒ Object
11 12 13 14 |
# File 'app/controllers/concerns/setting_concern.rb', line 11 def show @setting = target_class.new(initial_params) render "shared/settings/show" end |