Class: Fluentd::SettingsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/fluentd/settings_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



16
17
# File 'app/controllers/fluentd/settings_controller.rb', line 16

def edit
end

#showObject



8
9
10
11
12
13
14
# File 'app/controllers/fluentd/settings_controller.rb', line 8

def show
  @backup_files = @fluentd.agent.backup_files_in_new_order.first(::Settings.histories_count_in_preview).map do |file_path|
    Fluentd::SettingArchive::BackupFile.new(file_path)
  end

  @running_backedup_file = Fluentd::SettingArchive::BackupFile.new(@fluentd.agent.running_config_backup_file)
end

#source_and_outputObject



27
28
29
30
# File 'app/controllers/fluentd/settings_controller.rb', line 27

def source_and_output
  # TODO: error handling if config file has invalid syntax
  # @config = Fluentd::Setting::Config.new(@fluentd.config_file)
end

#updateObject



19
20
21
22
23
24
25
# File 'app/controllers/fluentd/settings_controller.rb', line 19

def  update
  if params[:dryrun]
    handle_dryrun
  else
    handle_update
  end
end